$phone = $_POST['phone']; $fax = $_POST['fax']; $sale_date = date_to_db_date($_POST['sale_date']); $valid_date = date_to_db_date($_POST['valid_date']); $_SESSION['cart']->remove($_POST['txt_id']); case 'new': if ($_SESSION['cart']->itemcount() == 0) { goURL('index.php'); } $pitems = $_SESSION['cart']->items; $pro->get_buy_products($_SESSION['cart']->get_productid_list()); require 'templates/edit_order.tmp.php'; break; case 'delete_detail': if ($pro->delete_product_from_order($_POST['order_number'], $_POST['txt_id'])) { $pro->get_orders(); require 'templates/list_order.tmp.php'; break; } $_POST['id'] = $_POST['order_number']; case 'edit': $pro->get_entire_order($_POST['id'], $order); 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'); $order_discount_arr[$apid . $acate] = $pro->f('discount'); $order_VAT_arr[$apid . $acate] = $pro->f('VAT'); }