|
<?php
/*
#Бесплатный WAP движок StrongCMS
#Официальный сайт поддержки: http://strongcms.ru
*/
##By MXakim
$title = 'Подарки';
require ('../system/core.php');
require ('../system/head.php');
login();
$switch = array(
'new_categories',
'del_categories',
'categories',
'new_present',
'del_present',
'up_present',
'up_categories',
'add',
'users_present');
if ($act && ($f = array_search($act, $switch)) !== false && file_exists('switch/'.$switch[$f].'.php'))
{
require ('switch/'.$switch[$f].'.php');
}
else
{
if ($id)
$_SESSION['present_us'] = $id;
echo '<div class="title">'.$title.'</div>';
$count = $db->super_query("SELECT COUNT(*) as count FROM `present_categories`");
$start = nav($count['count']);
$znak = $db->query("SELECT * FROM `present_categories` ORDER BY `id` DESC LIMIT ".$start['s'].",".$max);
while ($a = $db->fetch_assoc($znak))
{
$c = $db->super_query("SELECT COUNT(*) as count FROM `present` WHERE `categories` = '".$a['id']."'");
echo '<a href="'.HOME.'/present/categories'.$a['id'].'" class="menudiv">';
echo '<img src="'.HOME.'/design/theme/default/menu/f_razdel.png" /> '.$a['name'].' <span class="counts_right"><b>'.$c['count'].'</b></span></a>';
if ($user['level'] >= 2)
echo '<div class="news"> <a href="'.HOME.'/present/del_categories'.$a['id'].'">Удалить</a> | <a href="'.HOME.'/present/up_categories'.$a['id'].'">Редактировать</a></div>';
}
if ($start['k_post'] < 1)
echo msg('Пусто!');
if ($user['level'] >= 2)
echo '<a href="'.HOME.'/present/new_categories" class="menudiv">Добавить категорию</a> ';
if ($start['k_page'] > 1)
echo str(HOME.'/znak/?', $start['k_page'], $start['page']); // Вывод страниц
}
##ноги
require_once ('../system/footer.php');
?>