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

Размер файла: 2.42Kb
<?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/menu.gif" alt=""> <b>Мои темы</b><br><br>';

$suf = @file(BASEDIR."local/dataforumuser/$log.dat");
if ($suf!=""){
$lsf = explode(":||:",$suf[0]);}

if($config_forum_off=="1"){

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

if($config_mythem=="1"){
if(!empty($lsf[26])){

$dir = opendir ("../local/dataforum"); 
while ($file = readdir ($dir)) {
if (ereg (".dat$", $file) && !ereg("^top", $file)&& !ereg("^main", $file)) {
$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]");
if($down_name==""){$down_name=$downdir_array[$i];
$di=$down_name;
}
$lines = file("../local/dataforum/$di");

$md=explode("|", $lines[0]);

$filo=file("../local/dataforum/$di");
$di=count($filo);
$paga=(round($di/$config_forumpost))*$config_forumpost;
if ($paga>=$di) $paga=$paga-$config_forumpost;

if ($md[0]==$provlog) {
echo'<a href="index.php?event=topic&amp;r='.$md[11].'&amp;fid='.$md[8].'&amp;id='.$md[7].'&amp;page='.$paga.'&amp;'.SID.'">&#187;'.$md[3].'</a><hr>';}}

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

if($config_mythem=="0"){
echo'<center><font color="red">Показ вами созданных тем форума отключен!!!</font></center>';}

}else{
echo'Вы не авторизованы для просмотра';}
}

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


echo'<br><img src="../images/img/barrow.gif" alt=""> <a href="index.php?'.SID.'">Форум</a>';

echo'<br><img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';

include_once"../themes/$config_themes/foot.php";
?>