Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
wthmng.php
Go to the documentation of this file.
1 <?php
2 if(!defined('IN_ADMIN')) {
3  exit('Access Denied');
4 }
5 if($mygroup < 3){
6  exit($_ERROR['no_power']);
7 }
8 global $wth,$now;
9 
10 if($chg == 1 && $wth){
11  echo '当前天气修改为:'.$wthinfo[$wth];
12  $weather = $wth;
13  save_gameinfo();
14  adminlog('wthchg',$wth);
15  naddnews($now,'syswthchg',$wth);
16 }else{echo "当前天气:{$wthinfo[$weather]}<br />";}
17 
18 
19 $i=0;$wthlog = '';
20 foreach($wthinfo as $value){
21  $wthlog .= "<input type=\"radio\" name=\"wth\" id=\"$i\" value=\"$i\"><a onclick=sl('$i'); href=\"javascript:void(0);\" >$wthinfo[$i]</a> ";
22  $i++;
23 }
24 
25 
26 echo <<<EOT
27 <form method="post" name="wthmng" onsubmit="admin.php">
28 <input type="hidden" name="mode" value="gamemng">
29 <input type="hidden" name="command" value="wthmng">
30 <input type="hidden" name="chg" value="1">
31 $wthlog <br />
32 <input type="submit" name="submit" value="修改当前天气"></form>
33 EOT;
34 ?>
35 
$wthinfo
Definition: resources_1.php:50
if(!defined('IN_ADMIN')) if($mygroup< 3) global $wth
Definition: wthmng.php:5
$wthlog
Definition: wthmng.php:19
$weather
Definition: gameinfo.php:11
$_ERROR
if(!defined('IN_ADMIN')) if($mygroup< 3) global $now
Definition: wthmng.php:5
value
Definition: 1_alive.tpl.php:10
$i
Definition: wthmng.php:19
adminlog($op, $an1='', $an2='', $an3='')
Definition: admin.php:58
save_gameinfo()