<?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['menu-btn35'];

  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_run'];
  $action = "wakefrmres.php";

?>
<form enctype='multipart/form-data' action=<?php echo $action; ?> method=post >
<table align="center" class="table" border="0" cellpadding="0" cellspacing="0" width="80%">
<tr>
    <td class="bold_it_page" ><?php echo $TEXT['srv-name']; ?>:&nbsp;</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) {puterror($result2['skin'],$TEXT['error-tbl1']); require_once "../utils/bottom_adm.php"; exit();}
              while($srv = mysqli_fetch_array($srv_tmp,MYSQLI_ASSOC))
                {
                 if(trim($srv['descr']) == '')
                   {
                   $chk = "<option selected value=".$srv['srv_id'].">".$srv['name'];
                   }
                 else {$chk = "<option value=".$srv['srv_id'].">".$srv['name']."(".$srv['descr'].")";}
                 echo $chk;
                }
    ?>
    </select><input type="checkbox" name="srv_ch" ><?php echo $TEXT['login-all']; ?></td>
    <td></td>
</tr>
<tr>
    <td class="bold_it_page" ><?php echo $TEXT['grp-addr-del1']; ?>:&nbsp;</td>
    <td><input size="24" maxlength="15" type="text" name="addr"></td>
</tr>
<tr>
    <td class="bold_it_page" ><?php echo $TEXT['grp-addr-del2']; ?>:&nbsp;</td>
    <td><input size="24" maxlength="15" type="text" name="name"></td>
</tr>
<tr>
    <td class="bold_it_page" ><?php echo $TEXT['grp-addr-del3']; ?>:&nbsp;</td>
    <td><input size="24" maxlength="15" type="text" name="descr"></td>
</tr>
<tr>
    <td class="bold_it_page"><?php echo $TEXT['addr-vkl-tit']; ?>:&nbsp;</td>
    <td class="del_frm_chkb">
        <input type=checkbox name=vkl_ip ><img align="bottom" alt="<?php echo $TEXT['addr-vikluchit']; ?>" src="../skins/<?php echo $result2['skin']; ?>/online.png" />&nbsp;(<?php echo $TEXT['addr-vkluchit2']; ?>)<br />
        <input type=checkbox name=vikl_ip ><img alt="<?php echo $TEXT['addr-vkluchit']; ?>" src="../skins/<?php echo $result2['skin']; ?>/offline.png" />&nbsp;(<?php echo $TEXT['addr-vikluchit2']; ?>)
    </td>
</tr>
<tr>
    <td class="bold_it_page" ><input class="button" type=submit value='<?php echo $button; ?>'></td>
    <td></td>
</tr>
</table>
</form>
<?php
  require_once "../utils/bottom_adm.php";
?>