예제 #1
0
     $tmp = $db->dbArrayResultsAssoc($value);
     // filter for empty stuff
     for ($x = 0; $x < count($tmp); $x++) {
         if (!empty($tmp[$x]['broadcast'])) {
             $interface_list[$tmp[$x]['name']] = $tmp[$x]['broadcast'];
         }
     }
 }
 // show the user the list of interfaces and their broadcast address
 if (($ilist = $misc->GenTableFromAssocArray($interface_list)) === -1) {
     $adapters = $err->GenerateErrorLink("help/help.html", "#config_subnet", $defined['error'], "There are no interfaces configured", NULL, NULL);
 } else {
     $adapters = $misc->GenTableFromAssocArray($interface_list);
 }
 // check service status
 if ($misc->GetDHCPDStatus() === 0) {
     $dhcpd_status = $err->GenerateErrorLink("help/help.html", "#status", $defined['good'], $errors['dhcpd_status'], NULL, NULL);
 } else {
     $dhcpd_status = $err->GenerateErrorLink("help/help.html", "#status", $defined['error'], $errors['dhcpd_status_err'], NULL, NULL);
 }
 // initialize a db connection handle
 $dbconn = $db->dbConnect($defined['dbhost'], $defined['username'], $defined['password'], $defined['dbname']);
 // provide count of online users
 $online = "SELECT * FROM `admin_sessions`";
 $ret = $db->dbQuery($val->ValidateSQL($online, $dbconn), $dbconn);
 $usersoline = $db->dbNumRows($ret);
 // Check to see if user has a the 'reset' flag for their password
 $query = "SELECT * FROM `auth_users` WHERE `username` = \"" . $username . "\" LIMIT 1";
 if (($value = $db->dbQuery($val->ValidateSQL($query, $dbconn), $dbconn)) === -1) {
     $error = $err->GenerateErrorLink("help/help.html", "#loggin", $defined['error'], $errors['db_select'], NULL, NULL);
 } else {