/////////// Berpa eden BEYREK /////////
/////////// http://cennetwap.biz /////////
/////////// admin@cennetwap.biz /////////
Error_Reporting(E_ALL & ~E_NOTICE);
include 'fig.php';
$head ="
$title
";
$end ='';
if (!$act)
{
echo $head;
echo "";
echo "
$topot
";
echo '
';
$basesd="sd.txt";
$num_sep =20;
$preview="$basesd";
$preview = file($preview);
$count = count($preview);
if ($count>$num_sep) nav_page(ceil($count/$num_sep),(isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page']: 1),"index.php?site=$site&page=");
$num_page=1;
if (isset($HTTP_GET_VARS['page'])) {
if (($HTTP_GET_VARS['page']>0) and ($HTTP_GET_VARS['page']<=ceil($count/$num_sep))) $num_page=$HTTP_GET_VARS['page'];
}
for ( $i=($num_page-1)*$num_sep; $i<=(($num_page*$num_sep<$count) ? $num_page*$num_sep-1: $count-1); $i++)
{
$nomer =$i+1;
$oss = file("$basesd");
$selectsd = explode("|", $oss[$i]);
echo "»
";
echo "$selectsd[1]$selectsd[2]
";
$sdir = opendir ("text/sd$nomer/");
$file_array = array();
while ($file = readdir ($sdir))
{
if(substr($file,0,1) != '.' and $file != "..")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
echo "sehife sayi : $file_count
";
closedir ($sdir);
}
if ($count>$num_sep) nav_page(ceil($count/$num_sep),(isset($HTTP_GET_VARS['page']) ? $HTTP_GET_VARS['page']: 1),"index.php?site=$site&page=");
//echo "
Bolme sayi : $count
";
echo "
";
echo "
";
echo "
";
echo $end;
}
if($act=="sd")
{
echo $head;
echo "";
echo "
$topot
";
$conf["items_per_page"] = $sdlist;
if (!isset($page)) {$page = 0;}
$total = 0;
if(!($dp = opendir("text/$sd"))) die ("Ошибка открытия папки ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "..")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
if ($file_count == 0)
{
echo 'В разделе пока нет файлов, зайдите позже.
';
}
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];
while (list($fileIndexValue, $file_name) = each ($file_array))
{
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{
$datafiles = "text/$sd/$file_name";
$dataname = file("$datafiles");
$filename = trim($dataname[0]);
$fileopis = trim($dataname[1]);
$fileopis = "
$fileopis";
$file_name = str_replace('.txt','',$file_name);
echo "»
$filename";
}
}
if (($file_count > 0) AND ($page != 0))
{
$prev_page = $page -1;
echo "
«
[Evvelki] |";
}
if (($file_count > 0) AND ($last_record < $file_count))
{
$next_page = $page + 1;
echo "
[Sonraki] »
";
}
echo "
sehife sayi $file_count ";
}
closedir($dp);
echo "
";
//echo '
EVVELE';
echo "
";
echo "
";
echo $end;
}
if ($act=="view")
{
echo $head;
echo "$topot
";
$text= "text/$d/$f.txt";
$text = file($text);
echo '";
echo '