<?php
 ///////////////////////////////////////////////////
 //2010 (C)
 //Карпухин Павел
 ///////////////////////////////////////////////////
require_once "../utils/chlang.php";

$title = $TEXT['libr-title'];

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();}

  $button = $TEXT['btn_save'];
  $action = "edit.php";

  if(strlen($_GET['libr_id'])>5) {puterror($result2['skin'],$TEXT['error-libr6']); require_once "../utils/bottom_adm.php"; exit();}
  $_GET['libr_id'] = rep($_GET['libr_id']);
  
  $old_libr_id = $_GET['libr_id'];

  $query10 = "SELECT * FROM `tbl_biblioteka` WHERE `bibl_id`='".$_GET['libr_id']."' ";
  $result10 = mysqli_query($dbcnx,$query10);
  if(!$result10) {puterror($result2['skin'],$TEXT['error-tbl2']); require_once "../utils/bottom_adm.php"; exit();}
   $result_libr = mysqli_fetch_array($result10);
    $libr = $result_libr['name'];
    $addr = $result_libr['address_bibl'];
?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table align="center">
<tr><td class="inform"><?php echo $TEXT['tbl-libr']; ?>:</td><td><input size=50 maxlength=127 type=text name=libr value='<?php echo $libr; ?>' /></td></tr>
<tr><td class="inform"><?php echo $TEXT['user-adrr']; ?>:</td><td><input size=50 maxlength=127 type=text name=addr value='<?php echo $addr; ?>' /></td></tr>
<tr><td></td><td>
<input class="button2" type="submit" value='<?php echo $button; ?>' />
<input type="hidden" name=libr_id value='<?php echo $old_libr_id; ?>' />
</td></tr>
</table>
</form>
<?php
require_once "../utils/bottom_adm.php";
?>