<?php
  ///////////////////////////////////////////////////
  //2010 (C)
  //Карпухин Павел
  ///////////////////////////////////////////////////

  $dblocation = "localhost"; // адрес mysql сервера
  $dbport = "3306"; // порт mysql сервера
  $dbname = "db_manydhcp"; // имя базы данных
  $dbuser = "manydhcp_user"; // логин
  $dbpasswd = "manydhcp_user"; // пароль
  //$usr_pass кол-во символов в пароле для пользователей
  //$sams показывать статистику по sams
  //$opt_hst_nm использовать опцию host-name и раздавать имена хостам
  $admin_mail = "e-mail@domain.ru"; //адрес для посылки административных сообщений
  $int_proxy = ""; //адрес прокси-сервера tcp://ip-address:port
  $filep="/dev/null/dhcp-test-local-copy.conf"; //путь для сохранения файла (в настройках выбран пункт "локальный сервер")

  $TEXT['about-width'] = "520"; // ширина формы - инф. о программе
  $TEXT['about-height'] = "260"; // высота формы - инф. о программе
  $TEXT['about-top'] = "250"; // выравнивание на экране (пикселей от верхнего края) - о программе
  $TEXT['about-left'] = "350"; // выравнивание на экране (пикселей от левого края) - о программе

  $dbcnx = mysqli_connect($dblocation,$dbuser,$dbpasswd);
  if(!$dbcnx)
  {
    echo "<html>
            <head>
            <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
            <link rel='StyleSheet' type='text/css' href='skins/base/reader.css' />
            <link rel='icon' href='favicon.ico' type='image/x-icon' />
            <link rel='shortcut icon' href='favicon.ico' type='image/x-icon' />
            <title>".$TEXT['global-title']."</title>
            </head><body>
            <table align='center' width='95%' border='0' cellspacing='0' cellpadding='0'>
            <tr><td width='16'>&nbsp;</td><td></td><td width='16'>&nbsp;</td></tr>
            <tr><td class='osn_top_r'></td><td class='osn_top'></td><td class='osn_top_l'></td></tr>
            <tr><td class='osn_left'>&nbsp;</td><td class='osn_center'><table align='center' border='0'><tr align='center' ><td><img alt='stop' src='skins/base/stop.png' /></td></tr><tr  align='center' ><td><span class='bold_it'>".$TEXT['error-conf3']."</span></td></tr></table><td class='osn_right'>&nbsp;</td></tr>
            <tr><td class='osn_bottom_r'></td><td class='osn_bottom'></td><td class='osn_bottom_l'></td></tr>
            </table></body></html>";
    exit();
  }
  mysqli_query($dbcnx,"SET CHARACTER SET 'utf8'") or exit('SET CHARACTER SET error');
  mysqli_query($dbcnx,"SET character_set_client='utf8'") or exit('SET character_set_client error');
  mysqli_query($dbcnx,"SET character_set_results='utf8'") or exit('SET character_set_results error');
  mysqli_query($dbcnx,"SET collation_connection='utf8_general_ci'") or exit('SET collation_connection error');
  mysqli_query($dbcnx,"SET NAMES `utf8`") or exit('SET NAMES error');
  if (!mysqli_select_db($dbcnx,$dbname))
  {
    echo "<html>
            <head>
            <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
            <link rel='StyleSheet' type='text/css' href='skins/base/reader.css' />
            <link rel='icon' href='favicon.ico' type='image/x-icon' />
            <link rel='shortcut icon' href='favicon.ico' type='image/x-icon' />
            <title>".$TEXT['global-title']."</title>
            </head><body>
            <table align='center' width='95%' border='0' cellspacing='0' cellpadding='0'>
            <tr><td width='16'>&nbsp;</td><td></td><td width='16'>&nbsp;</td></tr>
            <tr><td class='osn_top_r'></td><td class='osn_top'></td><td class='osn_top_l'></td></tr>
            <tr><td class='osn_left'>&nbsp;</td><td class='osn_center'><table align='center' border='0'><tr align='center' ><td><img alt='stop' src='skins/base/stop.png' /></td></tr><tr  align='center' ><td><span class='bold_it'>".$TEXT['error-conf3']."</span></td></tr></table><td class='osn_right'>&nbsp;</td></tr>
            <tr><td class='osn_bottom_r'></td><td class='osn_bottom'></td><td class='osn_bottom_l'></td></tr>
            </table></body></html>";
    exit();
  }

  $query_iskh_srv = "SELECT * FROM `tbl_srvparam` LIMIT 1";
  $result_iskh_srv = mysqli_query($dbcnx,$query_iskh_srv);
  if(!$result_iskh_srv) {puterror($result2['skin'],$TEXT['error-tbl14']); require_once "../utils/bottom_adm.php"; exit();}
   $result_iskh_many_srv = mysqli_fetch_array($result_iskh_srv,MYSQLI_ASSOC);
   $usr_pass = $result_iskh_many_srv['usrpass'];
   $sams = $result_iskh_many_srv['sams'];
?>