<?php require_once "common.inc.php"; header("Content-type: text/html; charset=utf-8"); $mod = $_GET[mod]; $id = $_G["id"]; $name = $_G["manager_name"]; require_once "wechat_MySqlConn.php"; require_once "wechatLoop.php"; $wechatObj = new wechatFlow(); if ($mod) { switch ($mod) { case "modified": $password = md5($_POST["manager_password"]); $ifexsit = ifexsit($id, $password); if ($ifexsit == 0) { echo "1"; } else { $post = array(); $post["manager_password"] = md5($_POST["new_password"]); $id = $wechatObj->updateWithArray($post, "rel_manager", $id); if (is_numeric($id)) { echo $wechatObj->return_json(0, $id); } else { echo $wechatObj->return_json(72056, $id); } } break; } exit; } function ifexsit($id, $password)
return -1; } } if ($mod) { switch ($mod) { case "modified": //$id = $wechatObj->insertWithArray($_POST, "pro_info"); if (is_numeric($id)) { echo $wechatObj->return_json(0, $id); } else { echo $wechatObj->return_json(72056, $id); } break; case "save": $pro_name = $_POST["pro_name"]; $ifexsit = ifexsit($uid, $pro_name); if ($ifexsit < 0) { $id = $wechatObj->insertWithArray($_POST, "pro_info"); } else { $id = $wechatObj->updateWithArray($_POST, "pro_info", $ifexsit); } if (is_numeric($id)) { echo $wechatObj->return_json(0, $id); } else { echo $wechatObj->return_json(72056, $id); } break; } exit; } $sql = "select * from pro_info where uid='" . $uid . "' and scores > 0";