Вход Регистрация
Файл: strongtop7topstrongtop.php
Строк: 25
<?php
define
('NTOP'1);
require_once (
'system/connect.php');
require_once (
'system/core.php');
require_once (
'system/function.php');
$saits mysql_query("SELECT * FROM `".$prefix."sait`");


while(
$row mysql_fetch_array($saits)){
$all_hosts $row['all_hosts']+$row['hosts'];
$all_hits $row['all_hits']+$row['hits'];
$all_out $row['all_out']+$row['out'];
$all_in $row['all_in']+$row['in'];


$up3 mysql_query("UPDATE `".$prefix."sait` SET `of_in` = '".$row['in']."', `of_out` = '".$row['out']."' WHERE `id` = '".$row['id']."'");
$up mysql_query("UPDATE `".$prefix."sait` SET `of_hosts` = '".$row['hosts']."', `of_hits` = '".$row['hits']."', `of_in` = '".$row['in']."', `of_out` = '".$row['out']."' WHERE `id` = '".$row['id']."'");

$update mysql_query("UPDATE `".$prefix."sait` SET `hosts` = '0', `hits` = '0', `in` = '0', `out` = '0'");
mysql_query("TRUNCATE TABLE `".$prefix."hits`");
mysql_query("TRUNCATE TABLE `".$prefix."hosts`");
mysql_query("TRUNCATE TABLE `".$prefix."go`");
mysql_query("TRUNCATE TABLE `".$prefix."sait_online`");
mysql_query("OPTIMIZE TABLE  `".$prefix."sait_online`");
mysql_query("OPTIMIZE TABLE  `".$prefix."go`");
mysql_query("OPTIMIZE TABLE  `".$prefix."hits`");
mysql_query("OPTIMIZE TABLE  `".$prefix."hosts`");
mysql_query("OPTIMIZE TABLE  `".$prefix."reputation`");
mysql_query("OPTIMIZE TABLE  `".$prefix."sait`");
mysql_query("OPTIMIZE TABLE  `".$prefix."users`");
}
$log "Top Update: ".data(time())."rn";
$fp fopen("top_log.ntop""a");
fwrite($fp$log);
fclose($fp);
?>
Онлайн: 0
Реклама