Файл: forum/delpost.php
Строк: 18
<?php
/*
------------------------------
##############################
- Загруз Центр -
- by Kemel -
- Форум -
##############################
------------------------------
*/
define('ROOT','../');
define('Loads',true);
require_once (ROOT.'system/power.php');
if ($aut == true and $id != false) {
$sql = $db -> query("SELECT `fid`,`name` FROM `forum` WHERE `id` = '".$id."' AND `type` = 'm' LIMIT 1");
if ($sql -> num_rows > 0) {
$ass = $sql -> fetch_assoc();
if ($ya['login'] == $ass['name'] or $admin == true or $moder == true) {
$db -> query("DELETE FROM `forum` WHERE `id` = '".$id."' LIMIT 1");
header('location: index.php?id='.$ass['fid']);
} else header('location: index.php?id='.$ass['fid']);
} else header('location: index.php');
} else header('location: index.php');
?>