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

Размер файла: 706B
<?php
include 'inc/db.php';
include 'inc/1.php';
if (($user['admin']<1) && ($user['moder']<1)){header("Location: /index.php"); exit;}
$to=intval($_GET['to']);
if (!$_GET['to']){header("Location: /index.php"); exit;}
$irw=intval($_GET['id']);
if (!$_GET['id']){header("Location: /index.php"); exit;}
$a=mysql_query("SELECT `id` FROM `forum_t` WHERE `id` = '$to'");
if (mysql_num_rows($a)==0){header("Location: /index.php"); exit;}
mysql_query("UPDATE `forum` SET `razdel` = '$to' WHERE `id` = '$irw'"); header("Location: /theme.php?id=$irw");
mysql_query("INSERT INTO `log` (`user`, `text`, `time`) values ('$user[id]', 'Перемещение темы №$irw', '".time()."')");
include_once 'inc/foot.php';
?>