Example #1
0
 public function CheckOut()
 {
     $cart = new Buys();
     $cart->mDb = $this->mDb;
     $cart->mProd = $this->mProd;
     $mycart = $cart->checkCart();
     if (!$mycart) {
         Header("Location: /" . $_GET["lang"] . "/user/cart.html");
     } else {
         Header("Location: /" . $_GET["lang"] . "/user/CheckOut.html");
     }
 }
Example #2
0
 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";
 }