Просмотр файла forum/attache.php

Размер файла: 2.68Kb
<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/setforum.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";

echo '<img src="../images/img/partners.gif" alt=""> <b>Файлы Форума</b><br><br>';

if($config_forum_off=="1"){

if ($provlog==$_SESSION['log'] && $provpar==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!=""){

if($config_file_post=="1"){
if($udata[36]>$config_file_usball){

echo'<img src="../images/img/new_dir.gif" alt=""> <a href="newfiles.php?'.SID.'">Новые файлы</a><br>';
echo '<img src="../images/img/top20_dir.gif" alt=""> <a href="top20.php?'.SID.'">Топ файлов</a><br>';

$dir = opendir ("."); 
while ($file = readdir ($dir)) {
if (( $dir != ".") && ($dir != "..") && ($dir != "imgfor") && ($dir != "uzset"))
if (is_dir($file)) {
if($file=="."||$file=="..") continue;
$downdir_array[]=$file;
}}  
closedir ($dir); 

sort($downdir_array);

$total = count($downdir_array);  
for ($i = 0; $i < $total; $i++){ 
	
$down_name=file_get_contents("$downdir_array[$i]/name.dat");

if($down_name==""){$down_name=$downdir_array[$i];}
echo '<img src="../images/img/dir.gif" alt=""> <a href="down.php?did='.$downdir_array[$i].'&amp;'.SID.'">'.$down_name.'</a> ('.count_dir($downdir_array[$i]).')<br>';
}

echo '<br><img src="../images/img/search.gif" alt=""> <a href="search.php?'.SID.'">Поиск файлов</a><br>';

echo '<br>Всего категорий: '.(int)$total.'<br>';

}else{
echo'<center><font color="red">У вас недостаточно баллов для просмотра файлов!!!</font></center>'; }}

if($config_file_post=="0"){
echo'<center><font color="red">Добавление и просмотр файлов форума отключено администрацией!!!</font></center>'; }

}else{
echo'<center><font color="red">Вы не авторизованы для просмотра файлов</font></center>';}
}

if($config_forum_off=="0"){
echo'<center><font color="red">Форум сайта отключен!</font></center>';}

echo '<img src="../images/img/barrow.gif" alt=""> <a href="index.php?'.SID.'">На форум</a><br>';
echo'<img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';
include_once"../themes/$config_themes/foot.php";
?>