Beispiel #1
0
     foreach ($car as $k => $v) {
         $pro_aray[] = $v["id"];
     }
     $temp = $conn->GetRow("select * from " . PREFIX . "products where id in(" . implode(',', $pro_aray) . ") and close_ezship=1");
     if ($temp) {
         $data["close_ezship"] = 1;
     }
 }
 $order = $shopping_car->car();
 $active = $shopping_car->active_list();
 //--會員自動判斷是否升級
 $check_total = 0;
 if ($member->getinfo('type') != 'vip' || strtotime($member->getinfo('mode_time')) <= strtotime(date('Y-m-d H:i:s'))) {
     //--判斷不是VIP或者時間已到
     $shopping_car = new order($conn, PREFIX . "shopping_car", PREFIX . "shopping_car_list", PREFIX . "products");
     $order_list = $shopping_car->order_list("pay_status=1 and status=1 and create_date>='" . $member->getinfo('mode_time') . "'");
     if ($order_list) {
         foreach ($order_list as $k => $v) {
             $check_total += $v['total'] * 1;
         }
     }
     //--
     $vip_m = $conn->GetRow("select * from " . PREFIX . "data_list where type='memberdesh' and new_type='vip' and status=1");
     if ($vip_m) {
         if ($check_total >= $vip_m['memo'] * 1 && $vip_m['memo'] * 1 > 0) {
             $indata["type"] = $vip_m['new_type'];
             $indata["mode_time"] = date('Y-m-d H:i:s', strtotime('+1 year'));
         } else {
             $indata['type'] = 'member';
         }
         $member->update($indata);
Beispiel #2
0
             $_POST["account"] = $_POST["email"];
         }
         $backdata = $member->newjoin($_POST);
         if (is_array($backdata)) {
             alert($console->tags('CREATE_ACCOUNT_SURE'), $console->_j_web_set['main_path'] . "/member/detail");
             exit;
             //帳號申請成功
         } else {
             alert($backdata, "-1");
             exit;
         }
     }
     break;
 case "order":
     $data["mount"] = $mount = 10;
     $data["orderlist"] = $shopping_car->order_list(NULL, ($_GET["page"] * 1 - 1) * $mount, $mount);
     $cousql = $shopping_car->order_list();
     $data["page"] = page_show($cousql, $mount);
     if ($data["orderlist"]) {
         foreach ($data["orderlist"] as $k => $v) {
             $data["orderlist"][$k]["update_date"] = date("Y-m-d", strtotime($v["update_date"]));
             switch ($v["pay_status"]) {
                 case "1":
                     switch ($v["cargo_status"]) {
                         case "1":
                             $data["orderlist"][$k]["status_html"] = '已出貨';
                             break;
                         default:
                             $data["orderlist"][$k]["status_html"] = '出貨中';
                             break;
                     }