<?php

require '../system/start.php';
require '../system/functions.php';
function dirsize($dir) {
if (empty($allsize)){$allsize = 0;}
if ($path = opendir($dir)) {
while ($file_name = readdir($path)) {
if (($file_name!=='.') && ($file_name!=='..')){
if (is_dir($dir."/".$file_name)) {$allsize +=dirsize($dir."/".$file_name);} else { $allsize += filesize($dir."/".$file_name);}
}}
closedir ($path);
}
return $allsize;
}
switch($act)
{
default:
$str['mesto'] = 'Зона Обмена';
$str['block'] = $set['site'].' / Зона Обмена';
include '../style/'.$style.'/head.php';
$zona = mysql_result(mysql_query("select count(*) from `users` where `where` = 'Зона Обмена' and time > ".(time()-300).""),0);
echo '<div class="where">
<img class="ico" src="../style/'.$style.'/ico/love.gif" alt="" />
<a href="index.php?act=search">Поиск файлов</a><br/>
<img class="ico" src="../style/'.$style.'/ico/load.gif" width="12" height="12" alt="" />
<a href="add.php">Добавить файл</a><br/>
</div>';
echo '<div class="where"> <a href="index.php?act=top&amp;order=new">Новые</a> (<span style="color:#ff0000">+'.mysql_result(mysql_query("select count(*) from `files_files` where `time` > ".(time()-86400).""),0).'</span>) |
	 <a href="index.php?act=top&amp;order=down">Скачиваемые</a> |
	<a href="index.php?act=top&amp;order=rate">Рейтинговые</a></div>';
$query = mysql_query("select * from `files_sel`");
if(mysql_num_rows($query) == 0)
{
    echo '<div class="forum1">Разделы еще не созданы!</div>';
}
else
{
    while ($row = mysql_fetch_assoc($query))
    {
        $i++;
        if($i%2)
        {
            echo '<div class="forum1">';
        }
        else
        {
            echo '<div class="forum2">';
        }
        $result = mysql_result(mysql_query("select count(*) from `files_files` where `id_sel` = ".$row['id'].""),0);
        echo '<img class="ico" src="../style/'.$style.'/ico/folder.png" alt="" /> <a href="index.php?act=sel&amp;id='.$row['id'].'">'.$row['title'].'</a> ('.$result.')';
        if(!empty($row['des']))
        {
            echo '<div class="ftext">'.$row['des'].'</div>';
        }
        echo '</div>';
    }
    $result = mysql_result(mysql_query("select count(*) from `files_files`"),0);
    echo '<div class="where">
&raquo; Всего <b>'.$result.number($result,array(' </b>файл',' </b>файла',' </b>файлов')).'</b>!<br />
&raquo; Общий размер: '.size(dirsize('files')).' <br/>';
echo '&raquo; <a href="/forum/topic.php?id=37">Техподержка</a>';
echo '</div>';
if ($user)
{
echo '<div class="where">В Зоне Обмена '.$zona.' человек</div>';
}
echo '<div class="on2">
Модераторы: ';

$r = mysql_query("SELECT * FROM `users` WHERE `level` = '4'");
$num = mysql_num_rows($r);
$i = 1;
while ($e = mysql_fetch_assoc($r)) {
	if ($i < $num)
		echo $e['login'] . ',';
	if ($i == $num)
		echo $e['login'];
	$i++;
}
if ($num == 0)
	echo 'Модераторов нет';
echo '</div>';
echo '<div class="where"><a href="index.php?act=pravila"><font color="#ff0000"><b>Правила обменика!</b></font></a></div>';
break;
}
case 'pravila';
$str['mesto'] = 'Правила';
$str['block'] = $set['site'].' / Правила';
include '../style/'.$style.'/head.php';
echo '<div class="where">';
echo '
<b>
1. Запрещено добавлять файл порнографического характера<br/>
2. Модер всегда прав! Будет банить беспощадно<br/>
</b>
Bнимaниe! 
3дecь coдepжaтcя зaгpyжeнныe пoльзoвaтeлями фaйлы, кoтopыe мoгyт coдepжaть виpycы или вpeднoноcныe пpoгpaммы, a тaкжe мaтepиaлы для взpocлыx. 
Aдминиcтpaция caйтa нe нeceт oтвeтcтвeннocти зa иcпoльзoвaниe вaми дaннoгo paздeлa';
echo '</div>';
echo '<div class="where"><img class="ico" src="../style/'.$style.'/ico/newpost.png" alt="" /> <a href="index.php">назад</a></div>';
break;

case 'sel':
$query = mysql_fetch_assoc(mysql_query("select * from `files_sel` where `id` = ".int($_GET['id']).""));
$str['mesto'] = ''.$query['title'].'';
$str['block'] = ''.$set['site'].'';
include '../style/'.$style.'/head.php';
echo '<div class="where"><a href="index.php">Зона Обмена</a> / '.$query['title'].'</div>';
$q = mysql_query("select * from `files_usel` where `id_sel` = ".$query['id']." order by `id` limit ".$page.",".$set['str']."");
$total = mysql_result(mysql_query("select count(*) from `files_usel` where `id_sel` = ".$query['id'].""),0);
if($total == 0)
{
   echo '<div class="forum1">Подразделы еще не созданы!</div>';
}
else
{
    while ($row = mysql_fetch_assoc($q))
    {
        $i++;
        if($i%2)
        {
            echo '<div class="forum1">';
        }
        else
        {
            echo '<div class="forum2">';
        }
        $result = mysql_result(mysql_query("select count(*) from `files_files` where `id_usel` = ".$row['id'].""),0);
        echo '<img class="ico" src="../style/'.$style.'/ico/folder.png" alt="" /> <a href="index.php?act=usel&amp;id='.$row['id'].'">'.$row['title'].'</a> ['.$result.']';
        if(!empty($row['des']))
        {
            echo '<div class="ftext">'.$row['des'].'</div>';
        }
        echo '</div>';
    }
}
if($total > $set['str'])
{
    pages($page, $total, 'index.php?act=sel&amp;id='.$query['id'].'&amp;', $set['str']);
}
echo '<div class="where"><img class="ico" src="../style/'.$style.'/ico/newpost.png" alt="" /> <a href="index.php">Назад</a></div>';
break;
case 'usel':
$q = mysql_fetch_assoc(mysql_query("select * from `files_usel` where `id` = ".int($_GET['id']).""));
$query = mysql_fetch_assoc(mysql_query("select * from `files_sel` where `id` = ".$q['id_sel'].""));
$zapros = mysql_query("select * from `files_files` where `id_usel` = ".$q['id']." order by `id` limit ".$page.",".$set['str']."");
$total = mysql_result(mysql_query("select count(*) from `files_files` where `id_usel` = ".$q['id'].""),0);
$sort = trim($_GET['sort']);

if (!$sort)
	$sortirovka = 'title';
if ($sort == 'name')
	$sortirovka = 'title';
if ($sort == 'date')
	$sortirovka = 'time';
if ($sort == 'reit')
	$sortirovka = 'rate';
if ($sort == 'down')
	$sortirovka = 'down';

$zapros = mysql_query("SELECT * FROM `files_files` WHERE `id_usel` = ".$q['id']." ORDER by `" . $sortirovka . "` LIMIT ".$page.",".$set['str']."");

$str['mesto'] = ''.$q['title'].'';
$str['block'] = $set['site'].' / <a href="index.php">Зона Обмена</a>';
include '../style/'.$style.'/head.php';
echo '<div class="where">'.$query['title'].' / '.$q['title'].'</div>';
if($total == 0)
{
	echo '<div class="forum1">Файлов еще нет!</div>';
}
else
{
    echo '<div class="where">Сортировка:<br/>
    <a href="index.php?act=usel&amp;id='.$q['id'].'&amp;sort=name">Имя</a> |
    <a href="index.php?act=usel&amp;id='.$q['id'].'&amp;sort=date">Дата</a> |
    <a href="index.php?act=usel&amp;id='.$q['id'].'&amp;sort=reit">Рейтинг</a> |
    <a href="index.php?act=usel&amp;id='.$q['id'].'&amp;sort=down">Скачивания</a>
    </div>';
	while($row = mysql_fetch_assoc($zapros))
	{
		$i++;
		if($i%2)
		{
			echo '<div class="forum1">';
		}
		else
		{
			echo '<div class="forum2">';
		}
		$result = mysql_result(mysql_query("select count(*) from `files_comments` where `id_file` = ".$row['id'].""),0);
		echo '<img class="ico" src="../style/'.$style.'/ico/ext/'.$row['ext'].'.png" alt="" /> <a href="index.php?act=view&amp;id='.$row['id'].'">'.$row['title'].'</a> ('.$row['size'].')</div>';
	}
	if($total > $set['str'])
	{
		pages($page, $total, 'index.php?act=usel&amp;id='.$q['id'].'&amp;', $set['str']);
	}
}
echo '<div class="where"><img class="ico" src="../style/'.$style.'/ico/newpost.png" alt="" /> <a href="index.php?act=sel&amp;id='.$query['id'].'">Назад</a></div>';
break;
case 'view':
$query = mysql_fetch_assoc(mysql_query("select * from `files_files` where `id` = ".int($_GET['id']).""));
$podrazdel = mysql_fetch_assoc(mysql_query("select * from `files_usel` where `id` = ".$query['id_usel'].""));
$razdel = mysql_fetch_assoc(mysql_query("select * from `files_sel` where `id` = ".$podrazdel['id_sel'].""));
mysql_query("UPDATE `files_files` SET `see` = `see`+1 WHERE `id` = ".$query['id']."");
$str['mesto'] = ''.$query['title'].'';
$str['block'] = $set['site'].' / <a href="index.php">Зона Обмена</a> ';
include '../style/'.$style.'/head.php';
echo '<div class="where"><a href="index.php?act=sel&amp;id='.$razdel['id'].'">'.$razdel['title'].'</a> / <a href="index.php?act=usel&amp;id='.$podrazdel['id'].'">'.$podrazdel['title'].'</a></div>';
if(empty($query['size']))
{
    echo '<div class="forum1">Файл не найден!</div>';
    include '../style/'.$style.'/foot.php';
    exit;
}

echo '<div class="block2"><div class="blue">';
echo '<font color="002bff"><b>Файл:</b> '.$query['title'].' ('.$query['size'].')</font><br/>';
echo '</div></div>';
echo '<div class="on2">';
if($query['ext'] == '3gp')
{
	$video = new ffmpeg_movie('files/'.$query['url']);
	if(!is_file('files/'.$query['url']))
	{
		$gif = new ffmpeg_animated_gif('files/'.$query['url'], $video->GetFrameWidth(), $video->GetFrameHeight(), 1, 0);
		$gif->addFrame($video->getFrame(2));
		$gif->addFrame($video->getFrame(30));
		$gif->addFrame($video->getFrame(40));
	}
echo '<img src="ffmpeg.php?id='.$query['id'].'"  width="100" height="100" alt="" /><br />
<b>Продолжительность фильма</b>: '.gmdate("H:i:s",$video->getDuration()).'<br />
<b>Koдeк</b>: '.$video->getVideoCodec().'<br />
<b>Битрейт</b>: '.ceil(($video->getBitRate()/1024)).' KBPS<br />';
}
if($query['ext'] == 'jpg' || $query['ext'] == 'gif' || $query['ext'] == 'jpeg' || $query['ext'] == 'png')
{
	echo '<img src="img.php?id='.$query['id'].'" alt="."/><br/>';
}
echo '<b>Рейтинг:</b> <a href="index.php?act=rate&amp;do=1&amp;id='.$query['id'].'"><img class="ico" src="../style/'.$style.'/ico/plus.gif" alt="" /></a> <b>['.$query['rate'].']</b>  <a href="index.php?act=rate&amp;do=2&amp;id='.$query['id'].'"><img class="ico" src="../style/'.$style.'/ico/minus.gif" alt="" /></a><br/>';
	              if ($query['gender'] == 1)
			$pol = '<img class="ico" src="../style/'.$style.'/ico/m.png" alt="" />';
		if ($query['gender'] == 2)
			$pol = '<img class="ico" src="../style/'.$style.'/ico/w.png" alt="" />';
echo '<b>Добавил:</b> ';
echo $pol.'<a href="../p/'.$query['user'].'">'.$query['user'].'</a> ('.clock($query['time']).')<br/>';
if($query['ext'] == 'mp3')
{
	include('mp3libs/getid3.php');

	$getID3 = new getID3;
	$getID3->encoding = 'cp1251';
	$info = $getID3->analyze('files/'.$query['url'].'');
	if(!isset($info['error'][0]))
	{
		$tagexist = true;

		if(!empty($info['tags']['id3v2'])) $TagData = $info['tags']['id3v2'];
		elseif(!empty($info['tags']['id3v1'])) $TagData = $info['tags']['id3v1'];
		else $tagexist = false;
	}
	if($tagexist)
	{
	if(isset($TagData['artist'][0])) echo '<b>Исполнитель:</b> '.encoding($TagData['artist'][0], 'UTF-8').'<br/>';
	if(isset($TagData['title'][0])) echo '<b>Название:</b> '.encoding($TagData['title'][0], 'UTF-8').'<br/>';
	if(isset($TagData['album'][0])) echo '<b>Альбом:</b> '.encoding($TagData['album'][0], 'UTF-8').'<br/>';
	}
	echo '<b>Длительность:</b> '.date('i:s', $info['playtime_seconds']).'
	<br/><b>Частота:</b> '.$info['audio']['sample_rate'].' Гц
	<br/><b>Битрейт:</b> '.ceil($info['audio']['bitrate']/1000).' кбит/с
	<br/><b>Каналы:</b> '.$info['audio']['channels'].' ('.$info['audio']['channelmode'].')<br />';
}
echo '
<b>Описание</b>: '.$query['opis'].'<br/>
<b>Скачиваний:</b> '.$query['down'].'<br/>
<b>Просмотров:</b> '.$query['see'].'<br/>
<img class="ico" src="../style/'.$style.'/ico/comments.png" alt="" /> <a href="index.php?act=comments&amp;id='.$query['id'].'">Обсудить</a> ('.mysql_result(mysql_query("select count(*) from `files_comments` where `id_file` = ".$query['id'].""),0).')<br/>';
echo '<div class="where"><a href="'.$set['http'].'/files/download.php?id='.$query['id'].'"><font color="#FF0000"><b>&raquo; Скачать</b></font></a><br/>';
if($query['ext'] == 'jpg' || $query['ext'] == 'gif' || $query['ext'] == 'jpeg' || $query['ext'] == 'png')
{
	echo '
	&raquo; <a href="img.php?wh=1&amp;id='.$query['id'].'" title="Скачать фото">Скачать 128*128</a><br />
	&raquo; <a href="img.php?wh=2&amp;id='.$query['id'].'" title="Скачать фото">Скачать 176*220</a><br />
	&raquo; <a href="img.php?wh=3&amp;id='.$query['id'].'" title="Скачать фото">Скачать 240*320</a><br />';
}
echo'</div>';
echo 'Ссылка для скачивания:<br/><input name="link" type="text" value="'.$set['http'].'/files/download.php?id='.$query['id'].'"/><br/>';
if($user['level'] == 3 || $user['level'] == 4)
{
	echo '<a href="index.php?act=delete_file&amp;id='.$query['id'].'">[удалить]</a>';
}
echo '</div><div class="where"><img class="ico" src="../style/'.$style.'/ico/newpost.png" alt="" /> <a href="index.php?act=usel&amp;id='.$podrazdel['id'].'">Назад</a></div>';
break;
case 'rate':
reg();
$query = mysql_fetch_assoc(mysql_query("select * from `files_files` where `id` = ".int($_GET['id']).""));
$str['mesto'] = ''.$query['title'].'';
$str['block'] = $set['site'].' / <a href="index.php">Зона Обмена</a>';
include '../style/'.$style.'/head.php';
echo '<div class="where">"Самые скачиваемые"</div>';
if(empty($query['title']))
{
    echo '<div class="forum1">Файл не найден!</div>';
    include '../style/'.$style.'/foot.php';
    exit;
}
$result = mysql_result(mysql_query("select count(*) from `files_rate` where `id_file` = ".$query['id']." and `id_user` = ".$user['id'].""),0);
if($result > 0)
{
    echo '<div class="forum1">Вы уже голосовали на данную запись!</div>';
    include '../style/'.$style.'/foot.php';
    exit;
}
$do = int($_GET['do']);
if($do == 1)
{
    mysql_query("UPDATE `files_files` SET `rate` = `rate`+1 WHERE `id` = ".$query['id']."");
}
else
{
    mysql_query("UPDATE `files_files` SET `rate` = `rate`-1 WHERE `id` = ".$query['id']."");
}
mysql_query("INSERT INTO `files_rate` (id_file,id_user) VALUES (".$query['id'].",".$user['id'].")");
echo '<div class="forum1">Ваш голос успешно отдан!</div>';
break;
case 'comments':
reg();
$query = mysql_fetch_assoc(mysql_query("select * from `files_files` where `id` = ".int($_GET['id']).""));
$podrazdel = mysql_fetch_assoc(mysql_query("select * from `files_usel` where `id` = ".$query['id_usel'].""));
$razdel = mysql_fetch_assoc(mysql_query("select * from `files_sel` where `id` = ".$podrazdel['id_sel'].""));
$str['mesto'] = ''.$query['title'].'';
$str['block'] = $set['site'].' / <a href="index.php">Зона Обмена</a> ';
include '../style/'.$style.'/head.php';
echo '<div class="where"> <a href="index.php?act=sel&amp;id='.$razdel['id'].'">'.$razdel['title'].'</a> / <a href="index.php?act=usel&amp;id='.$podrazdel['id'].'">'.$podrazdel['title'].'</a> / <a href="index.php?act=view&amp;id='.$query['id'].'">'.$query['title'].'</a> / Комментарии</div>';
if(empty($query['size']))
{
    echo '<div class="forum1">Файл не найден!</div>';
    include '../style/'.$style.'/foot.php';
    exit;
}
if(isset($_POST['msg']) && !empty($_POST['msg']))
{
    $flood = mysql_fetch_assoc(mysql_query("select * from `files_comments` where `user` = '".$user['login']."' order by `time` desc limit 1"));
    if($flood['time']<(time()-30))
    {
              mysql_query("update `users` set `balls`=`balls`+1 where `id` = ".$user['id']."");
        echo '<div class="mess">Запись успешно добавлена!</div>';
        mysql_query("INSERT INTO `files_comments` (id_file,user,text,time) VALUES (".$query['id'].",'".$user['login']."','".protect($_POST['msg'])."',".time().")");
    }
    else
    {
        echo '<div class="mess">Антифлуд 30 секунд!</div>';
    }
}
echo '<div class="mess"><form action="index.php?act=comments&amp;id='.$query['id'].'" method="post"><div>Сообщение:<br/><textarea name="msg"></textarea><br /><input type="submit" value="Написать"/></div></form></div>';
$zapros = mysql_query("select * from `files_comments` where `id_file` = ".$query['id']." order by `id` desc limit ".$page.",".$set['str']."");
$total = mysql_result(mysql_query("select count(*) from `files_comments` where `id_file` = ".$query['id'].""),0);
if($total == 0)
{
    echo '<div class="forum1">Комментариев нет! Будь первым!</div>';
}
else
{
    while($row = mysql_fetch_assoc($zapros))
    {
        $i++;
        if($i%2)
        {
            echo '<div class="forum1">';
        }
        else
        {
            echo '<div class="forum2">';
        }
                           
	              if ($row['gender'] == 1)
			$pol = '<img class="ico" src="../style/'.$style.'/ico/m.png" alt="" />';
		if ($row['gender'] == 2)
                                          $pol = '<img class="ico" src="../style/'.$style.'/ico/w.png" alt="" />';       
        echo $pol.' <a href="../p/'.$row['user'].'">'.$row['user'].'</a>';
        echo statusl($row['user']);
        echo '('.clock($row['time']).')<div class="ftext">Сообщение: '.text($row['text']).'</div>';
        if($user['level'] == 3 || $user['level'] == 4)
        {
        	echo '<a href="index.php?act=delete_post&amp;id='.$row['id'].'">[удалить]</a>';
        }
        echo '</div>';
    }
}
if($total > $set['str'])
{
	pages($page, $total, 'index.php?act=comments&amp;id='.$query['id'].'&amp;', $set['str']);
}
break;
case 'top':
$str['mesto'] = 'Топ файлов';
$str['block'] =  ''.$set['site'].'';
include '../style/'.$style.'/head.php';
echo '<div class="where"><a href="index.php">Зона Обмена</a> / Топ файлы</div>';
if(isset($_GET['order']) && $_GET['order'] == 'new')
{
	$query = mysql_query("select * from `files_files` order by `time` desc limit 10");
	$sort = 'new';
}
if(isset($_GET['order']) && $_GET['order'] == 'down')
{
	$query = mysql_query("select * from `files_files` order by `down` desc limit 10");
	$sort = 'read';
}
if(isset($_GET['order']) && $_GET['order'] == 'rate')
{
	$query = mysql_query("select * from `files_files` order by `rate` desc limit 10");
	$sort = 'rate';
}

if(isset($_GET['order']) && !empty($_GET['order']))
{
	while($row = mysql_fetch_assoc($query))
	{
		$i++;
		if($i%2)
		{
			echo '<div class="forum1">';
		}
		else
		{
			echo '<div class="forum2">';
		}
		$result = mysql_result(mysql_query("select count(*) from `files_comments` where `id_file` = ".$row['id'].""),0);
		echo '<img class="ico" src="../style/'.$style.'/ico/ext/'.$row['ext'].'.png" alt="" /> <a href="index.php?act=view&amp;id='.$row['id'].'">'.$row['title'].'</a> ('.$row['size'].')</div>';

	}
}
break;
case 'search':
$str['mesto'] = 'Поиск';
$str['block'] = ''.$set['site'].'';
include '../style/'.$style.'/head.php';
echo '<div class="where">Зона Обмена / Поиск</div>';
echo '<div class="mess">
<b>Ведите слово или часть её. </b><br/>
<form action="index.php?act=searchgo;" method="get">
<div>
Запрос для поиска:<br/>
<input type="text" name="query"/><br/>
<input type="hidden" name="act" value="searchgo"/>
<input type="submit" value="Искать"/>
</div>
</form>
</div>';
break;
case 'searchgo':
$str['mesto'] = 'Поиск';
$str['block'] = $set['site'].' / <a href="index.php">Зона Обмена</a>';
include '../style/'.$style.'/head.php';
echo '<div class="where">Зона Обмена / Поиск</div>';
$query = mysql_query("select * from `files_files` where `title` LIKE '%".protect($_GET['query'])."%' order by `id` limit ".$page.",".$set['str']."");
$total = mysql_result(mysql_query("select count(*) from `files_files` where `title` LIKE '%".protect($_GET['query'])."%'"),0);
if($total == 0)
{
     echo '<div class="forum1">Совпадений не найдено!</div>';
}
else
{
while($row = mysql_fetch_assoc($query))
{
    $i++;
    if($i%2)
    {
        echo '<div class="forum1">';
    }
    else
    {
        echo '<div class="forum2">';
    }
	$result = mysql_result(mysql_query("select count(*) from `files_comments` where `id_file` = ".$row['id'].""),0);
	echo '<img class="ico" src="../style/'.$style.'/ico/ext/'.$row['ext'].'.png" alt="" /> <a href="index.php?act=view&amp;id='.$row['id'].'">'.$row['title'].'</a> ('.$row['size'].')</div>';
}

    if($total > $set['str'])
    {
        pages($page, $total, 'index.php?query='.$_GET['query'].'&amp;act=searchgo&amp;', $set['str']);
    }
}
break;
case 'delete_file':
$query = mysql_query("select * from `files_files` where `id` = ".int($_GET['id'])."");
$str['mesto'] = 'Удалить '.$query['title'].'';
$str['block'] = $set['site'].' / <a href="index.php">Зона Обмена</a> / Удалить '.$query['title'].'';
include '../style/'.$style.'/head.php';
if(!mysql_num_rows($query))
{
    echo '<div class="forum1">Файл не найден!</div>';
    include '../style/'.$style.'/foot.php';
    exit;
}
if($user['level'] == 3 || $user['level'] == 4)
{
	$query = mysql_fetch_assoc($query);
	unlink('files/'.$query['url']);
	mysql_query("delete from `files_files` where `id` = ".$query['id']."");
	echo '<div class="forum1">Файл успешно удален!</div>';
}
else
{
	echo '<div class="forum1">Вы не имеете прав!</div>';
}
break;
case 'delete_post':
$query = mysql_query("select * from `files_comments` where `id` = ".int($_GET['id'])."");
$str['mesto'] = 'Удалить комментарий';
$str['block'] = $set['site'].' / <a href="index.php">Зона Обмена</a>';
include '../style/'.$style.'/head.php';
if(!mysql_num_rows($query))
{
    echo '<div class="forum1">Запись не найдена!</div>';
    include '../style/'.$style.'/foot.php';
    exit;
}
if($user['level'] == 3 || $user['level'] == 4)
{
	mysql_query("delete from `files_comments` where `id` = ".int($_GET['id'])."");
	echo '<div class="forum1">Комментарий успешно удален!</div>';
}
else
{
	echo '<div class="forum1">Вы не имеете прав!</div>';
}
break;
}

include '../style/'.$style.'/foot.php';
?>