Файл: setk/plugins/games/zagon/install.php
Строк: 52
<?
include_once '../../../sys/inc/start.php';
include_once '../../../sys/inc/compress.php';
include_once '../../../sys/inc/sess.php';
include_once '../../../sys/inc/home.php';
include_once '../../../sys/inc/settings.php';
include_once '../../../sys/inc/db_connect.php';
include_once '../../../sys/inc/ipua.php';
include_once '../../../sys/inc/fnc.php';
include_once '../../../sys/inc/adm_check.php';
include_once '../../../sys/inc/user.php';
mysql_query("alter table user add zagon_stat int(11) default '0'");
$q = mysql_query("SELECT DISTINCT zagon.id_user, user.id FROM `user` LEFT JOIN `zagon` ON `zagon`.`id_user` = `user`.`id` WHERE `zagon`.`id_user`");
while ($avtor = mysql_fetch_assoc($q))
{
$ank = get_user($avtor['id']);
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `zagon` WHERE `id_user` = '$ank[id]'"),0);
mysql_query("UPDATE `user` SET `zagon_stat` = '$count' WHERE `id` = '" . $ank['id'] . "'");
echo $ank['nick'] . ' ' . $count . '<br />';
}
echo 'Установка завершена =) удалите файл install.php';
?>