<?php
  ///////////////////////////////////////////////////
  //2007 (C)
  //Карпухин Павел
  ///////////////////////////////////////////////////

  $lang = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0,2);
  if (is_file ("../lang/".$lang."/".$lang.".php")) include "../lang/".$lang."/".$lang.".php";
     else include "../lang/ru/ru.php";

  $title=$titlepage = $TEXT['new-title2'];
  $helppage = "";

  require_once "../config.php";
  require_once "../util/top.php";

  if($result2['master'] == 1) puterror2($TEXT['error-loginform4']);
  if($result2['manager'] == 1) puterror2($TEXT['error-loginform4']);

  if(empty($_GET['news_id'])) puterror2($TEXT['error-hide1']);
  if(strlen($_GET['news_id'])>11) puterror2($TEXT['error-hide2']);

  $query = "UPDATE `tbl_news` SET `visible`='hide' WHERE `new_id`='".$_GET['news_id']."' ";
  if(mysql_query($query))
  {
    echo "<html><head>
          <meta HTTP-EQUIV='Refresh' CONTENT='0; URL=index.php' />
          </head></html>";
  } else puterror2($TEXT['error-hide3']);
  require_once "../util/bottom.php";
?>
