<?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/".$lang."/ru.php";

  $title=$titlepage = $TEXT['edit-disk-help'];
  $helppage = "";

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

  if(!isset($button)) $button = $TEXT['btn_edit'];
  if(!isset($action)) $action = "edit.php";

  if($result2['administrator'] == 0) puterror2($TEXT['error-loginform2']);

  if(empty($_GET['ond_id'])) puterror2($TEXT['error-ondisk7']);
  if(strlen($_GET['ond_id'])>12) puterror2($TEXT['error-ondisk8']);
  $_GET['ond_id'] = rep($_GET['ond_id']);

  $old_ond_id = $_GET['ond_id'];

  $query_cl = "SELECT * FROM `tbl_ondisk` WHERE `ond_id`='".$_GET['ond_id']."' ";
  $result_cl = mysql_query($query_cl);
  if (!$result_cl) puterror2($TEXT['error-tbl9']);
      $result2_cl = mysql_fetch_array($result_cl);
         $fs = $result2_cl['disk_name'];
         $tm = $result2_cl['mp'];

?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table align="center" border="0" width="35%">
<tr><td class="useraddedit"><?php echo $TEXT['ondisk_fs']; ?></td><td class="useraddedit"><input size=20 maxlength=255 type=text name=fs value=<?php echo $fs; ?>></td></tr>
<tr><td class="useraddedit"><?php echo $TEXT['ondisk_tm']; ?></td><td class="useraddedit"><input size=20 maxlength=255 type=text name=tm value=<?php echo $tm; ?>></td></tr>
<tr><td></td><td>
<input class="button" type=submit value='<?php echo $button; ?>' />
<input type=hidden name=ond_id value='<?php echo $old_ond_id; ?>' />
</td></tr>
</table>
</form>
<?php
  require_once "../util/bottom.php";
?>
