Файл: public_html/cron_71b682d7a8bf77511d5d66bf3a23275d/updateTrip.php
Строк: 23
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
$connect = array('localhost', 'cd90484_lasthero', '112233', 'cd90484_lasthero');
$base = $db = new mysqli($connect['0'], $connect['1'], $connect['2'], $connect['3']);
$base -> query("SET NAMES 'UTF8'");
if($base -> connect_errno) die('ERROR -> '.$base -> connect_error);
$usersss = $db->query("SELECT * FROM `users`");
while($usss = $usersss->fetch_object())
{
if($usss->campaign_count < 3) $db->query("UPDATE `users` SET `campaign_count` = `campaign_count` + '1' WHERE `id` = '".$usss->id."'");
}
//запуск каждые 4 часа