Skip to content

Instantly share code, notes, and snippets.

@Paxa
Created July 17, 2009 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Paxa/149127 to your computer and use it in GitHub Desktop.
Save Paxa/149127 to your computer and use it in GitHub Desktop.
<?
#controller
$bdks = $this->db->select('distinct year as name')->where('site', $_REQUEST['siteid'])->get('pers_to_date')->result();
$this->my_view->view('admin/mailer/filter', array(
'users' => $users,
'total_rows' => $users_num,
'branches' => $this->db->get('branch')->result(), // бля, почему не branches ?
'bdks' => $bdks,
'countries' => $this->db->order_by('name', 'asc')->get('countries')->result(),
'colls' => $_SESSION['_mailer_colls']
));
?>
<!-- view -->
<? foreach ($bdks as $bdk) { ?>
<label>
<input type="checkbox" name="colls[bdk][<?= $bdk->name ?>]" <? if ($colls['bdk'][$bdk->name]) echo 'checked="checked"'?>>
Участие в БДК <?= $bdk->name ?>
</label>
<? } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment