-
Notifications
You must be signed in to change notification settings - Fork 11
/
gambling.php
32 lines (23 loc) · 917 Bytes
/
gambling.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
define('CURSCRIPT', 'gambling');
require './include/common.inc.php';
$gbinfo = '';
if(!$cuser||!$cpass) { $gbinfo .= $_ERROR['no_login']; }
elseif($gamestate < 20) { $gbinfo .= $_ERROR['no_start']; }
elseif($gamestate < 30) { $gbinfo .= '游戏还未停止激活,不可进行下注!'; }
else{
$result = $db->query("SELECT * FROM {$gtablepre}users WHERE username='$cuser'");
if(!$db->num_rows($result)) { $gbinfo .= $_ERROR['login_check']; }
$udata = $db->fetch_array($result);
if($udata['password'] != $cpass) { $gbinfo .= $_ERROR['wrong_pw']; }
if($udata['groupid'] <= 0) { $gbinfo .= $_ERROR['user_ban']; }
}
include template('alivelist');
$alivedata['innerHTML']['alivelist'] = ob_get_contents();
if(isset($error)){$alivedata['innerHTML']['error'] = $error;}
ob_clean();
$jgamedata = compatible_json_encode($alivedata);
echo $jgamedata;
ob_end_flush();
//include template('alive');
?>