Файл: apanel_count.php
Строк: 15
<?php
// mod Gemorroj
//error_reporting(0);
set_time_limit(99999);
ignore_user_abort(true);
//ob_end_flush();
ob_implicit_flush(1);
$act = htmlspecialchars($_GET['act']);
require 'moduls/config.php';
require 'moduls/header.php';
$HeadTime = microtime(true);
if ($_SESSION['autorise'] != $setup['password'] || $_SESSION['ipu'] != $_SERVER['REMOTE_ADDR']) {
error($setup['hackmess']);
}
////////////////////////////
switch($act){
default:
break;
case'vendor':
// получаем все файлы
$res = mysql_query('SELECT DISTINCT `vendor` FROM `files` WHERE `dir` = "0" AND `fileid` = "0" AND `hidden` = "0" AND `vendor` != ""', $mysql);
$view='';
while ($file = mysql_fetch_row($res)) {
$view.= $file[0].':|:'.mysql_result(mysql_query("SELECT COUNT(`vendor`) FROM `files` WHERE `vendor`='".$file[0]."'",$mysql),0).':||:';
}
file_put_contents('moduls/cache/vendors.dat',$view);
mysql_query('OPTIMIZE TABLE `files`', $mysql);
break;
}
echo '<div class="row">База данных успешно обновлена!</div><div class="foot"><a href="apanel.php">Админка</a> |</div>';
require 'moduls/foot.php';
?>