<tr> <td width="1%" align="right" nowrap><?php echo $sc_warranty; ?> : </td> <td><textarea name="warranty" style="height:70;width:50%"><?php echo $warranty; ?> </textarea></td> </tr> <?php $choice = new choice_list(); if (!$is_attachment) { $pro2 = new products(); $pro2->get_attach_categories($category_id, true); while ($pro2->next_record()) { ?> <tr> <td width="1%" align="right" nowrap><?php echo $pro2->f('name'); ?> : </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])) {
} break; case 'delete': if (!$pro->delete_category($_POST['id'])) { alert(sprintf($sc_CannotDelete, $_POST['txt_name'])); } break; case 'edit': $edit_id = $_POST['id']; $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')); }
<tr> <td valign="top" width="15%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="TableHead2" height="20"> <td nowrap><?php echo $sc_category; ?> </td> </tr> <?php $pro->get_categories(0); $num = $pro->num_rows(); $attach = new products(); $attach->get_attach_categories(); $att_num = $attach->num_rows(); for ($i = 1; $pro->next_record(); $i++) { $id = $pro->f('category_id'); $click = "javascript:click_txt(document.frmProList,'expand',document.frmProList.id,'{$id}','')"; $pro2 = new products(); $pro2->get_categories($id); $num2 = $pro2->num_rows(); if ($num2 > 0) { $no_exp = true; if (count($exp) > 0) { if (in_array($id, $exp)) { $img = $image['mnode']; if ($i == $num && $att_num == 0) { $img = $image['mlastnode']; }
$category_id = $_POST['category_id']; $is_attachment = $_POST['is_attach']; $price = $_POST['price']; $description = $_POST['description']; $warranty = $_POST['warranty']; $part_number = $_POST['part_number']; $VAT = $_POST['VAT']; $cate = $_POST['attachment_categories']; } case 'add': if (!isset($change_case)) { $change_case = 'add_change'; } $catedrop = new dropbox(); if ($is_attachment == true) { $pro->get_attach_categories(); while ($pro->next_record()) { $catedrop->add_value($pro->f('id'), $pro->f('name')); } } else { $pro->get_categories(-2); $first = true; $hasa = false; while ($pro->next_record()) { if (first) { $first_cate_id = $pro->f('category_id'); // $category_id = $pro->f('category_id'); $first = false; } if ($category_id == $pro->f('category_id')) { $hasa = true;
$GO_MODULES->authenticate('products'); require $GO_LANGUAGE->get_language_file('products'); require $GO_THEME->theme_path . "header.inc"; $pro = new products(); switch ($_REQUEST['task']) { case 'update': if ((int) $pro->update_attach_category($_POST['id'], $_POST['category']) == $pro->err_duplicate) { alert(sprintf($sc_Duplicate, $sc_category)); } break; case 'add': if ((int) $pro->add_attach_category($_POST['category']) == $pro->err_duplicate) { alert(sprintf($sc_Duplicate, $sc_category)); } break; case 'delete': if (!$pro->delete_attach_category($_POST['id'])) { alert(sprintf($sc_CannotDelete, $_POST['txt_name'])); } 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(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_attach_category.tmp.php'; require $GO_THEME->theme_path . "footer.inc";