Ejemplo n.º 1
0
         }
     }
     $query = pdoQuery('order_tbl', null, $where, '');
     $list = array();
     foreach ($query as $row) {
         $list[] = array('id' => $row['id'], 'stu' => getOrderStu($row['stu']));
     }
     echo json_encode($list);
 }
 if (isset($_POST['addToFav'])) {
     pdoInsert('favorite_tbl', array('c_id' => $_SESSION['customerId'], 'g_id' => $_POST['g_id']), 'ignore');
     echo 'ok';
     exit;
 }
 if (isset($_POST['deletFav'])) {
     pdoDelete('favorite_tbl', array('g_id' => $_POST['g_id'], 'c_id' => $_SESSION['customerId']));
     echo 'ok';
     exit;
 }
 if (isset($_POST['changePart'])) {
     if ($_POST['mode'] == 'true') {
         unset($_SESSION['buyNow']['partsList'][$_POST['part_id']]);
     } else {
         $_SESSION['buyNow']['partsList'][$_POST['part_id']] = $_POST['number'];
     }
     mylog(getArrayInf($_SESSION['buyNow']['partsList']));
     echo 'ok';
     exit;
 }
 if (isset($_POST['buyNow'])) {
     //        pdoQuery('g_inf_tbl',null,array('sc_id'=>'5','id'=>array('4','5')),null);
Ejemplo n.º 2
0
     header('location: index.php?promotions=1');
     exit;
 }
 if (isset($_GET['delete_promotions'])) {
     $str = 'delete from promotions_tbl where d_id=' . $_GET['d_id'];
     exeNew($str);
     header('location: index.php?promotions=1');
     exit;
 }
 if (isset($_GET['del_detail_id'])) {
     $query = pdoQuery('user_order_view', array('count(*) as num'), array('d_id' => $_GET['del_detail_id']), ' ');
     $value = $query->fetch();
     if ($value['num'] > 0) {
         echo 'cannot delete';
     } else {
         pdoDelete('g_detail_tbl', array('id' => $_GET['del_detail_id']));
         header('location:index.php?goods-config=1&g_id=' . $_GET['g_id']);
     }
     exit;
 }
 //公众号操作
 if (isset($_GET['wechat'])) {
     include_once '../wechat/serveManager.php';
     if (isset($_GET['createButton'])) {
         createButtonTemp();
         exit;
     }
     if (isset($_GET['sendTemplateMsg'])) {
         //            mylog($re);
         exit;
     }
Ejemplo n.º 3
0
        exit;
    }
    if (isset($_POST['del_g_img'])) {
        $urlquery = pdoQuery('g_image_tbl', array('url'), array('g_id' => $_POST['g_id'], 'remark' => $_POST['md5']), 'limit 1');
        $url = $urlquery->fetch();
        pdoDelete('g_image_tbl', array('g_id' => $_POST['g_id'], 'remark' => $_POST['md5']));
        $query = pdoQuery('g_image_tbl', array('id'), array('remark' => $_POST['md5']), ' limit 1');
        if (!$query->fetch()) {
            unlink('../' . $url['url']);
        }
        echo 'ok';
        exit;
    }
    if (isset($_POST['del_front_img'])) {
        $query = pdoQuery('ad_tbl', array('img_url'), array('id' => $_POST['id']), null);
        $row = $query->fetch();
        pdoDelete('ad_tbl', array('id' => $_POST['id']));
        unlink('../' . $row['img_url']);
        echo 'ok';
        exit;
    }
    if (isset($_POST['change_part_stu'])) {
        pdoUpdate('part_tbl', array('dft_check' => $_POST['value']), array('id' => $_POST['id']));
        echo $_POST['value'];
        exit;
    }
    if (isset($_POST['manageReview'])) {
        $id = pdoUpdate('review_tbl', array('priority' => $_POST['priority'], 'public' => $_POST['public']), array('id' => $_POST['id']));
        echo $id;
    }
}
Ejemplo n.º 4
0
                 }
             }
             if (0 == $readyInsert[$row['d_id']]['number']) {
                 unset($readyInsert[$row['d_id']]);
             }
         }
         if ($readyInsert == null) {
             header('location:index.php');
             exit;
         }
         pdoInsert('order_tbl', array('id' => $orderId, 'c_id' => $_SESSION['customerId'], 'a_id' => $_GET['addrId'], 'total_fee' => $total_fee, 'customer_remark' => $_SESSION['customer_remark']));
         pdoBatchInsert('order_detail_tbl', $readyInsert);
         if ('buy_now' == $to) {
             unset($_SESSION['buyNow']);
         } else {
             pdoDelete('cart_tbl', array('c_id' => $_SESSION['customerId']));
         }
         $orderStu = 0;
         include 'view/order_inf.html.php';
     } else {
         header('location:controller.php?editAddress=1&from=' . $to);
     }
     exit;
 }
 if (isset($_GET['pay_order'])) {
     $orderId = $_GET['order_id'];
     $orderStu = $_GET['order_stu'];
     include 'view/order_inf.html.php';
     exit;
 }
 if (isset($_GET['preOrderOK'])) {