<?php
  ///////////////////////////////////////////////////
  //2010 (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['supp-mar-title'];
  $helppage = "";

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

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

  if(empty($_GET['mar_id'])) puterror2($TEXT['error-marsh16']);
  if(strlen($_GET['mar_id'])>11) puterror2($TEXT['error-marsh13']);
  $_GET['mar_id'] = rep($_GET['mar_id']);

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