Размер файла: 682B
<?php
include 'inc/db.php';
include 'inc/1.php';
if ($user['admin']<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 `obmen_t` WHERE `id` = '$to'");
if (mysql_num_rows($a)==0){header("Location: /index.php"); exit;}
mysql_query("UPDATE `obmen` SET `razdel` = '$to' WHERE `id` = '$irw'"); header("Location: /file.php?id=$irw");
mysql_query("INSERT INTO `log` (`user`, `text`, `time`) values ('$user[id]', 'Перемещение файла №$irw', '".time()."')");
include_once 'inc/foot.php';
?>