// mylog(); $request = sendTemplateMsg($inf['c_id'], $template_key_express, 'http://m.kuaidi100.com/index_all.html?type=' . $inf['express_id'] . '&postid=' . $inf['express_order'], $templateArray); mylog($request); } mylog(); header('location: index.php?orders=1'); exit; } if (isset($_GET['start_promotions'])) { pdoInsert('promotions_tbl', array('g_id' => $_GET['g_id'], 'd_id' => $_GET['d_id'])); 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; } //公众号操作
break; } $data = array(); $query = pdoQuery('promotions_view', null, null, $preWhere); foreach ($query as $row) { $date[] = array('id' => $row['id'], 'd_id' => $row['d_id'], 'name' => $row['name'], 'category' => $row['category'], 'sale' => $row['sale'], 'price' => $row['price'], 'start_time' => date("Y-m-d\\TH:i:s", strtotime($row['start_time'])), 'end_time' => date("Y-m-d\\TH:i:s", strtotime($row['end_time']))); } $json = json_encode($date); // mylog($json); echo $json; exit; } if (isset($_POST['switch_ad'])) { // $inf=pdoUpdate('g_inf_tbl',array('on_ad'=>"on_ad+1"),array('id'=>$_POST['ad_g_id'])); $sqlstr = 'update g_inf_tbl set on_ad=on_ad+1 where id=' . $_POST['ad_g_id']; $inf = exeNew($sqlstr); echo $inf; exit; } if (isset($_POST['getOrderDetail'])) { $query = pdoQuery('user_order_view', null, array('o_id' => $_POST['o_id']), ''); foreach ($query as $row) { $detail[] = $row; } echo json_encode($detail); } if (isset($_POST['changeCateHome'])) { $configPath = $GLOBALS['mypath'] . '/mobile/config/config.json'; pdoUpdate('category_tbl', array('remark' => $_POST['stu']), array('id' => $_POST['id'])); $query = pdoQuery('category_tbl', array('count(*) as num'), array('remark' => 'home'), null); $num = $query->fetch();
<?php include_once '../includePackage.php'; session_start(); if (isset($_SESSION['login'])) { if (isset($_GET['delimg'])) { unlink('../' . $_GET['delimg']); $sql = 'DELETE FROM g_image_tbl WHERE url="' . $_GET['delimg'] . '"'; // $pdo->exec($sql); exeNew($sql); $g_id = $_GET['g_id']; header('location:index.php?goods-config=1&g_id=' . $g_id); exit; } if (isset($_GET['name'])) { echo $_GET['name']; exit; } }