public function add() { $cart = new Buys(); $cart->mDb = $this->mDb; $cart->mProd = $this->mProd; $cart->addCart($_GET["pid"], $_GET["pamount"], $_GET["buytype"]); Header("Location: /" . $_GET["lang"] . "/user/cart.html"); }
public function defshow() { $this->checkUserLogin(); if ($_POST["selected"]) { $cart = new Buys(); $cart->mDb = $this->mDb; $cart->mProd = $this->mProd; foreach ($_POST["selected"] as $id) { $cart->addCart($id, 1); $this->mClient->delFavorite($_SESSION["login_user"]["id"], $id); } Header("Location: /" . $_GET["lang"] . "/user/cart.html"); } include _APP_PATH . "libs/adodb/adodb-pager1.inc.php"; $r = $this->mClient->getFavoriteList($_SESSION["login_user"]["id"]); $this->result["logs"] = $r["logs"]; $this->result["pages"] = $r["pages"]; $this->tplname = "cn/favorites"; $this->result["sites"]["pagetitle"] = "会员中心--" . $this->result["sites"]["sitename"]; $this->result["sites"]["current"]["title"] = "会员中心"; $this->result["sites"]["current"]["url"] = "user/"; $this->result["sites"]["favorites"] = "current"; }