File size: 585B
- <?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");
- include_once 'inc/foot.php';
- ?>