Файл: download/podrazdel.php
Строк: 48
<?
////////////////////////////////////////
///// Kyber ApiCMS 2013 apicms.ru //////
///// Запрещается продажа данной CMS ///
///// Автор Евгений Медянкин Kyber /////
///// ICQ 626-000-895 или 37-22-47 /////
////////////////////////////////////////
/////////////////////////////////////////
require_once '../api_core/apicms_system.php';
$title = 'Загруз-центр';
require_once '../api_core/head.php';
/////////////////////////////////////////
if (isset($_GET['id']))$pod_id = intval($_GET['id']);
if (isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `download_podcat` WHERE `id` = '".$pod_id."'"),0)==1){
///if ($user)echo "<div class='subhead'><center><a href='new_product.php' class='headbut'> <img src='/design/shop/upload.png'> <b>загрузить ваши файлы</b> </a></center></div>";
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `download_podcat` WHERE `cat_main` = '$pod_id'"),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='erors'><center>Разделов не найдено!</center></div>";
/////////////////////////////////////////
$qii=mysql_query("SELECT * FROM `download_podcat` WHERE `cat_main` = '$pod_id' 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_files` WHERE `id_cat` = '$post_download[id]'"), 0);
echo "<div class='subhead'><a href='files.php?id=$post_download[id]'> <img src='/design/download/podrazdel_ico.png'> <b>".htmlspecialchars($post_download['name'])." </b></a> <span style='float:right'> <strong>".$counts."</strong> </small> <a href='del_podraz.php?id=".$post_download['id']."'><img src='/design/download/del.png'></a> </span></div>";
}
/////////////////////////////////////////
if ($k_page > 1){
echo '<div class="subhead"><center>';
str('podrazdel.php?id='.$pod_id.'&',$k_page,$page); // генерируем постраничную навигацию
echo '</center></div>';
}
}else{
echo "<div class='erors'><center>Извините, подраздела не существует</center></div>n";
}
apicms_foot();
?>