Файл: panel/index.php
Строк: 87
<?php
/**
* @package Prime Social
* @link http://primesocial.ru
* @copyright Copyright (C) 2016 Prime Social
* @author BoB | http://primesocial.ru/about
*/
require_once('../core/start.php');
check_auth();
if (empty($user['level'])) {
header("Location: " . HOME);
}
switch ($select) {
default:
head('Boshqaruv paneli');
echo '<div class="white"><center><b>Prime Social v1.0 Stable</b><br/>
<span style="font-size:10px;color:#999;">Bobur (BoB)</span></center>' . CLOSE_DIV;
echo '<div class="lines">'.icon('primesocial.png').' <a href="http://primesocial.ru/">Prime Social</a> Rasman sayti</div>';
echo '<div class="lines">'.icon('info.png').' <a href="http://primesocial.ru/about">Prime Social haqida</a></div>';
echo '<div class="lines">'.icon('sozlash.png').' <a href="?select=bulimlar">Bo`limlar sozlamalari</a></div>';
echo '<div class="lines">'.icon('adm.png').' <a href="?select=adm">Ma`muriyat uchun</a></div>';
echo '<div class="lines">'.icon('gear.png').' <a href="?select=boshqa">Boshqa sozlamalar</a></div>';
echo '<div class="lines">'.icon('tizim.png').' <a href="?select=tizim">Tizim</a></div>';
echo DIV_GO . ' <a href="'.HOME.'/">Bosh sahifa</a> / <b>Boshqaruv paneli</b>' . CLOSE_DIV;
break;
case 'bulimlar':
head('Bo`limlar sozlamalari');
echo (privilegy('news') ? DIV_LI . '-
<a href="'.HOME.'/panel/news/">Yangiliklar </a>' . CLOSE_DIV : NULL);
echo (privilegy('chat') ? DIV_LI . '-
<a href="'.HOME.'/panel/chat/">Chat </a>' . CLOSE_DIV : NULL);
echo (privilegy('guestbook') ? DIV_LI . '-
<a href="'.HOME.'/panel/guestbook/">Mini chat </a>' . CLOSE_DIV : NULL);
echo (privilegy('forum') ? DIV_LI . '-
<a href="'.HOME.'/panel/forum/">Forum </a>' . CLOSE_DIV : NULL);
echo (privilegy('blog') ? DIV_LI . '-
<a href="'.HOME.'/panel/blog/">Blog </a>' . CLOSE_DIV : NULL);
echo (privilegy('group') ? DIV_LI . '-
<a href="'.HOME.'/panel/groups/">Guruhlar </a>' . CLOSE_DIV : NULL);
echo (privilegy('lib') ? DIV_LI . '-
<a href="'.HOME.'/panel/lib/">Kutubxona </a>' . CLOSE_DIV : NULL);
echo (privilegy('zc') ? DIV_LI . '-
<a href="'.HOME.'/panel/zc/">Yuklamalar </a>' . CLOSE_DIV : NULL);
echo DIV_GO . ' <a href="'.HOME.'/">Bosh sahifa</a> / <b>Boshqaruv paneli</b>' . CLOSE_DIV;
break;
case 'adm':
head('Ma`muriyat uchun');
$ticket = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".TOUCH_MSG." WHERE `status` = ?", array(1));
echo (privilegy('ticket') ? DIV_LI . '-
<a href="'.HOME.'/panel/ticket/">Tiketlar</a> ' . ($ticket > 0 ? '<b>[+' . $ticket . ']</b>' : NULL) . CLOSE_DIV : NULL);
echo (privilegy('positions') ? DIV_LI . '-
<a href="'.HOME.'/panel/privilege/">Lavozimlar boshqaruvi</a>' . CLOSE_DIV : NULL);
echo (privilegy('spam') ? DIV_LI . '-
<a href="'.HOME.'/panel/spam/">Spamlarni boshqarish</a>' . CLOSE_DIV : NULL);
$files = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FILES_FILE." WHERE `status` = '1' ");
$all = $files;
$bann = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".BANN." WHERE `time_bann` > ?", array(time()));
echo (privilegy('anceta_bann') ? DIV_LI . '-
<a href="'.HOME.'/panel/bann_list/">Ban olganlar</a> [' . $bann . ']' . CLOSE_DIV : NULL);
$black = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".BLACKLIST."");
echo (privilegy('anceta_bann') ? DIV_LI . '-
<a href="'.HOME.'/panel/black_list/">Qora ro`yhat</a> [' . $black . ']' . CLOSE_DIV : NULL);
echo (privilegy('moder') ? DIV_LI . '-
<a href="'.HOME.'/panel/moder/">Moderatsiya</a>' . ($all > 0 ? ' <b>+' . $all . '</b>' : NULL) . CLOSE_DIV : NULL);
echo DIV_GO . ' <a href="'.HOME.'/">Bosh sahifa</a> / <b>Boshqaruv paneli</b>' . CLOSE_DIV;
break;
case 'boshqa':
head('Boshqa bo`limlar');
echo (privilegy('balls') ? DIV_LI . '-
<a href="'.HOME.'/panel/balls/">Ballarni aylantirish</a>' . CLOSE_DIV : NULL);
echo (privilegy('smiles') ? DIV_LI . '-
<a href="'.HOME.'/panel/smiles/">Smayllar</a>' . CLOSE_DIV : NULL);
echo DIV_GO . ' <a href="'.HOME.'/">Bosh sahifa</a> / <b>Boshqaruv paneli</b>' . CLOSE_DIV;
break;
case 'tizim':
head('Tizim');
echo (privilegy('mysql') ? DIV_LI . '-
<a href="'.HOME.'/panel/mysql/">MySQL so`rovlar</a>' . CLOSE_DIV : NULL);
echo (privilegy('settings') ? DIV_LI . '-
<a href="'.HOME.'/panel/settings/">Sayt sozlamalari</a>' . CLOSE_DIV : NULL);
echo DIV_GO . ' <a href="'.HOME.'/">Bosh sahifa</a> / <b>Boshqaruv paneli</b>' . CLOSE_DIV;
break;
}
require_once('../core/stop.php');
?>