Вход Регистрация
Файл: vk.com_vhllam/statuses/index.php
Строк: 77
<?php

include_once '../sys/inc/start.php';
include_once 
'../sys/inc/compress.php';
include_once 
'../sys/inc/sess.php';
include_once 
'../sys/inc/home.php';
include_once 
'../sys/inc/settings.php';
include_once 
'../sys/inc/db_connect.php';
include_once 
'../sys/inc/ipua.php';
include_once 
'../sys/inc/fnc.php';
include_once 
'../sys/inc/user.php';

only_reg(); // материмся на гостей
# загружаем шапку
$set['title']='Статусник'# заголовок страницы
include_once '../sys/inc/thead.php';
title();
aut();

# НАЧАЛО РАБОТЫ МОДУЛЯ
if ($user['level'] >= 10)
echo 
'<div class="kabinet"><img src="/style/ico/my.png" alt="" /> <a href="category.add.php">Добавить категорию</a></div>';
if (
$user['level'] >= 2)
echo 
'<div class="kabinet"><img src="/style/ico/xhata_1.png" alt="" /> <a href="moderation.php">Модерация статусов</a> [' mysql_num_rows(mysql_query("SELECT * FROM `statuses_status` WHERE `moderation` = 'no'")) . ']</div>';

$k_post mysql_result(mysql_query("SELECT COUNT(*) FROM `statuses_category`"), 0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];

if (
$k_post==0)
{
echo 
'<div class="err">Нет категорий</div>';
}

$q=mysql_query("SELECT * FROM `statuses_category` ORDER BY `id` ASC LIMIT $start$set[p_str]");
while (
$res mysql_fetch_assoc($q)) {
if (
$user['level'] < 10) {
    echo (
$i 2) ? '<div class="x1">' '<div class="x2">';
if (!empty(
$res['cat_text'])) {
echo 
'<img src="/style/ico/xhata_dnev.png" alt="" /> <a href="category.php?id=' $res['id'] . '">' .$res['cat_name'] . '</a> [' mysql_num_rows(mysql_query("SELECT * FROM `statuses_status` WHERE `id_category` = '" $res['id'] . "' AND `moderation` = 'yes'")) . ']<br />' $res['cat_text'] . '</div>';
}
else {
echo 
'<img src="/style/ico/xhata_dnev.png" alt="" /> <a href="category.php?id=' $res['id'] . '">' .$res['cat_name'] . '</a> [' mysql_num_rows(mysql_query("SELECT * FROM `statuses_status` WHERE `id_category` = '" $res['id'] . "' AND `moderation` = 'yes' ")) . ']</div>';
}
    ++
$i;
}
else {
    echo (
$i 2) ? '<div class="x1">' '<div class="x2">';
if (!empty(
$res['cat_text'])) {
echo 
'<img src="/style/ico/xhata_dnev.png" alt="" /> <a href="category.php?id=' $res['id'] . '">' .$res['cat_name'] . '</a> [' mysql_num_rows(mysql_query("SELECT * FROM `statuses_status` WHERE `id_category` = '" $res['id'] . "' AND `moderation` = 'yes' ")) . '] <a href="category.edit.php?id=' $res['id'] . '"><img src="images/edit.png" alt="" /></a> | <a href="category.delete.php?id=' $res['id'] . '"><img src="images/delete.png" alt="" /></a><br />' $res['cat_text'] . '</div>';
}
else {
echo 
'<img src="/style/ico/xhata_dnev.png" alt="" /> <a href="category.php?id=' $res['id'] . '">' .$res['cat_name'] . '</a> [' mysql_num_rows(mysql_query("SELECT * FROM `statuses_status` WHERE `id_category` = '" $res['id'] . "' AND `moderation` = 'yes'")) . '] <a href="category.edit.php?id=' $res['id'] . '"><img src="/style/ico/238_ic.png" alt="" /></a> | <a href="category.delete.php?id=' $res['id'] . '"><img src="/style/icons/chel.png" alt="" /></a></div>';
}
    ++
$i;
}
}

# Общее количество категорий
echo '<div class="kabinet"><img src="/style/ico/prof.png" alt="" /> Категорий: '.mysql_num_rows(mysql_query("SELECT `id` FROM `statuses_category`")).'</div>';

echo 
'<div class="kabinet"><img src="/style/ico/topf.png" alt="" /> <a href="top.php">ТОП-10 статусов</a></div>';

if (
$k_page>1)str('?',$k_page,$page); // Вывод страниц

   
include_once '../sys/inc/tfoot.php'# ноги
?>
Онлайн: 0
Реклама