Файл: chat/delpost.php
Строк: 19
<?php
define('ROOT','../');
define('GCMS',true);
require_once (ROOT.'system/power.php');
if ($aut == true and (int)$id != false) {
$sql = $db -> query("SELECT `yaid`,`room` FROM `chat_post` WHERE `id` = '".(int)$id."' LIMIT 1");
if ($sql -> num_rows > 0) {
$ass = $sql -> fetch_assoc();
if ((int)$ya['id'] == (int)$ass['user'] or (int)$ya['level']>4) {
$db -> query("DELETE FROM `chat_post` WHERE `id` = '".$id."' LIMIT 1");
header('location: room'.(int)$ass['room']);
} else header('location: room'.(int)$ass['room']);
} else header('location: room'.(int)$ass['room'].'');
} else header('location: room'.(int)$ass['room'].'');
?>