<?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';
/*Что сделанно
Добавил постраничную навигацию в подкаталоги и вывод видео файлов
*/
$user_id = $user['id'];
$id = isset($_REQUEST['id']) ? abs(intval($_REQUEST['id'])) : false;
$act = isset($_GET['act']) ? trim($_GET['act']) : '';
if ($user['group_access'] >= 15)
{
switch ($act)
{
case 'soz':
$set['title'] = 'Видео Онлайн';
include_once '../sys/inc/thead.php';
title();
if (isset($_POST['submit']))
{
$type = $_POST['type'];
$text = $_POST['text'];
$ref = isset($_GET['idr']) ? abs(intval($_GET['idr'])) : 0;
if (empty($text))
{
$set['title'] = 'Видео Онлайн';
include_once '../sys/inc/thead.php';
title();
echo 'Не введено название категории';
include_once '../sys/inc/tfoot.php';
exit;
} elseif (empty($type))
{
$set['title'] = 'Видео Онлайн';
include_once '../sys/inc/thead.php';
title();
echo 'Не выбрано значение';
include_once '../sys/inc/tfoot.php';
exit;
}
$realtime = time();
mysql_query("INSERT INTO kat (refid, type, data, text) VALUES ('$ref', '$type', '" .
$realtime . "', '$text')");
header("location: index.php?id=$ref");
}
break;
case 'del':
mysql_query("DELETE FROM `kat` WHERE `id` = '$id' LIMIT 1");
header("location: index.php");
break;
default:
}
} else
{
header("location: index.php");
}
require_once ("../incfiles/end.php");
?>