Файл: forum/topic-file.php
Строк: 33
<?
include_once('../apahe/ini.php');
$forum_f = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum-f` WHERE `id` = '".int($_GET['id'])."'"));
$urlup='/forum/index';
$inc['title'] = 'Форум - управление файлами';
include_once('../apahe/top.php');
if (!isset($apache)){
header ('location: /input.dll');
exit;
}
if (!$forum_f){
header ('location: /forum/index.dll');
exit;
}
$forum = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum` WHERE `id` = '".int($forum_f['id-forum'])."'"));
$forum_r = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum-r` WHERE `id` = '".int($forum_f['id-forum-r'])."'"));
$forum_u = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum-u` WHERE `id` = '".int($forum_f['id-forum-u'])."'"));
$forum_m = mysql_fetch_assoc(mysql_query("SELECT * FROM `forum-m` WHERE `id` = '".int($forum_f['id-forum-m'])."'"));
switch ($_GET['selest']){
default:
break;
case 'loading':
mysql_query("UPDATE `forum-f` SET `count` = `count`+1 WHERE `id` = '".int($forum_f['id'])."'");
header('Location: /forum/file/f'.int($forum_f['id']).'_'.$forum_f['file']);
break;
case 'delete':
if ($apache['level']>=1){
unlink('file/f'.int($forum_f['id']).'_'.$forum_f['file']);
mysql_query("DELETE FROM `forum-f` WHERE `id` = '".int($forum_f['id'])."'");
header('Location: /forum/topic-'.int($forum_u['id']).'.dll');
}else{
header('Location: /forum/topic-'.int($forum_u['id']).'.dll');
}
break;
}
include_once('../apahe/bottom.php');
?>