while ($pro2->next_record()) {
        ?>
	  <tr>
	  	<td width="1%" align="right" nowrap><?php 
        echo $pro2->f('name');
        ?>
 : &nbsp;</td>
		<td>
<?php 
        $choice->clear();
        $cate_id = $pro2->f('id');
        $pro->get_attachments($cate_id);
        while ($pro->next_record()) {
            if (isset($list_attach[$cate_id])) {
                if (in_array($pro->f('product_id'), $list_attach[$cate_id])) {
                    $choice->add_option($pro->f('product_name'), $pro->f('product_id'), true);
                } else {
                    $choice->add_option($pro->f('product_name'), $pro->f('product_id'));
                }
            } else {
                $choice->add_option($pro->f('product_name'), $pro->f('product_id'));
            }
        }
        $choice->print_choice_list('frmProduct', 'attach_' . $pro2->f('id'));
        ?>
		
			<input type="hidden" name="attachment_categories[]" value="<?php 
        echo $pro2->f('id');
        ?>
">
		</td>
Пример #2
0
        $disabled = $_POST['close_win'] > 0 ? 'disabled' : '';
        $pro->get_categories($edit_id, false);
        if ($pro->next_record()) {
            $edit_name = $pro->f('category_name');
            $edit_parent = $pro->f('parent_id');
        }
        $pro->get_attach_categories($edit_id, true);
        while ($pro->next_record()) {
            $att_arr[] = $pro->f('id');
        }
        break;
}
$trash = '<img src="' . $GO_THEME->images['delete'] . '" border="0">';
$spliter = '<tr><td colspan="100" height="1"><img src="' . $GO_THEME->images['cccccc'] . '" border="0" height="1" width="100%" /></td></tr>';
$pro->get_attach_categories();
while ($pro->next_record()) {
    $att_arr[] = -5;
    if (in_array($pro->f('id'), $att_arr)) {
        $choice->add_option($pro->f('name'), $pro->f('id'), true);
    } else {
        $choice->add_option($pro->f('name'), $pro->f('id'));
    }
}
$pro->get_categories(0);
$dropbox = new dropbox();
$dropbox->add_value(0, $sc_top);
while ($pro->next_record()) {
    $dropbox->add_value($pro->f('category_id'), $pro->f('category_name'));
}
require 'templates/edit_category.tmp.php';
require $GO_THEME->theme_path . "footer.inc";