game/cron_dungeon_save.php

42 lines
1.7 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?php
//die('<27><><EFBFBD>-<2D><> <20><><EFBFBD> <20><> <20><><EFBFBD>...');
function getIP() {
if(isset($_SERVER['HTTP_X_REAL_IP'])) return $_SERVER['HTTP_X_REAL_IP'];
return $_SERVER['REMOTE_ADDR'];
}
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP
function getIPblock() {
if(isset($_SERVER['HTTP_X_REAL_IP'])) return $_SERVER['HTTP_X_REAL_IP'];
return $_SERVER['REMOTE_ADDR'];
}
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
/*if( $_SERVER['HTTP_CF_CONNECTING_IP'] != $_SERVER['SERVER_ADDR'] && $_SERVER['HTTP_CF_CONNECTING_IP'] != '127.0.0.1' ) { die('Hello pussy!'); }
if(getIPblock() != $_SERVER['SERVER_ADDR'] && getIPblock() != '127.0.0.1' && getIPblock() != '' && getIPblock() != '5.187.7.71') {
die(getIPblock().'<br>'.$_SERVER['SERVER_ADDR']);
}*/
define('GAME',true);
include('_incl_data/__config.php');
include('_incl_data/class/__db_connect.php');
include('_incl_data/class/__user.php');
function e($t) {
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #'.date('d.m.Y').' %'.date('H:i:s').' (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>): <b>'.mysql_real_escape_string($t).'</b>","capitalcity","LEL","6","1","-1")');
}
$sp = mysql_query('SELECT `u`.*,`s`.*,`u`.`id`,`s`.`id` FROM `users` AS `u` LEFT JOIN `stats` AS `s` ON ( `s`.`id` = `u`.`id` AND `s`.`bot` = 0 ) WHERE `login` = "Crowley"');
while($pl = mysql_fetch_array($sp)) {
$last_dnow = mysql_fetch_array(mysql_query('SELECT * FROM `save_dungeon` WHERE `uid` = "'.$pl['id'].'"'));
if(isset($last_dnow['id'])) {
mysql_query('UPDATE `users` SET `room` = "405" WHERE `id` = "'.$last_dnow['uid'].'"');
mysql_query('UPDATE `stats` SET `dnow` = "'.$last_dnow['dnow'].'",`x` = "'.$last_dnow['x'].'",`y` = "'.$last_dnow['y'].'" WHERE `id` = "'.$last_dnow['uid'].'"');
}
}
?>