public static function getInstance() { if (self::$instance == null) { self::$instance = new UtilsProvider(); } return self::$instance; }
$user_name = $_POST['user_name']; $is_forbid = $_POST['is_forbid']; $ban_date = $_POST['forbid_date']; $server = $_POST['server']; $forbid_date = 0; if ($ban_date != 0) { $forbid_date = strtotime($ban_date); } echo json_encode(UtilsProvider::mentodsForbidPlayer($user_name, $is_forbid, $forbid_date, $server)); break; case "forbidbyid": //禁登 $user_id = $_POST['user_id']; $server = $_POST['server']; $forbid_date = strtotime(date('Y-m-d', strtotime('200 day'))); echo json_encode(UtilsProvider::mentodsForbidPlayerbyId($user_id, $forbid_date, $server)); break; case "gameinstructor": //指导员身份设置 $user_name = $_POST['user_name']; $type = $_POST['type']; $instructor_type = $_POST['instructor_type']; $start_stamp = $_POST['start_stamp']; if ($start_stamp == 1) { $start_stamp = time(); } else { $start_stamp = strtotime($start_stamp); } $end_stamp = $_POST['end_stamp']; if ($end_stamp == 1) { $end_stamp = time();
echo json_encode(UtilsProvider::dataMentods_GetBulletinList($startTime, $ednTime, $area)); break; case "bulletinServerInfo": //依据公告ID 得到此公告发送的服信息 $bulletinId = $_POST['bulletinId']; echo json_encode(UtilsProvider::dataMentods_GetBulletinServerInfoByBulletinId($bulletinId)); break; case "reSendingAllbulletin": //全部同步不更新内容 $bulletinId = $_POST['bulletinId']; echo json_encode(UtilsProvider::dataMentods_updateBulletin($bulletinId, 1, "", "", "", "", "")); break; case "newBulletinUpdate": //修改公告 $bulletinId = $_POST['bulletinId']; $startTime = strtotime($_POST['startTime']); $endTime = strtotime($_POST['endTime']); $desc = $_POST['desc']; $interval = $_POST['interval']; echo json_encode(UtilsProvider::dataMentods_updateBulletin($bulletinId, 2, "", $startTime, $endTime, $interval, $desc)); break; case "newBulletinDelete": $bulletinId = $_POST['bulletinId']; echo json_encode(UtilsProvider::dataMentods_updateBulletin($bulletinId, 3, "", "", "", "", "")); break; case "newBulletinDeleteone": $bulletinId = $_POST['bulletinId']; $server = $_POST['server']; echo json_encode(UtilsProvider::dataMentods_updateBulletin($bulletinId, 4, $server, "", "", "", "")); break; }
require_once DATACONTROL . '/BMAccount/EventLog.php'; require_once 'UtilsProvider.php'; $cardSN = ''; $userName = ''; $ip = ''; $serverId = 0; if (isset($_GET['cardSN']) && isset($_GET['userName']) && isset($_GET['ip']) && isset($_GET['serverId'])) { $cardSN = $_GET['cardSN']; $userName = $_GET['userName']; $ip = $_GET['ip']; $serverId = $_GET['serverId']; $sql = sprintf("CALL CheckCard('%s','%s','%s',%d);", $cardSN, $userName, $ip, $serverId); $r = sql_fetch_one_cell($sql); } else { $r = 0; } if ($r > 0) { $result = UtilsProvider::dataMentods_sendCardItem($r, $userName, $serverId); if ($result->Success) { $sql = sprintf("CALL ChargeCard('%s','%s','%s',%d);", $cardSN, $userName, $ip, $serverId); $r = sql_fetch_one_cell($sql); echo 1; } else { $sql = sprintf("CALL BreakCard('%s','%s',%d);", $cardSN, $userName, $serverId); $r = sql_fetch_one_cell($sql); echo 0; //echo json_encode($result); } } else { echo 0; }