forked from Madmunus/AntiCombats
-
Notifications
You must be signed in to change notification settings - Fork 0
/
refresh.php
48 lines (41 loc) · 1.43 KB
/
refresh.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?
session_start();
define('AntiBK', true);
include("engline/config.php");
include("engline/dbsimple/Generic.php");
include("engline/functions/functions.php");
$guid = getGuid();
$adb = DbSimple_Generic::connect($database['adb']);
$adb->query("SET NAMES ? ",$database['db_encoding']);
$adb->setErrorHandler("databaseErrorHandler");
$char = Char::initialization($guid, $adb);
$char->test->Guid();
$char->test->Zayavka();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Refresh" content="10; url=refresh.php">
<link rel="StyleSheet" href="styles/style.css" type="text/css">
<script src="scripts/jquery.js" type="text/javascript"></script>
</head>
<body topmargin="0">
<?
$char_db = $char->getChar('char_db', 'login', 'room', 'city', 'battle', 'battle_opponent');
ArrToVar($char_db);
if ($battle)
{
echo "<script>$('#mes', parent.msg.document).append('$_SESSION[battle_ref]<br>');</script>";
if ($battle_opponent && !$_SESSION['battle_ref'])
{
//print "<script>top.main.location.reload()</script>";
$_SESSION['battle_ref'] = 1;
}
}
/*---------------------Проверки ip-------------------------*/
$ip = $adb->selectCell("SELECT `ip` FROM `online` WHERE `guid` = ?d", $guid) or die ("<script>top.main.location.href = 'main.php?action=exit';</script>");
if ($ip != $_SERVER['REMOTE_ADDR'])
die ("<script>top.main.location.href = 'main.php?action=exit';</script>");
?>
</body>
</html>