game/cron/battle_dell.php

33 lines
1.3 KiB
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?php
const GAME = true;
2022-06-06 21:30:34 +00:00
include('/home/newcom1/public_html/_incl_data/class/__db_connect.php');
//11. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
$test = 0;
while ($test == 0) {
2022-06-06 21:30:34 +00:00
$tbtl = mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `team_win`=-1 ORDER BY `id` LIMIT 1'));
echo "<EFBFBD><EFBFBD><EFBFBD>: ";
echo $tbtl['id'] . "<br>";
if (isset($tbtl['id'])) {
sleep(2);
} else {
mysql_query('UPDATE `users` SET `battle` = 0 WHERE `battle` > 0');
mysql_query(
'LOCK TABLES `battle_act` WRITE,`battle_end` WRITE,`battle_last` WRITE,`battle_out` WRITE,`battle_stat` WRITE,`battle_users` WRITE,`battle` WRITE,`battle_logs` WRITE,`battle_logs_save` WRITE,`zayvki` WRITE'
);
mysql_query('TRUNCATE TABLE `battle_act`');
mysql_query('TRUNCATE TABLE `battle_end`');
mysql_query('TRUNCATE TABLE `battle_last`');
mysql_query('TRUNCATE TABLE `battle_out`');
mysql_query('TRUNCATE TABLE `battle_stat`');
mysql_query('TRUNCATE TABLE `battle_users`');
mysql_query('TRUNCATE TABLE `battle`');
mysql_query('TRUNCATE TABLE `battle_logs`');
mysql_query('TRUNCATE TABLE `battle_logs_save`');
mysql_query('TRUNCATE TABLE `zayvki`');
mysql_query('UNLOCK TABLES');
2022-06-06 21:30:34 +00:00
$test = 1;
}
}