Ejemplo n.º 1
0
$do = $_GET["do"];
if ($ZBK['jifen_vip'] == 1) {
    if (Getvip($_SESSION['usnamese']) < 1) {
        echo "<script>location='u?show=welcome&goto=uaj_s_vip.php'</script>";
        exit;
    }
}
switch ($do) {
    case "submit_task":
        $tknum = intval(trim($_POST["tknum"]));
        //多少个任务
        $tkjf = intval(trim($_POST["tkjf"]));
        //每个任务送多少积分
        $tktitle = trim($_POST["tktitle"]);
        //任务标题
        $tkquestion = reditnmagic($_POST["tkquestion"]);
        //任务描术
        $fedate = $_POST["fedate"];
        //结束日期
        $fetime = $_POST["fetime"];
        //结束时间
        $js_fstime = 60 * 60 * intval($_POST['fetime']);
        $T_jieshu = date('Y-m-d H:i:s', strtotime($fedate) + $js_fstime);
        if ($_SESSION['us_type'] != 2) {
            $arry['id'] = 0;
            //未登录
            $arry['msg'] = "只有商家才有权进行此操作";
            echo json_encode($arry);
            exit;
        }
        if ($_SESSION['usnamese'] == "") {
Ejemplo n.º 2
0
        $createMessage = "商品ID【不能为空】并且【必须是数字】。";
    }
}
if ($dopost == 'create') {
    $num_iid = $_POST["num_iid"];
    $num = intval($_POST["num"]);
    $detail_url = $_POST["detail_url"];
    $title = $_POST["title"];
    $pic_url = $_POST["pic_url"];
    $begin_time = strtotime($_POST["begin_time"]);
    $end_time = strtotime($_POST["end_time"]);
    $price = $_POST["price"];
    $categoryId = $_POST['categoryId'];
    //    $coupon_price = $_POST["coupon_price"];
    $freight_payer = $_POST['freight_payer'];
    $description = reditnmagic($_POST['description']);
    $nick = $_POST['nick'];
    $youhui_link = $_POST['youhui_link'];
    $jifen = intval(trim($_POST['jifen']));
    $sid = 1;
    $create_user_id = $_POST['create_user_id'];
    $xianshi = $_POST['xianshi'];
    $Taoortmall = $_POST['Taoortmall'];
    $ussql = "select id from user where id={$create_user_id}";
    $resultusid = $pdo->query($ussql);
    if (!$resultusid) {
        echo 'aaaaa' . $ussql;
    }
    if ($num_iid == "" || $detail_url == "" || $title == "" || $pic_url == "" || $price == "" || !$resultusid) {
        $createMessage = "请把商品信息填写完整,星号为必填项!!";
    } else {
Ejemplo n.º 3
0
 //商品的淘宝地址
 $taobaoimgurl = $_POST["taobaoimgurl"];
 //商品的图片淘宝地址
 $oldprice = $_POST["oldprice"];
 //原价
 $price = $_POST["price"];
 //白菜价
 $num = $_POST["num"];
 //数量
 $ispostag = $_POST["ispostag"] ? "seller" : "buyer";
 //是否包邮
 $iszhekou = $_POST["iszhekou"] ? $_POST["iszhekou"] : 0;
 //是否折扣
 $isvip = $_POST["isvip"] ? $_POST["isvip"] : 0;
 //是否vip
 $taobaoinfo = reditnmagic($_POST["taobaoinfo"]);
 //商品描述
 $invite = $_POST["invite"];
 //推荐员工id
 if ($_SESSION['us_type'] != 2) {
     $arry['id'] = 0;
     //未登录
     $arry['msg'] = "只有商家才有权进行此操作";
     echo json_encode($arry);
     exit;
 }
 if ($ZBK['cuxiao_vip'] == 1) {
     if (Getvip($_SESSION['usnamese']) < 1) {
         $arry['id'] = 0;
         $arry['msg'] = "只有VIP用户才能参与";
         echo json_encode($arry);
Ejemplo n.º 4
0
$updateMessage = '';
$dopost = isset($_POST['dopost']) ? $_POST['dopost'] : '';
if ($dopost == 'update') {
    $id = $_POST['sid'];
    $nick = $_POST['nick'];
    $detail_url = $_POST['detail_url'];
    $shop_title = $_POST['shop_title'];
    $pic_url = $_POST['pic_url'];
    $promote_id = $_POST['promote_id'];
    $category_id = $_POST['category_id'];
    $description = reditnmagic($_POST['description']);
    $create_user_id = isset($_POST['create_user_id']) ? $_POST['create_user_id'] : 0;
    if ($detail_url == "" || $nick == "" || $pic_url == "" || $pic_url == "") {
        $updateMessage = "请把商品信息填写完整!!";
    } else {
        $description = reditnmagic($description);
        $sql = 'SELECT * FROM `shop` WHERE `nick`="' . $nick . '" AND `id`<>"' . $id . '"';
        $rs = $pdo->query($sql);
        $row = $rs->fetchAll();
        //取得所有记录
        if (count($row) == 0) {
            //修改数据库开始
            $sql = 'UPDATE `shop` SET `nick`="' . $nick . '", `detail_url`="' . $detail_url . '", `shop_title`="' . $shop_title . '", `pic_url`="' . $pic_url . '", `promote_id`="' . $promote_id . '", `create_user_id`="' . $create_user_id . '", `category_id`="' . $category_id . '", `description`="' . $description . '" WHERE `id`="' . $id . '"';
            $result = $pdo->exec($sql);
            if ($result > 0) {
                $updateMessage = "修改成功";
            } else {
                echo $sql;
                $updateMessage = "修改失败";
            }
        } else {
Ejemplo n.º 5
0
 //数量
 $fsdate = $_POST["fsdate"];
 //开始日期
 $fedate = $_POST["fedate"];
 //结束日期
 $fstime = $_POST["fstime"];
 //开始时间
 $fetime = $_POST["fetime"];
 //结束日期
 $fstime = 60 * 60 * intval($_POST['fstime']);
 $fsdate = strtotime($fsdate) + $fstime;
 $fetime = 60 * 60 * intval($_POST['fetime']);
 $fedate = strtotime($fedate) + $fetime;
 $score = $_POST["score"];
 //可用多少积分兑换
 $action_info = reditnmagic($_POST["action_info"]);
 //活动描术
 $a_question = $_POST["a_question"];
 //商家提问
 if ($oldprice < 0 || $taobaoprice < 0 || $hongbao < 0 || $price < 0 || $num < 0) {
     $arry['id'] = 0;
     //未登录
     $arry['msg'] = "市场价,淘宝价、白菜价、数量均不能小于0";
     echo json_encode($arry);
     exit;
 }
 if ($taobaoprice < $price) {
     $arry['id'] = 0;
     //未登录
     $arry['msg'] = "白菜价不能大于店铺价";
     echo json_encode($arry);
Ejemplo n.º 6
0
$title = '';
$keyword = '';
$description = '';
$content = '';
$tag = '';
$promote_id = 0;
$num_iids = '';
$clicks = 0;
$pindao_id = 0;
$dopost = $_POST["dopost"];
if ($dopost == 'create') {
    $category_id = $_POST["category_id"];
    $title = $_POST["title"];
    $keyword = $_POST["keyword"];
    $description = reditnmagic($_POST["description"]);
    $content = reditnmagic($_POST["content"]);
    $tag = $_POST["tag"];
    $promote_id = $_POST["promote_id"];
    $num_iids = $_POST["num_iids"];
    $pindao_id = $_POST["pindao_id"];
    $create_time = $_POST["create_time"] = time();
    $ZhuyaoPic = $_POST['ZhuyaoPic'];
    $suluetu1 = $_POST['suluetu1'];
    $suluetu2 = $_POST['suluetu2'];
    $help_id = $_POST['help_id'];
    $yonghu = $_POST['yonghu'];
    $D_dizhi = $_POST['D_dizhi'];
    $gift_id = $_POST['gift_id'];
    $tiaoyong_id = $_POST['tiaoyong_id'];
    if ($title == "" || $content == "") {
        $createMessage = "请把文章信息填写完整!!";
Ejemplo n.º 7
0
 $begin_time = strtotime($_POST["begin_time"]);
 $end_time = strtotime($_POST["end_time"]);
 $promote_id = $_POST['promote_id'];
 $pindao_id = $_POST['pindao_id'];
 $category_id = $_POST['category_id'];
 $remai_id = intval($_POST["remai_id"]);
 $miaosha_id = intval($_POST["miaosha_id"]);
 $dian_id = intval($_POST["dian_id"]);
 $num = $_POST['num'];
 $nick = $_POST['nick'];
 $description = reditnmagic($_POST['description']);
 $shiyongtype = $_POST['shiyongtype'];
 $create_user_id = intval($_POST['create_user_id']);
 $xianshi = intval($_POST['xianshi']);
 $jifen = trim($_POST['jifen']);
 $diwen = reditnmagic($_POST['diwen']);
 if ($detail_url == "" || $title == "" || $pic_url == "" || $price == "" || $coupon_price == "" || $create_user_id == "") {
     $updateMessage = "请把商品信息填写完整!!";
 } else {
     if (Admintype(3)) {
         $sql = 'UPDATE `shiyong` SET `freight_payer`="' . $freight_payer . '", `detail_url`="' . $detail_url . '", `title`="' . $title . '", `pic_url`="' . $pic_url . '", `jifen`="' . $jifen . '", `price`="' . $price . '", `hs_price`="' . $hs_price . '", `coupon_price`="' . $coupon_price . '",`hongbao`="' . $hongbao . '",`xiadanfangshi`="' . $xiadanfangshi . '",`guanjianci`="' . $guanjianci . '",`kuaidi`="' . $kuaidi . '",`shuxing`="' . $shuxing . '", `begin_time`="' . $begin_time . '", `end_time`="' . $end_time . '", `promote_id`="' . $promote_id . '", `category_id`="' . $category_id . '", `create_user_id`="' . $create_user_id . '", `xianshi`="' . $xianshi . '", `num`="' . $num . '", `pindao_id`="' . $pindao_id . '", `remai_id`="' . $remai_id . '", `miaosha_id`="' . $miaosha_id . '", `shiyongtype`="' . $shiyongtype . '", `dian_id`="' . $dian_id . '", `description`="' . $description . '", `diwen`="' . $diwen . '" WHERE `id`="' . $id . '"';
     } else {
         $sql = 'UPDATE `shiyong` SET `freight_payer`="' . $freight_payer . '", `detail_url`="' . $detail_url . '", `title`="' . $title . '", `pic_url`="' . $pic_url . '", `jifen`="' . $jifen . '", `price`="' . $price . '", `begin_time`="' . $begin_time . '", `end_time`="' . $end_time . '", `promote_id`="' . $promote_id . '", `category_id`="' . $category_id . '", `pindao_id`="' . $pindao_id . '", `remai_id`="' . $remai_id . '", `miaosha_id`="' . $miaosha_id . '", `shiyongtype`="' . $shiyongtype . '", `dian_id`="' . $dian_id . '", `description`="' . $description . '", `diwen`="' . $diwen . '" WHERE `id`="' . $id . '"';
     }
     $result = $pdo->exec($sql);
     if ($result > 0) {
         Useroperatelog($sql, $_SESSION['shadminid'], $_SESSION['shadmin'], 'shiyong', $id);
         $updateMessage = "修改成功";
     } else {
         $updateMessage = "修改失败";
     }
Ejemplo n.º 8
0
	aid : //促销活动的id
*/
$do = $_GET['do'];
switch ($do) {
    //********************************************* 提交·【编辑(修改)促销活动】,返回json
    case "submit_cx":
        $aid = $_POST["aid"];
        //该活动的id
        $title = $_POST['gtitle'];
        $keyword = $_POST['keyword'];
        $description = reditnmagic($_POST['description']);
        $author = $_POST['author'];
        $source = $_POST['source'];
        $suluetu2 = trim($_POST['suluetu2']);
        $goodstype = trim($_POST['goodstype']);
        $content = reditnmagic($_POST['content']);
        if ($_SESSION['usnamese'] == "") {
            $arry['id'] = 114;
            //未登录
            $arry['msg'] = "请先登录再进行操作";
        } else {
            $tyxx = glcpxx($suluetu2);
            if (!empty($suluetu2)) {
                $proxx = Getlmname('id', $tyxx['table'], "id=" . $tyxx['urlid']);
                if (!$proxx['id']) {
                    $arry['id'] = 0;
                    $arry['msg'] = "关联产品地址不正确,如果没有本站的关联产品,请留空";
                    echo json_encode($arry);
                    exit;
                }
            }
Ejemplo n.º 9
0
if ($status == 1) {
    echo 'checked="checked"';
}
?>
/>显示
                        </p></td>
                  </tr>
                    
  
                    
                    <tr>
                        <th>*文章内容:</th>
                        <td>
                          
                          <textarea name="content" style="width:700px;height:200px;visibility:hidden;"><?php 
echo reditnmagic($content);
?>
</textarea>  
                            

                        </td>
                    </tr>
                    <tr>
                        <th>文章标签:</th>
                        <td>
                            <textarea style="width:95%;height: 80px;" name="tag"><?php 
echo $tag;
?>
</textarea>
                        </td>
                    </tr>
Ejemplo n.º 10
0
            $detail_url = $getcon["item"]['detail_url'];
            $description = $getcon["item"]['description'][0];
            $pic_url = $getcon["item"]['pic_url'];
            $createMessage = '采集成功';
        }
    } else {
        $createMessage = "商家昵称不能为空。";
    }
}
if ($dopost == 'create') {
    $nick = isset($_POST['nick']) ? $_POST['nick'] : '';
    $category_id = isset($_POST['category_id']) ? $_POST['category_id'] : 0;
    $detail_url = isset($_POST['detail_url']) ? $_POST['detail_url'] : '';
    $pic_url = isset($_POST['pic_url']) ? $_POST['pic_url'] : '';
    $shop_title = isset($_POST['shop_title']) ? $_POST['shop_title'] : '';
    $description = isset($_POST['description']) ? reditnmagic($_POST['description']) : '';
    $promote_id = isset($_POST['promote_id']) ? $_POST['promote_id'] : 0;
    $sid = $_POST['sid'] == '' ? 0 : $_POST['sid'];
    $create_time = time();
    $create_user_id = isset($_POST['create_user_id']) ? $_POST['create_user_id'] : 0;
    if ($nick == "" || $detail_url == "" || $shop_title == "" || $pic_url == "") {
        $createMessage = "请把商品信息填写完整!!";
    } else {
        $sql = 'select * from shop where nick="' . $nick . '"';
        $rs = $pdo->query($sql);
        $row = $rs->fetchAll();
        //取得所有记录
        if (count($row) == 0) {
            $sql = 'select * from user where id="' . $create_user_id . '"';
            $rs = $pdo->query($sql);
            $row = $rs->fetchAll();