<?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';

if ($_GET['del'] && mysql_result(mysql_query("SELECT COUNT(*) FROM `lenta` WHERE `id` = '".intval($_GET['del'])."'"),0)==1) {
$postin=mysql_fetch_assoc(mysql_query("SELECT * FROM `lenta` WHERE `id` = '".intval($_GET['del'])."' LIMIT 1"));
mysql_query("DELETE FROM `lenta` WHERE `id` = '$postin[id]'");
}

if ($_GET['del_all'])
{
$postin=$user[id];
mysql_query("DELETE FROM `lenta` WHERE `id_kont` = '$postin'");
}

header("Location: lenta.php".SID);
?>
