File size: 1.72Kb
<?php
require_once ( "../includes/start.php" );
require_once ( "../includes/functions.php" );
require_once ( "../includes/header.php" );
include_once ( "../themes/" . $config['themes'] . "/index.php" );
show_title( 'partners.gif', 'Архив файлов' );
echo '<img src="../images/img/new_dir.gif" alt=""> <a href="new.php?' . SID .
'">Новые загрузки!</a><br>';
echo '<img src="../images/img/top20_dir.gif" alt=""> <a href="top.php?' . SID .
'">Топ загрузок</a><br>';
$downdir_array = array();
$dir = opendir( "." );
while ( $file = readdir( $dir ) )
{
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++ )
{
if ( file_exists( "$downdir_array[$i]/name.dat" ) )
{
$down_name = file_get_contents( "$downdir_array[$i]/name.dat" );
}
else
{
$down_name = $downdir_array[$i];
}
echo '<img src="../images/img/dir.gif" alt=""> <a href="down.php?did=' . $downdir_array[$i] .
'&' . 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 '<img src="../images/img/zip.gif" alt=""> <a href="add.php?' . SID .
'">Как добавить скрипт</a><br>';
echo '<br>Всего категорий: ' . ( int )$total . '<br>';
echo '<img src="../images/img/homepage.gif" alt=""> <a href="../index.php?' . SID .
'">На главную</a>';
include_once ( "../themes/" . $config['themes'] . "/foot.php" );
?>