<?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 = $TEXT['ondisk_edit'];
  $button = $TEXT['btn_save'];
  $action = "edit.php";

  require_once "../config_a.php";
  require_once "../utils/functions.php";
  require_once "../utils/top_adm.php";

  if($result2['administrator'] == 0) {puterror($result2['skin'],$TEXT['error-loginform2']); require_once "../utils/bottom_adm.php"; exit();}
  if(empty($_GET['ond_id'])) {puterror($result2['skin'],$TEXT['error-ondisk7']); require_once "../utils/bottom_adm.php"; exit();}
  if(strlen($_GET['ond_id'])>12) {puterror($result2['skin'],$TEXT['error-ondisk8']); require_once "../utils/bottom_adm.php"; exit();}
  $_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 = mysqli_query($dbcnx,$query_cl);
  if(!$result_cl) {puterror($result2['skin'],$TEXT['error-tbl9']); require_once "../utils/bottom_adm.php"; exit();}
      $result2_cl = mysqli_fetch_array($result_cl,MYSQLI_ASSOC);
         $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="50%">
<tr><td class="bold_it_page"><?php echo $TEXT['ondisk_fs']; ?></td><td><input size=20 maxlength=255 type=text name=fs value=<?php echo $fs; ?>></td></tr>
<tr><td class="bold_it_page"><?php echo $TEXT['ondisk_tm']; ?></td><td><input size=20 maxlength=255 type=text name=tm value=<?php echo $tm; ?>></td></tr>
<tr><td></td><td>
<input class="button2" 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 "../utils/bottom_adm.php";
?>