Example #1
0
            $temp = explode('|__|', $v);
            if ($temp[2] != NULL && $temp[2] != '') {
                $shopping_car->addpro($temp[0], $temp[1], false, $temp[2]);
            } else {
                $shopping_car->addpro($temp[0], $temp[1]);
            }
        }
    }
    unset($_SESSION["temp_shopping_car"]);
    unset($_SESSION["addoth_login_tmp"]);
    //-記憶路徑判斷
    //--其他類的產品暫存加入
    //unset($_SESSION["temp_other_shopping_car"]);//-刪除暫存記憶
}
//---針對會員型別進行折扣輸入設定
if ($member->getinfo()) {
    $temp_memeber_type = $conn->GetRow("select * from " . PREFIX . "data_list where type='memberdesh' and new_type='" . $member->getinfo("type") . "'");
    if ($temp_memeber_type) {
        $shopping_car->deshprice(dequotes($temp_memeber_type["detail"], -1));
    }
}
//--紅利設定 (多少換1)
//$shopping_car->set_point(1);
//-結帳資料
if ($_POST && $_REQUEST['submit']) {
    //--自訂訂單編號
    $shopping_car->order_auto_set('JSP');
    $pay_bill = $shopping_car->paybill($_POST);
    if (!$pay_bill) {
        alert('付款結帳失敗!!' . $shopping_car->erromsg, '?list=1');
        exit;
Example #2
0
}
//## 購物車
$shopping_car = new order($console->conn, PREFIX . "shopping_car", PREFIX . "shopping_car_list", PREFIX . "products");
$no_check = array('login', 'fotgot', 'join', 'open', 'net_login');
if (!$member->status() && !in_array($act, $no_check)) {
    //linkto($console->_j_web_set['main_path']."/member/login");
    exit;
}
//--社群按鈕
$data["twitterurl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/twitter/twitterapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
$data["yahoourl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/openid/yahooapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
$data["fburl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/openid/fbapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
$data["googleurl"] = '//' . $_SERVER['HTTP_HOST'] . '/includes/googleapi/googleapi.php?callback=' . urlencode('//' . $_SERVER['HTTP_HOST'] . '/member/net_login');
switch ($act) {
    case "detail":
        $_SESSION["member_info"]["member"] = $member->getinfo();
        //--級別
        $temp = $console->conn->GetRow("select * from " . PREFIX . "data_list where type='memberdesh' and new_type='" . $_SESSION["member_info"]["member"]["type"] . "'");
        $_SESSION["member_info"]["member"]["type_html"] = $temp["name"];
        if ($_POST) {
            unset($_POST["account"]);
            if ($member->update($_POST)) {
                alert($console->tags('UPDATE_SURE'), $console->_j_web_set['main_path'] . "/member/detail");
                // 修改成功!!
                exit;
            }
        }
        break;
    case "cpw":
        if ($_POST) {
            //--判斷有新密碼 以及  (舊密碼等於會員中的資料 或者 不需要判別資料)