Tokiwa Battle Royale  GE777
A PHP Battle Royale inspired game
 All Data Structures Namespaces Files Functions Variables Pages
end.php
Go to the documentation of this file.
1 <?php
2 
3 define('CURSCRIPT', 'end');
4 
5 require './include/common.inc.php';
6 require './include/game.func.php';
7 if(!$cuser||!$cpass) { gexit($_ERROR['no_login'],__file__,__line__); }
8 $result = $db->query("SELECT * FROM {$tablepre}players WHERE name = '$cuser' AND type = 0");
9 if(!$db->num_rows($result)) { header("Location: index.php");exit(); }
10 
11 $pdata = $db->fetch_array($result);
12 if($pdata['pass'] != $cpass) {
13  $tr = $db->query("SELECT `password` FROM {$tablepre}users WHERE username='$cuser'");
14  $tp = $db->fetch_array($tr);
15  $password = $tp['password'];
16  if($password == $cpass) {
17  $db->query("UPDATE {$tablepre}players SET pass='$password' WHERE name='$cuser'");
18  } else {
19  gexit($_ERROR['wrong_pw'],__file__,__line__);
20  }
21 }
22 
23 extract($pdata);
25 
26 if($hp<=0 || $state>=10) {
27  $result = $db->query("SELECT lastword FROM {$tablepre}users WHERE username='$name'");
28  $motto = $db->result($result,0);
29  $dtime = date("Y年m月d日H时i分s秒",$endtime);
30  if($bid) {
31  $result = $db->query("SELECT name FROM {$tablepre}players WHERE pid='$bid'");
32  if($db->num_rows($result)) { $kname = $db->result($result,0); }
33  }
34 }
35 
36 include template('end');
37 
38 
39 ?>
$endtime
Definition: botservice.php:321
if(!$db->num_rows($result)) $pdata
Definition: end.php:11
$db
Definition: clear.php:32
if(strpos($username,'Yoshiko')!==false) if(preg_match($iplimit, $onlineip)) $password
Definition: login.php:114
$_ERROR
gexit($message= '', $file= '', $line=0)
Definition: global.func.php:30
$cpass
Definition: common.inc.php:207
if(!$cuser||!$cpass) $result
Definition: end.php:8
if(!defined('IN_GAME')) init_playerdata()
Definition: game.func.php:9