2022-06-06 21:30:34 +00:00
|
|
|
|
<?php
|
|
|
|
|
|
2022-08-25 11:23:36 +00:00
|
|
|
|
const GAME = true;
|
2022-06-06 21:30:34 +00:00
|
|
|
|
setlocale(LC_CTYPE ,"ru_RU.CP1251");
|
|
|
|
|
include('/home/newcom1/public_html/_incl_data/class/__db_connect.php');
|
|
|
|
|
|
|
|
|
|
$sp = mysql_query('SELECT * FROM `stats` WHERE `priemslot` > 10');
|
|
|
|
|
while( $pl = mysql_fetch_array($sp) ) {
|
|
|
|
|
$test = mysql_fetch_array(mysql_query('SELECT * FROM `rep` WHERE `id` = "'.$pl['id'].'" LIMIT 1'));
|
|
|
|
|
$userst = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['id'].'" LIMIT 1'));
|
2022-08-25 11:23:36 +00:00
|
|
|
|
$kolvo = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `actions` WHERE `uid` ="'.$pl['id'].'" AND `vars` ="read"'));
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$overtop=$pl['priemslot']-10-$test['add_slot']-($kolvo['COUNT(*)']+1);
|
|
|
|
|
$overtopkorrect=$pl['priemslot']-10-$test['add_slot'];
|
2022-08-25 11:23:36 +00:00
|
|
|
|
$prevish = $overtop > 8 ? $overtop - 8 : 0;
|
|
|
|
|
if ($overtopkorrect>8){$overtopkorrect=8;}
|
2022-06-06 21:30:34 +00:00
|
|
|
|
$resultslot= 10 + $test['add_slot'] + $overtopkorrect;
|
|
|
|
|
if($overtop>0)
|
2022-08-25 11:23:36 +00:00
|
|
|
|
{
|
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
echo "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!! <20><><EFBFBD>:".$userst['login']." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:".$pl['priemslot']." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>:".$resultslot." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:".$test['add_slot']." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>:".$kolvo['COUNT(*)']." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:".$overtop." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:".$prevish." <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:".$overtopkorrect."<br>";
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
mysql_query('UPDATE `stats` SET `priemslot` = "'.$resultslot.'" WHERE `id` = "'.$pl['id'].'"');
|
|
|
|
|
mysql_query('DELETE FROM `actions` WHERE `uid` = "'.$pl['id'].'" AND `vars` = "read" ');
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
if($overtopkorrect==5){$overtopkorrect=6;}
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
|
|
|
|
if ($overtopkorrect==1)
|
2022-06-06 21:30:34 +00:00
|
|
|
|
{
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1044")');
|
|
|
|
|
}
|
|
|
|
|
elseif ($overtopkorrect==2)
|
|
|
|
|
{
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1044")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1045")');
|
|
|
|
|
}
|
|
|
|
|
elseif ($overtopkorrect==3)
|
|
|
|
|
{
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1044")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1045")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1046")');
|
|
|
|
|
}
|
|
|
|
|
elseif ($overtopkorrect==4)
|
|
|
|
|
{
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1044")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1045")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1046")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1047")');
|
|
|
|
|
}
|
|
|
|
|
elseif ($overtopkorrect==6)
|
|
|
|
|
{
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1044")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1045")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1046")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1047")');
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","4811")');
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
elseif ($overtopkorrect==7)
|
|
|
|
|
{
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1044")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1045")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1046")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1047")');
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","4811")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","4812")');
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
elseif ($overtopkorrect==8)
|
|
|
|
|
{
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1044")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1045")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1046")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","1047")');
|
2022-08-25 11:23:36 +00:00
|
|
|
|
|
|
|
|
|
|
2022-06-06 21:30:34 +00:00
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","4811")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","4812")');
|
|
|
|
|
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `vals`) VALUES ("'.$pl['id'].'","'.time().'","capitalcity","10","read","4813")');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-25 11:23:36 +00:00
|
|
|
|
echo "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!! <20><><EFBFBD>:".$userst['login']." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:".$resultslot." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:".$test['add_slot']." <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>:".$overtopkorrect."<br>";
|
|
|
|
|
}
|
|
|
|
|
}
|