Exemple #1
0
         $sql = "select * from qiyu_order where order_id='" . $v . "' and order_type='1' and order_status in(0,1,5) ";
         $result = mysql_query($sql);
         $row = mysql_fetch_assoc($result);
         $order_status = $row['order_status'];
         if (!$row) {
             alertInfo('订单不存在', 'subscribe.php?' . $url, 0);
         } else {
             $sql2 = "update qiyu_order set order_status='2' where order_id=" . $v . " and order_type='1' and order_status in(0,1,5)";
             if (!mysql_query($sql2)) {
                 alertInfo('取消失败,原因SQL出现异常', 'subscribe.php?' . $url, 0);
             }
         }
     }
     $orderContent = "<span class='greenbg redbg'><span><span>取消订单</span></span></span>";
     $orderContent .= "您的订单已取消,给您带来的不便请谅解,我们会更好的为您服务。";
     addOrderType($order, HTMLEncode($orderContent));
     alertInfo('取消成功', 'subscribe.php?' . $url, 0);
     break;
 case 'subsure':
     //批量确认
     $idlist = $_POST['idlist'];
     if (!$idlist) {
         alertInfo('请选择', 'subscribe.php?' . $url, 0);
     }
     foreach ($idlist as $k => $v) {
         $sql = "select * from qiyu_order where order_id='" . $v . "' and order_type='1' and order_status='0'";
         $result = mysql_query($sql);
         $row = mysql_fetch_assoc($result);
         if (!$row) {
             alertInfo('订单不存在', 'subscribe.php?' . $url, 0);
         } else {
Exemple #2
0
<?php

/**
 *  shopadd.php
 */
require_once "usercheck2.php";
$act = $_GET['act'];
switch ($act) {
    case "index":
        $title = sqlReplace($_POST['title']);
        $keywords = HTMLEncode($_POST['keywords']);
        $description = HTMLEncode($_POST['description']);
        $sql = "update " . WIIDBPRE . "_seo set seo_title='" . $title . "',  seo_keywords='" . $keywords . "',seo_description='" . $description . "' where seo_type=1";
        if (!mysql_query($sql)) {
            alertInfo('未知原因保存失败! ', "", 1);
        } else {
            alertInfo('保存成功!', "seo.php", 0);
        }
        break;
}
                 if ($result > $today) {
                     if ($tt > 2) {
                         echo "<option value='" . $result . "'>" . $result . "</option>";
                     }
                     $tt++;
                 }
             } else {
                 echo "<option value='" . $result . "'>" . $result . "</option>";
             }
         }
     }
     break;
 case "addComment":
     $uid = sqlReplace(trim($_POST['uid']));
     $shopID = sqlReplace(trim($_POST['shopid']));
     $content = HTMLEncode(trim($_POST['content']));
     $i = 1;
     if (empty($uid)) {
         //用户名为空
         echo "N";
         exit;
     }
     if (empty($content)) {
         //内容为空
         echo "C";
         exit;
     }
     $sql = "insert into qiyu_comment(comment_user,comment_shop,comment_addtime,comment_content) values (" . $uid . "," . $shopID . ",now(),'" . $content . "')";
     if (mysql_query($sql)) {
         CommentList($shopID, 1);
         $sql2 = "update qiyu_user set user_experience=user_experience+" . expUserComment . " where user_id=" . $uid;
Exemple #4
0
     $intro = HTMLEncode($_POST['content']);
     $sql = "select * from qiyu_order where order_id=" . $id;
     $rs = mysql_query($sql);
     $row = mysql_fetch_assoc($rs);
     if ($row) {
         $order = $row['order_id2'];
         $sql = "update qiyu_order set order_infor='" . $intro . "',order_status='6' where order_id=" . $id;
         mysql_query($sql);
         //添加订单记录
         addOrderType($order, '你的订单被修改,修改内容为:' . $intro);
         $str = "S";
     }
     break;
 case "addOrderText":
     $id = sqlReplace(trim($_POST['id']));
     $intro = HTMLEncode($_POST['content']);
     $sql = "select * from qiyu_order where order_id=" . $id;
     $rs = mysql_query($sql);
     $row = mysql_fetch_assoc($rs);
     if ($row) {
         $order = $row['order_id2'];
         $sql = "update qiyu_order set order_text='" . $intro . "',order_status='6' where order_id=" . $id;
         mysql_query($sql);
         //添加订单记录
         //addOrderType($order,'你的订单被修改,修改内容为:'.$intro);
         $str = "S";
     }
     break;
 case "excel":
     require_once 'excel_writer/Writer.php';
     $workbook = new Spreadsheet_Excel_Writer('shopexcel/shop' . $QIYU_ID_SHOP . '.xls');
Exemple #5
0
switch ($act) {
    case "base":
        $name = sqlReplace(trim($_POST['name']));
        $address = sqlReplace(trim($_POST['address']));
        if ($address == '请输入你的店铺地址如**路**号') {
            $address = '';
        }
        $tel = sqlReplace(trim($_POST['tel']));
        $opentime = sqlReplace(trim($_POST['opentime']));
        $endtime = sqlReplace(trim($_POST['endtime']));
        $mainfood = sqlReplace(trim($_POST['mainfood']));
        $discount = empty($_POST['discount']) ? '0.00' : sqlReplace(trim($_POST['discount']));
        //折扣
        $buycount = empty($_POST['buycount']) ? '0' : sqlReplace(trim($_POST['buycount']));
        //购买总数
        $intro = HTMLEncode(trim($_POST['intro']));
        if ($intro == '200字以内') {
            $intro = '';
        }
        checkData($name, '餐厅名称', 1);
        checkData($address, '餐厅地址', 1);
        checkData($tel, '餐厅电话', 1);
        checkData($opentime, '餐厅营业开始时间', 1);
        checkData($endtime, '餐厅营业结束时间', 1);
        checkData($mainfood, '餐厅主营食物', 1);
        checkData($intro, '餐厅介绍', 1);
        $sql = "update qiyu_shop set shop_discount='" . $discount . "',shop_buycount='" . $buycount . "',shop_name='" . $name . "',shop_address='" . $address . "',shop_tel='" . $tel . "',shop_openstarttime='" . $opentime . "',shop_openendtime='" . $endtime . "',shop_intro='" . $intro . "',shop_status='1',shop_addtime=now(),shop_mainfood='" . $mainfood . "',shop_type='1' where shop_id=" . $QIYU_ID_SHOP;
        if (mysql_query($sql)) {
            alertInfo("编辑成功", "", 1);
            Header("Location: shopadd.php");
        } else {
Exemple #6
0
<?php

/**
 *  userorder.php  购物车
 */
require_once "usercheck.php";
//echo '<pre>';print_R($_POST);
$shopID = sqlReplace(trim($_GET['shopID']));
$userSpot = empty($_POST['spotID']) ? '0' : sqlReplace(trim($_POST['spotID']));
$shopSpot = empty($_GET['shopSpot']) ? '0' : sqlReplace(trim($_GET['shopSpot']));
$shopCircle = empty($_GET['circleID']) ? '0' : sqlReplace(trim($_GET['circleID']));
$orderType = empty($_GET['ordertype']) ? '' : sqlReplace(trim($_GET['ordertype']));
$orderGroup = empty($_GET['groupID']) ? '' : sqlReplace(trim($_GET['groupID']));
$time1 = empty($_POST['time1']) ? '' : sqlReplace($_POST['time1']);
$time2 = empty($_POST['time2']) ? '' : sqlReplace($_POST['time2']);
$orderDesc = empty($_POST['desc']) ? '' : HTMLEncode($_POST['desc']);
if (!empty($userSpot)) {
    $shopSpot = $userSpot;
}
if (!empty($_SESSION['qiyu_orderType'])) {
    if ($orderType != $_SESSION['qiyu_orderType']) {
        $_SESSION['qiyu_orderType'] = $orderType;
    } else {
        $orderType = $_SESSION['qiyu_orderType'];
    }
} else {
    $_SESSION['qiyu_orderType'] = $orderType;
}
if (!empty($_SESSION['qiyu_orderGroup'])) {
    if ($_SESSION['qiyu_orderGroup'] != $orderGroup) {
        $_SESSION['qiyu_orderGroup'] = $orderGroup;