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

?>
<table align="center" class="table" border="0" cellpadding="2" cellspacing="0" width="60%">
<?php
  if(strlen($_GET['res_id'])>11) puterror2($TEXT['error-res11']);
  if(empty($_GET['res_id'])) puterror2($TEXT['error-res10']);
  $_GET['res_id'] = rep($_GET['res_id']);

  $old_res_id = $_GET['res_id'];

  $query = "SELECT `resource` FROM `tbl_resource` WHERE `res_id`='$old_res_id'";
  $result = mysql_query($query);
  if (!$result) puterror2($TEXT['error-tbl16']);
       if (mysql_num_rows($result)>0);
         {
          $result_resource = mysql_fetch_array($result);
           echo "<tr class='delit'><td>".$TEXT['res-now'].$result_resource['resource']."</td></tr>";
          }
?>
</table>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table align="center">
<tr><td></td><td>
<input class="button" type=submit value='<?php echo $button; ?>' />
<input type=hidden name=res_id value='<?php echo $old_res_id; ?>' />
</td></tr>
</table>
</form>
<?php
  require_once "../util/bottom.php";
?>