2 if(!defined(
'IN_ADMIN')) {
6 require_once
GAME_ROOT.
'./include/system.func.php';
8 if($command ==
'kill'){
15 if (!is_numeric($timelimit)){
16 $cmd_info .=
'时间间隔错误!<br>';
18 }
elseif($timelimit < $antiAFKintv) {
19 $cmd_info .=
'时间间隔太短,可能波及正常玩家。';
22 $cmd_info .=
'将杀死: '.$timelimit.
' 分钟内没有任何行动的玩家。<br>';
25 $deadline=$now-$timelimit;
26 $result = $db->query(
"SELECT * FROM {$tablepre}players WHERE type=0 AND endtime < '$deadline' AND hp>'0' AND state<'10'");
27 while($al = $db->fetch_array(
$result)) {
28 $afkerlist[$al[
'pid']]=Array(
'name' => $al[
'name'] ,
'pls' => $al[
'pls']);
31 if(!$afkerlist){$cmd_info .=
'没有符合条件的角色。';
return;}
32 foreach($afkerlist as $kid => $kcontent){
33 $db->query(
"UPDATE {$tablepre}players SET hp='0',state='32' WHERE pid='$kid' AND type='0' AND hp>'0' AND state<'10'");
34 if($db->affected_rows()){
36 $cmd_info .=
'角色 '.$kcontent[
'name'].
' 被杀死。<br>';
37 addnews($now,
'death32',$kcontent[
'name'],
'',$kcontent[
'pls']);
42 $cmd_info .=
'无法杀死角色 '.$kcontent[
'name'].
' 。<br>';
51 <form method=
"post" name=
"antiAFKmng" onsubmit=
"admin.php">
52 <input type=
"hidden" name=
"mode" value=
"antiAFKmng">
53 <input type=
"hidden" name=
"command" value=
"kill">
54 杀死<input type=
"text" name=
"timelimit" value=
"$antiAFKintv" size=
"4" maxlength=
"4">分钟内没有行动的玩家。<br>
55 <input type=
"submit" value=
"挂机党都去死吧!"><br>
while($gm=$db->fetch_array($result)) $cmd_info
if($command== 'kill') kill_all_AFKer($timelimit=1)
addnews($t=0, $n= '', $a='', $b='', $c= '', $d= '', $e= '')
【生存者数:<?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)
if(!$cuser||!$cpass) $result
adminlog($op, $an1='', $an2='', $an3='')