<td width="1%" align="right" nowrap><?php 
echo $sc_warranty;
?>
 : &nbsp;</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');
        ?>
 : &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);
        ?>
'><?php 
        echo $trash;
        ?>
</a></td>
    </tr>	  
<?php 
    }
    $first = true;
    $j = -1;
    unset($cate_arr);
    unset($cate_id_arr);
    unset($text_arr);
    unset($value_arr);
    unset($price_arr);
    while ($attach->next_record()) {
        if ($cate_arr[$j] != $attach->f('name')) {
            $j++;
            $cate_arr[] = $attach->f('name');
            $cate_id_arr[] = $attach->f('attach_cate_id');
            $text_arr[$j][] = $sc_no_select;
            $value_arr[$j][] = 0;
            $price_arr[$j][] = 0;
        }
        $text_arr[$j][] = $attach->f('attachment_name');
        $value_arr[$j][] = $attach->f('attachment_id');
        $price_arr[$j][] = $attach->f('attachment_price');
        $VAT_arr[$j][] = $attach->f('attachment_VAT');
    }
    for ($j = 0; $j < count($cate_arr); $j++) {
        $dropbox = new dropbox();
Ejemplo n.º 3
0
// initial value
while ($pro->next_record()) {
    $apid = $pro->f('product_id');
    $acate = $pro->f('attach_cate_id');
    $order_attach_arr[$apid . $acate] = $pro->f('attach_id');
    $order_price_arr[$apid . $acate] = $pro->f('price');
    $order_quantity_arr[$apid . $acate] = $pro->f('quantity');
}
$pro_order = new products();
$list_id = $pro_order->get_order_productid_list($order_id);
$pro_order->get_buy_products($list_id);
$i = 0;
$ptotal = 0;
$attach_cate = new products();
$attach = new products();
while ($pro_order->next_record()) {
    // price
    $pprice = $pro_order->f('price');
    // product_id
    $pid = $pro_order->f('product_id');
    // attachment_id
    $apid = $pid;
    // product name
    $pname = $pro_order->f('product_name');
    // quantity
    $pquantity = $order_quantity_arr[$apid . '0'];
    $product = array('id' => 0, 'pn' => $pro_order->f('part_number'), 'description' => $pro_order->f('description'), 'uprice' => $pro_order->f('price'), 'quantity' => $pquantity, 'vat' => $pro_order->f('VAT'));
    $productlist[] = $product;
    /*
    $attach->get_order_product($pid);
    if ($attach->num_rows() == 0) {
Ejemplo n.º 4
0
        break;
    case 'add':
        if ((int) $pro->add_category($_POST['category'], $_POST['parent_id'], $_POST['template_id']) == $pro->err_duplicate) {
            alert(sprintf($sc_Duplicate, $sc_category));
        }
        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)) {
            }
            $a = "<a href=\"{$click}\">";
            $aE = '</a>';
        }
    } else {
        $img = $image['emptynode'];
        if ($i == $num && $att_num == 0) {
            $img = $image['emptylastnode'];
        }
        $a = '';
        $aE = '';
    }
    echo "<tr><td nowrap>{$a} {$img} " . $pro->f('category_name') . " {$aE}</td></tr>";
    if (count($exp) > 0) {
        if (in_array($id, $exp)) {
            for ($i2 = 1; $pro2->next_record(); $i2++) {
                $img = $image['emptynode'];
                if ($i2 == $num2) {
                    $img = $image['emptylastnode'];
                }
                $img2 = $image['vertline'];
                if ($i == $num && $att_num == 0) {
                    $img2 = $image['blank'];
                }
                $id = $pro2->f('category_id');
                $click = "javascript:click_txt(document.frmProList,\"list\",document.frmProList.list_id,\"{$id}\",\"\")";
                echo "<tr><td nowrap><a href='{$click}'>{$img2}{$img}" . $pro2->f('category_name') . " </a></td></tr>";
            }
        }
    }
}