Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
gambling.php
Go to the documentation of this file.
1 <?php
2 
3 define('CURSCRIPT', 'gambling');
4 
5 require './include/common.inc.php';
6 
7 $gbinfo = '';
8 if(!$cuser||!$cpass) { $gbinfo .= $_ERROR['no_login']; }
9 elseif($gamestate < 20) { $gbinfo .= $_ERROR['no_start']; }
10 elseif($gamestate < 30) { $gbinfo .= '游戏还未停止激活,不可进行下注!'; }
11 else{
12  $result = $db->query("SELECT * FROM {$tablepre}users WHERE username='$cuser'");
13  if(!$db->num_rows($result)) { $gbinfo .= $_ERROR['login_check']; }
14  $udata = $db->fetch_array($result);
15  if($udata['password'] != $cpass) { $gbinfo .= $_ERROR['wrong_pw']; }
16  if($udata['groupid'] <= 0) { $gbinfo .= $_ERROR['user_ban']; }
17 }
18 
19 
20 
21 include template('alivelist');
22  $alivedata['innerHTML']['alivelist'] = ob_get_contents();
23  if(isset($error)){$alivedata['innerHTML']['error'] = $error;}
24  ob_clean();
26  echo $jgamedata;
27  ob_end_flush();
28 
29 
30 //include template('alive');
31 
32 ?>
$alivedata['innerHTML']['alivelist']
Definition: gambling.php:22
if(!$db->num_rows($result)) $udata
Definition: gambling.php:14
$jgamedata
Definition: gambling.php:25
$db
Definition: clear.php:32
【生存者数:<?php echo $alivenum?> 人】< input type="button"value="显示全部幸存者"onClick="$('alivemode').value='all';$('gbmode').value='none';postCmd('alive','alive.php');"></p > if($gamblingon &&$gamestate >=20) elseif($gamblingon &&$gamestate<=10)
Definition: 1_alive.tpl.php:18
$error
Definition: errorpage.php:2
$_ERROR
$gamestate
Definition: gameinfo.php:4
$gbinfo
Definition: gambling.php:7
if(!$cuser||!$cpass) $result
Definition: admin.php:25
$cpass
Definition: common.inc.php:207
compatible_json_encode($data)