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

$title=$titlepage = $TEXT['menu-btn35-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_add'];
$action = "add.php";

$query_iskh = "SELECT MAX(position) AS position FROM `tbl_booklang` WHERE `use_prog`='1'";
 $result_iskh = mysqli_query($dbcnx,$query_iskh);
  if(!$result_iskh) {puterror($result2['skin'],$TEXT['error-tbl23']); require_once "../utils/bottom_adm.php"; exit();}
  $result_iskh2 = mysqli_fetch_array($result_iskh);
  $pos = $result_iskh2['position']+1;
?>
<form enctype="multipart/form-data" action="<?php echo $action; ?>" method="post">
<table align="center">
<tr><td class="inform"><?php echo $TEXT['menu-btn35']; ?>:</td><td><input size="40" maxlength="127" type="text" name="booklang" ></td></tr>
<tr><td class="inform"><?php echo $TEXT['global-alt']; ?>:</td><td><input size="30" type="file" name="photo" ></td></tr>
<tr><td class="inform"><?php echo $TEXT['book-lang-pos']; ?>:</td><td><input size="5" maxlength="5" type="text" name="position" value="<?php echo $pos; ?>" ></td></tr>
<tr><td></td><td><input class="button2" type="submit" value="<?php echo $button; ?>"></td></tr>
</table>
</form>
<?php
require_once "../utils/bottom_adm.php";
?>