Просмотр файла frno.php

Размер файла: 533B
<?php
include 'inc/db.php';
include 'inc/1.php';
if (!$user || !isset($_GET['id']))
{
header('Location: /aut.php');
exit();
}
$q=mysql_query("SELECT `id` FROM `friends` WHERE `id` = '".intval($_GET['id'])."' AND (`user1` = '$user[id]' OR `user2` = '$user[id]')");
if (mysql_num_rows($q)==0)
{
header('Location: /index.php');
exit();
}
mysql_query("UPDATE `friends` SET `ok` = '0' WHERE `id` = '".intval($_GET['id'])."'");
echo '<div class="msg">
Заявка отклонена.
</div>';
include 'inc/foot.php';
?>