<?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 = $TEXT['new-help2'];

  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(!isset($title)) $title = $TEXT['new-title2'];
  if(!isset($button)) $button = $TEXT['btn_del'];
  if(!isset($action)) $action = "delete.php";

  if(strlen($_GET['news_id'])>11) puterror2($TEXT['error-new17']);
  $_GET['news_id'] = rep($_GET['news_id']);

  $old_new = $_GET['news_id'];

?>
<table class="table" border="0" cellpadding="2" cellspacing="0" width="60%" >
<?php
  $query = "SELECT `header` FROM `tbl_news` WHERE `new_id`='$old_new'";
  $result = mysql_query($query);
  if (!$result) puterror2($TEXT['error-tbl17']);
       if (mysql_num_rows($result)>0);
         {
          $result_news = mysql_fetch_array($result);
           echo "<tr class='delit'><td>".$TEXT['new-now'].$result_news['header']."</td></tr>";
          }
?>
</table>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table>
<tr><td></td><td>
<input class="button" type=submit value='<?php echo $button; ?>' />
<input type=hidden name=news_id value='<?php echo $old_new; ?>' />
</td></tr>
</table>
</form>
<?php
  require_once "../util/bottom.php";
?>