Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
infomng.php
Go to the documentation of this file.
1 <?php
2 if(!defined('IN_ADMIN')) {
3  exit('Access Denied');
4 }
5 if($mygroup < 2){
6  exit($_ERROR['no_power']);
7 }
8 
9 
10 require_once GAME_ROOT.'./include/system.func.php';
11 
12 $result = $db->query("SELECT pid FROM {$tablepre}players WHERE type=0");
13 $validnum = $db->num_rows($result);
14 
15 $result = $db->query("SELECT pid FROM {$tablepre}players WHERE hp>0 AND type=0");
16 $alivenum = $db->num_rows($result);
17 
18 $result = $db->query("SELECT pid FROM {$tablepre}players WHERE hp<=0 OR state>=10");
19 $deathnum = $db->num_rows($result);
20 
21 movehtm();
22 
24 
25 adminlog('infomng');
26 echo "状态更新:激活人数 {$validnum},生存人数 {$alivenum},死亡人数 {$deathnum}<br>";
27 echo "已重置移动地点缓存数据";
28 ?>
$deathnum
Definition: infomng.php:19
$validnum
Definition: infomng.php:13
movehtm($atime=0)
$db
Definition: clear.php:32
const GAME_ROOT
Definition: clear.php:6
$result
Definition: infomng.php:12
$_ERROR
$alivenum
Definition: infomng.php:16
adminlog($op, $an1='', $an2='', $an3='')
Definition: admin.php:58
save_gameinfo()