$id = $_GET["id"]; //当前记录ID if ($action == "add") { $im = $_GET["im"]; //输入方式 1=搜索,2=条码,3=选择 $addnum = $_GET["addnum"]; //条码输入时,增加的数量 addProduct($productId, $im, $addnum); //增加新产品 } else { if ($action == "empty") { clearProduct($rowid); //清空列表 } else { if ($action == "del") { delProduct($id); //删除产品 } else { if ($action == "updatePrice") { $price = $_GET["price"]; updateProductPrice($id, $price); //更新产品价格 } else { if ($action == "updateAmount") { $amount = $_GET["amount"]; updateProductAmount($id, $amount); //更新产品数量 } else { if ($action == "updateZhekou") { $zhekou = $_GET["zhekou"]; updateProductZhekou($id, $zhekou);
echo "now work {$section}=='categories , this part not work"; exit; mosRedirect("index.php?option=categories&extension=com_booklibrary"); break; case "add": // for 1.6 task='add' instead 'new' as in 1.5 editBook($option, 0); break; case "edit": editBook($option, array_pop($bid)); break; case "show_all": unsetCatId(); break; case "Delproduct": delProduct($bid); showBooks($option); break; case "Addproduct": addProduct($bid, $option); break; case "refetchInfos": refetchInfo($option, $bid); break; case "apply": case "save": saveBook($option, $task); break; case "remove": removeBooks($bid, $option); break;
<?php require_once 'functions.php'; $action = strip_tags($_GET["action"]); switch ($action) { case "changeQuantity": changeQuantity($_GET['id'], $_GET['val'], $_GET['price']); break; case "addToCart": addToCart($_GET['id'], $_GET['price']); break; case "getCart": getCart(); break; case "del": delProduct($_GET['id']); break; case "complite": complite(); break; }