67 lines
1.7 KiB
PHP
67 lines
1.7 KiB
PHP
<?php
|
|
/*
|
|
|
|
ßäðî äëÿ îáðàáîòêè äàííûõ.
|
|
Îáðàáîòêà ïîåäèíêîâ, îáðàáîòêà çàÿâîê, îáðàáîòêà áîòîâ, îáðàáîòêà ïåùåð, îáðàáîòêà òóðíèðîâ, îáðàáîòêà âðåìåííûõ ãåíåðàöèé
|
|
|
|
*/
|
|
|
|
const GAME = true;
|
|
require_once('_incl_data/__config.php');
|
|
require_once('_incl_data/class/__db_connect.php');
|
|
|
|
if (UserIp::get() != $_SERVER['SERVER_ADDR'] && UserIp::get() != '127.0.0.1' && UserIp::get() != '' && UserIp::get(
|
|
) != '5.187.7.71' && !isset($_GET['test'])) {
|
|
die(UserIp::get() . '<br>' . $_SERVER['SERVER_ADDR']);
|
|
}
|
|
|
|
|
|
function e($t)
|
|
{
|
|
mysql_query(
|
|
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date(
|
|
'H:i:s'
|
|
) . ' (Êðèòè÷åñêàÿ îøèáêà): <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","LEL","6","1","-1")'
|
|
);
|
|
}
|
|
|
|
$count = [
|
|
0, //çàâåðøåííûõ ïîåäèíêîâ
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
0,
|
|
];
|
|
|
|
function clear_user($plid)
|
|
{
|
|
mysql_query('UPDATE `users` SET `login` = "delete",`login2` = `login` WHERE `id` = ' . $plid);
|
|
}
|
|
|
|
function inuser_go_btl($id)
|
|
{
|
|
if (isset($id['id'])) {
|
|
echo file_get_contents(
|
|
'https://new-combats.com/jx/battle/refresh.php?uid=' . $id['id'] . '&cron_core=' . md5(
|
|
$id['id'] . '_brfCOreW@!_' . $id['pass']
|
|
) . '&pass=' . $id['pass']
|
|
);
|
|
echo '<hr>';
|
|
}
|
|
}
|
|
|
|
/* ñ÷èòàåì ïîåäèíêè */
|
|
//e('îáðàáîòêà îòìåíåíà.');
|
|
$i = 0;
|
|
while ($i < 3) {
|
|
$sp = mysql_query(
|
|
'SELECT `id`,`time_start` FROM `battle` WHERE `team_win` = "-1" AND `time_over` = "0" AND `type` = 329 LIMIT 100'
|
|
);
|
|
while ($pl = mysql_fetch_array($sp)) {
|
|
$user1 = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `battle` = "' . $pl['id'] . '" LIMIT 1'));
|
|
inuser_go_btl($user1);
|
|
}
|
|
$i++;
|
|
}
|