View file fokr.php

File size: 585B
  1. <?php
  2. include 'inc/db.php';
  3. include 'inc/1.php';
  4. if (($user['admin']<1) && ($user['moder']<1)){header("Location: /index.php"); exit;}
  5. $to=intval($_GET['to']);
  6. if (!$_GET['to']){header("Location: /index.php"); exit;}
  7. $irw=intval($_GET['id']);
  8. if (!$_GET['id']){header("Location: /index.php"); exit;}
  9. $a=mysql_query("SELECT `id` FROM `forum_t` WHERE `id` = '$to'");
  10. if (mysql_num_rows($a)==0){header("Location: /index.php"); exit;}
  11. mysql_query("UPDATE `forum` SET `razdel` = '$to' WHERE `id` = '$irw'"); header("Location: /theme.php?id=$irw");
  12. include_once 'inc/foot.php';
  13. ?>