game/cron_h.php

78 lines
3.1 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');
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","ENERGY STAR","6","1","-1")');
}
function send_chat($type,$from,$text,$time) {
mysql_query('INSERT INTO `chat` (`text`,`city`,`login`,`to`,`type`,`new`,`time`,`room`) VALUES ("'.mysql_real_escape_string($text).'","capitalcity","'.mysql_real_escape_string($from).'","","'.$type.'","1","'.mysql_real_escape_string($time).'","3")');
}
/* <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> */
function many_start() {
$qtext = '';
$atext = '';
$msec = 120;
$lmvc = array();
$lmv = mysql_query('SELECT `id` FROM `aaa_many` WHERE `time` < "'.(time()-86400).'" ORDER BY `time` ASC');
while( $plmv = mysql_fetch_array($lmv) ) {
$lmvc[] = $plmv['id'];
}
$lmvc = $lmvc[rand(0,(count($lmvc)-1))];
$lmv = mysql_fetch_array(mysql_query('SELECT * FROM `aaa_many` WHERE `id` = "'.$lmvc.'" LIMIT 1'));
if( isset($lmv['id']) ) {
$qtext = $lmv['text'];
$atext = $lmv['answer'];
mysql_query('UPDATE `aaa_many` SET `time` = "'.time().'" WHERE `id` = "'.$lmv['id'].'" LIMIT 1');
}
if( $qtext != '' ) {
$qtext = str_replace('"','&quot;',$qtext);
$qtext = str_replace("'",'&quot;',$qtext);
$qtext = str_replace('<','&lt;',$qtext);
$qtext = str_replace('>','&gt;',$qtext);
$qtext = str_replace('
',' ',$qtext);
$qtext = str_replace("\r",' ',$qtext);
$qtext = str_replace('<27>','c',$qtext);
$qtext = str_replace('<27>','x',$qtext);
$qtext = str_replace('<27>','y',$qtext);
$qtext = str_replace('<27>','e',$qtext);
$qtext = str_replace('<27>','o',$qtext);
$qtext = str_replace('<27>','p',$qtext);
$qtext = str_replace('<27>','u',$qtext);
mysql_query('UPDATE `users` SET `online` = "'.time().'" WHERE `id` = 1003553 LIMIT 1');
send_chat(1,'<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>','<font color=#cb0000><b><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!</b> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> '.$msec.' <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <b>to [<5B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>]</b>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <b>'.$qtext.'</b></font>',time());
mysql_query('INSERT INTO `aaa_many_now` (`qid`,`time`) VALUES ("'.$lmv['id'].'","'.(time()+$msec).'")');
send_chat(1,'<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>','<font color=red><3E><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>: <b>'.$atext.'</b></font>.',-(time()+$msec));
}
}
many_start();
?>