<?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['upr-title-add'];
  $button = $TEXT['btn_add'];
  $action = "add.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();}
?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post>
<table align="center" >
<tr><td class="bold_it_page"><?php echo $TEXT['upr-srv']; ?>*</td>
    <td><select name="srv_id">
    <?php
        $query1 = "SELECT srv_id, name, descr FROM `tbl_srv` ORDER BY name";
        $srv_tmp = mysqli_query($dbcnx,$query1);
          if(!$srv_tmp) {puterror2($TEXT['error-tbl1']);}
              while($srv = mysqli_fetch_array($srv_tmp,MYSQLI_ASSOC))
                {
                $chk = "<option value=".$srv['srv_id'].">".$srv['name']."(".$srv['descr'].")";
                echo $chk;
                }
    ?>
    </select></td></tr>
<tr><td class="bold_it_page"><?php echo $TEXT['upr-type']; ?>*</td>
    <td>
        <select name=comanda>
          <option value='scp' ><?php echo $TEXT['upr-vnesh']; ?>
          <option value='cp' ><?php echo $TEXT['upr-vnutr']; ?>
       </select>
    </td></tr>
<tr><td class="bold_it_page"><?php echo $TEXT['login-login']; ?>*</td><td><input size=30 maxlength=255 type=text name=usr ></td></tr>
<tr><td class="bold_it_page"><?php echo $TEXT['login-password']; ?>*</td><td><input size=30 maxlength=100 type=password name=pwd ></td></tr>
<tr><td class="bold_it_page"><?php echo $TEXT['login-locpath']; ?></td><td><input size=30 maxlength=255 type=text name=locpath value="<?php echo $base_local_path; ?>"></td></tr>
<tr><td class="bold_it_page"><?php echo $TEXT['upr-key-fr']; ?>*</td><td><input size=30 maxlength=255 type=password name=kfr ></td></tr>
<tr><td class="bold_it_page"><?php echo $TEXT['srv-vkl']; ?></td><td><input type=checkbox name=vkl ></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";
?>