$introduceInfo = addslashes($_POST['introduceInfo']); $select = "select name from mall where id='{$mall_id}'"; $result = mysql_query($select); $row = mysql_fetch_array($result); $mall_name = $row['name']; $time = time(); $insert = "insert into shop(name,detail,mall_id,mall_name,time) \n\tvalues('{$name}','{$introduceInfo}','{$mall_id}','{$mall_name}','{$time}')"; if (mysql_query($insert)) { $shop_id = mysql_insert_id(); //print_r($_POST["pics"]); for ($i = 0; $i < count($_POST["pics"]); ++$i) { $pics = $_POST["pics"][$i]; $insert_shop_pic = "insert into shop_pictures(shop_id,pic_url,time) values('{$shop_id}','{$_POST['pics'][$i]}','{$time}')"; mysql_query($insert_shop_pic); if ($i == 0) { $pic_id = mysql_insert_id(); $update = "update shop set picid={$pic_id} where id={$shop_id}"; mysql_query($update); } } $content = "Added a shop, shop name is" . $name . ", store Numbers is" . $shop_id . ", and belongs to shopping is" . $mall_name . ",shop's profile" . $introduceInfo; if (add_system_log($content)) { echo "<script>alert('Add successful!');window.location.href='check_shop.php';</script>"; } else { echo "<script>alert('Add failure,please add again!');window.location.href='check_shop.php';</script>"; } } else { echo "<script>alert('Add failure,please add again!');window.location.href='check_shop.php';</script>"; echo mysql_error(); } //print_r($_POST);
<?php require "../../conn/conn.php"; require "../system_manage/add_system_log.php"; //$sql="delete from floorManage" $id = $_POST["id"]; $sql = "delete from super_floorManage where id={$id}"; if (mysql_query($sql)) { $content = "删除了超市楼层,楼层编号为" . $id; if (add_system_log($content) == 1) { echo "删除成功"; //echo $content; } else { echo "删除失败"; //echo "<script>alert('修改失败!');window.location.href='edit_manage_account.php';</script>"; //echo $content; //echo add_system_log($content); } //echo"删除成功"; } else { echo "删除失败"; }
<?php require_once '../../conn/conn.php'; require "../system_manage/add_system_log.php"; $shop_id = $_POST['shop_id']; $delete_shop = "delete from shop where id={$shop_id}"; $delete_shop_goods = "delete from goods where shop_id={$shop_id}"; $delete_info = "delete from goods_pictures where goods_id={$goods_id}"; $sql = "select name from shop where id={$shop_id}"; $result = mysql_query($sql); $row = mysql_fetch_array($result); $name = $row["name"]; if (mysql_query($delete_shop) && mysql_query($delete_shop_goods)) { $conn = "删除了店铺:{$name}"; if (add_system_log($conn)) { echo 1; } else { echo "-1"; } } else { echo "-1"; }
<?php require "../../conn/conn.php"; require "../system_manage/add_system_log.php"; //print_r($_POST); //echo "11"; $keyword = $_POST["floor_name"]; $weight = trim($_POST["weight"]); if (empty($weight)) { $weight = 1; } $time = time(); $role = $_SESSION["mall_id"]; $sql = "insert into keyword_manage(keyword,weight,time,role) values('{$keyword}',{$weight},{$time},{$role})"; $content = "添加了一个关键词,关键词名字" . $keyword; if (mysql_query($sql) && add_system_log($content) == 1) { $url = "keyword_manage.php"; echo "<script>alert('添加成功!');window.location.href='" . $url . "';</script>"; } else { $url = "add_keyword.php"; echo "<script>alert('添加失败,请重新添加!');window.location.href='" . $url . "';</script>"; } //echo $sql; //echo $content;
echo json_encode(array('status' => 1, 'data' => $data, 'constr' => $conStr, 'headStr' => '此分类下 总计: ' . $total . '个订单')); } else { echo json_encode(array('status' => 0)); exit; } } else { if ($action == 'delete') { if (isset($_POST['id'])) { $id = $_POST['id']; } else { exit(json_encode(array('status' => 0))); } $sql = "delete from {$tableName} where id=" . $id; if (mysql_query($sql)) { echo json_encode(array('status' => 1)); add_system_log('删除了订单 ID=' . $id); } else { echo json_encode(array('status' => 0)); } } else { if ($action == 'changeStatus') { if (isset($_POST['id'])) { $id = $_POST['id']; } else { exit(json_encode(array('status' => 0))); } $sql = "select ordstatus,mall_id,shop_id from {$tableName} where id={$id}"; $res = mysql_fetch_row(mysql_query($sql)); if ($res[1] != $mallId || $res[2] != 0) { exit(json_encode(array('status' => 0))); }
exit(json_encode(array('status' => 1))); add_system_log('修改' . $id . '的提现状态'); } else { exit(json_encode(array('status' => 0))); } } exit(json_encode(array('status' => 1))); add_system_log('修改' . $id . '的提现状态'); } else { echo json_encode(array('status' => 0)); } } else { if ($action == 'reDrow') { if (isset($_POST['id'])) { $id = $_POST['id']; } else { exit(json_encode(array('status' => 0))); } $sql = "select status,withdrawMoney,mallId from {$tableName} where id = {$id} "; $res = mysql_fetch_row(mysql_query($sql)); $sql = "update {$tableName} set status = 4 where id=" . $id; if (mysql_query($sql)) { mysql_query('update mall set useMoney = useMoney +' . $res[1] . ' where id=' . $res[2]); echo json_encode(array('status' => 1)); add_system_log('驳回了' . $id . '的提现请求'); } else { echo json_encode(array('status' => 0)); } } } }
$content = isset($_POST['content']) ? $_POST['content'] : 0; $sql = 'select catId from msgModule where id=' . $id; $res = mysql_fetch_row(mysql_query($sql)); if ($res[0] == 0) { $content = strip_tags($content); } $sql = 'update msgModule set msgContext = "' . addslashes($content) . '" where id=' . $id; if (mysql_query($sql)) { echo json_encode(array('status' => 1)); add_system_log('修改了模板id' . $_POST['id']); } else { echo mysql_error(); echo json_encode(array('status' => 0)); } } else { if ($action == 'use') { $id = isset($_POST['id']) ? $_POST['id'] : 0; $sql = 'select isUse from msgModule where id=' . $id; $res = mysql_fetch_array(mysql_query($sql)); $end = intval(!$res[0]); $sql = 'update msgModule set isUse = ' . $end . ' where id=' . $id; if (mysql_query($sql)) { add_system_log('修改了模板id' . $_POST['id']); echo json_encode(array('status' => 1, 'state' => $end)); } else { echo mysql_error(); echo json_encode(array('status' => 0)); } } } }