Размер файла: 614B
<?php
$pid=$HTTP_GET_VARS['pid'];
$rid=$HTTP_GET_VARS['rid'];
$page=$HTTP_GET_VARS['page'];
require "inc.php";
$myid=$_COOKIE["usid"];
$mypass=$_COOKIE["pass"];
$db=mysql_connect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname,$db);
if (!isset($myid)) $myid=0;
$sqlc="select * from users where usid=$myid";
$c=mysql_query($sqlc);
$resc=mysql_fetch_array($c);
if ($resc[pass]==$mypass)
{
if ($resc[usid]==1)
{
$sqld="DELETE FROM replies WHERE pid='$pid' && rid='$rid' LIMIT 1";
$a=mysql_query($sqld);
}
}
Header("Location: viewtop.php?pid=$pid&page=$page");
?>