Файл: download/index.php
Строк: 51
<?
////////////////////////////////////////
///// Kyber ApiCMS 2013 apicms.ru //////
///// Запрещается продажа данной CMS ///
///// Автор Евгений Медянкин Kyber /////
///// ICQ 626-000-895 или 37-22-47 /////
////////////////////////////////////////
/////////////////////////////////////////
require_once '../api_core/apicms_system.php';
$title = 'Загруз-центр APICMS';
require_once '../api_core/head.php';
/////////////////////////////////////////
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `download_maincat`"),0);
$k_page=k_page($k_post,$api_settings['on_page']);
$page=page($k_page);
$start=$api_settings['on_page']*$page-$api_settings['on_page'];
if ($k_post==0)echo "<div class='content'><center>Разделов не найдено!</center></div>";
/////////////////////////////////////////
$qii=mysql_query("SELECT * FROM `download_maincat` ORDER BY id DESC LIMIT $start, $api_settings[on_page]");
while ($post_download = mysql_fetch_assoc($qii)){
$counts = mysql_result(mysql_query("SELECT COUNT(*) FROM `download_podcat` WHERE `cat_main` = '$post_download[id]'"), 0);
echo "<div class='subhead'><a href='podrazdel.php?id=$post_download[id]'> <img src='/design/download/folder.png'> <b>".htmlspecialchars($post_download['name'])." </b></a> <span style='float:right'> <strong>".$counts."</strong> </small> <a href='del_raz.php?id=".$post_download['id']."'><img src='/design/download/del.png'></a> </span></div>";
}
/////////////////////////////////////////
if ($k_page > 1){
echo '<div class="subhead"><center>';
str('index.php?',$k_page,$page); // генерируем постраничную навигацию
echo '</center></div>';
}
if ($user['level']==1){
echo "<a class='subhead' href='razdel_create.php'> <img src='/design/download/razdel.png'> Создать новый раздел</a>";
echo "<a class='subhead' href='podrazdel_create.php'> <img src='/design/download/podrazdel.png'> Создать новый подраздел</a>";
echo "<a class='subhead' href='upload.php'> <img src='/design/download/upload.png'> Загрузить новый файл</a>";
}
/////////////////////////////////////////
apicms_foot();
?>