game/myexp.php

35 lines
980 B
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?php
function GetRealIp()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) {
return $_SERVER['HTTP_CLIENT_IP'];
} elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
return $_SERVER['HTTP_X_FORWARDED_FOR'];
}
return $_SERVER['REMOTE_ADDR'];
2022-06-06 21:30:34 +00:00
}
function var_info($vars, $d = false)
{
2022-06-06 21:30:34 +00:00
echo "<pre style='border: 1px solid gray;border-radius: 5px;padding: 3px 6px;background: #cecece;color: black;font-family: Arial;font-size: 12px;'>\n";
var_dump($vars);
echo "</pre>\n";
if ($d) {
exit();
}
2022-06-06 21:30:34 +00:00
}
define('IP', GetRealIp());
2022-06-06 21:30:34 +00:00
include('_incl_data/__config.php');
const GAME = true;
2022-06-06 21:30:34 +00:00
include('_incl_data/class/__db_connect.php');
$u = User::start();
2022-06-06 21:30:34 +00:00
if (isset($u->info['id'])) {
$sp = mysql_query('SELECT * FROM `battle_last` WHERE `uid` = "' . $u->info['id'] . '" ORDER BY `id` DESC');
while ($pl = mysql_fetch_array($sp)) {
echo '<27><><EFBFBD> <20> ' . $pl['battle_id'] . ' , <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>: ' . $pl['exp'] . '<br>';
}
2022-06-06 21:30:34 +00:00
}