if ($tou_settings->terms_url == $page->ID) { continue; } if ($i == $half_pages) { ?> </div> <div style="width:50%" class="alignright"> <?php } $i++; ?> <input type="checkbox" name="frontend_page[]" value="<?php echo $page->ID; ?> " <?php TouAppHelper::checked((array) $tou_settings->frontend_page, $page->ID); ?> /> <?php echo substr($page->post_title, 0, 50); ?> <br/> <?php } ?> </div> <div class="clear"></div> </div> </td> </tr>
function forms_checkboxes($field_name, $field_value = array(), $cols = 1) { if (!class_exists('FrmForm')) { return; } global $frm_form; $forms = $frm_form->getAll("is_template=0 AND (status is NULL OR status = '' OR status = 'published')", ' ORDER BY name'); $count = count($forms); $col_count = ceil($count / $cols); $width = 100 / $cols; $i = 0; foreach ($forms as $form) { if ($i == $col_count) { ?> </div> <div style="width:<?php echo $width; ?> %" class="alignleft"> <?php } $i++; ?> <input name="<?php echo $field_name; ?> []" type="checkbox" value="<?php echo $form->id; ?> " <?php TouAppHelper::checked($field_value, $form->id); ?> /> <?php echo substr(stripslashes($form->name), 0, 50); ?> <br/> <?php } }