Ejemplo n.º 1
0
 }
 if ($enable_forwarding === "false" || empty($enable_forwarding)) {
     $enable_forwarding_false = "checked";
 }
 if ($allow_deny === "allow") {
     $allow_deny_allow = "checked";
 }
 if ($allow_deny === "deny") {
     $allow_deny_deny = "checked";
 }
 if ($allow_deny === "na" || empty($allow_deny)) {
     $allow_deny_na = "checked";
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('pool_name', $val->ValidateXSS($pool_name), NULL, NULL);
 $tpl->assign('dns_server_1', $val->ValidateXSS($dns_server_1), NULL, NULL);
 $tpl->assign('dns_server_2', $val->ValidateXSS($dns_server_2), NULL, NULL);
 $tpl->assign('router', $val->ValidateXSS($router), NULL, NULL);
 $tpl->assign('pools', $pools, NULL, NULL);
 $tpl->assign('list', $list, NULL, NULL);
 $tpl->assign('scope_range_1', $val->ValidateXSS($scope_range_1), NULL, NULL);
 $tpl->assign('scope_range_2', $val->ValidateXSS($scope_range_2), NULL, NULL);
 $tpl->assign('bootp_filename', $val->ValidateXSS($bootp_filename), NULL, NULL);
 $tpl->assign('bootp_server', $val->ValidateXSS($bootp_server), NULL, NULL);
 $tpl->assign('enable_forwarding_true', $val->ValidateXSS($enable_forwarding_true), NULL, NULL);
 $tpl->assign('enable_forwarding_false', $val->ValidateXSS($enable_forwarding_false), NULL, NULL);
 $tpl->assign('allow_deny_allow', $val->ValidateXSS($allow_deny_allow), NULL, NULL);
 $tpl->assign('allow_deny_deny', $val->ValidateXSS($allow_deny_deny), NULL, NULL);
 $tpl->assign('allow_deny_na', $val->ValidateXSS($allow_deny_na), NULL, NULL);
 $e = $err->GenerateErrorImg($defined['error'], "help/help.html#import_host", '800', '800');
 if ($tmp[$x]['hostname'] === $found[0]['hostname']) {
     $list .= "<li>Hostname field already exists in database</li>";
     $hostname_err[] = $e;
 }
 if ($tmp[$x]['mac_address'] === $found[0]['mac-address']) {
     $list .= "<li>MAC Address field already exists in database</li>";
     $mac_address_err[] = $e;
 }
 if ($tmp[$x]['ip_address'] === $found[0]['ip-address']) {
     $list .= "<li>IP Address field already exists in database</li>";
     $ip_address_err[] = $e;
 }
 $error = $err->GenerateErrorLink("help/help.html", "#import_host", $defined['error'], $errors['val_missing'] . $list, NULL, NULL);
 // begin populating our duplicate record data
 $tpl->assign('hostname_dup', $val->ValidateXSS($found[0]['hostname']), NULL, NULL);
 $tpl->assign('mac_address_dup', $val->ValidateXSS($found[0]['mac-address']), NULL, NULL);
 $tpl->assign('ip_address_dup', $val->ValidateXSS($found[0]['ip-address']), NULL, NULL);
 $tpl->assign('subnet_dup', $val->ValidateXSS($found[0]['subnet']), NULL, NULL);
 $tpl->assign('pxe_group_dup', $val->ValidateXSS($found[0]['pxe-group']), NULL, NULL);
 // If a duplicate record exists matching the hostname, ip address, or mac address field display it
 $tpl->assign('hostname_tmp', $val->ValidateXSS($tmp[$x]['hostname']), NULL, NULL);
 $tpl->assign('mac_address_tmp', $val->ValidateXSS($tmp[$x]['mac_address']), NULL, NULL);
 $tpl->assign('ip_address_tmp', $val->ValidateXSS($tmp[$x]['ip_address']), NULL, NULL);
 $tpl->assign('subnet_tmp', $subnet_tmp, NULL, NULL);
 $tpl->assign('pxe_group_tmp', $pxe_group_tmp, NULL, NULL);
 // and the corresponding error
 $tpl->assign('hostname_tmp_err', $hostname_tmp_err, NULL, NULL);
 $tpl->assign('mac_address_tmp_err', $mac_address_tmp_err, NULL, NULL);
 $tpl->assign('ip_address_tmp_err', $ip_address_tmp_err, NULL, NULL);
 $tpl->assign('subnet_tmp_err', $subnet_tmp_err, NULL, NULL);
         $peer_name = $data[0]['peer name'];
         $primary = $data[0]['type'];
         $address = $data[0]['address'];
         $port = $data[0]['port'];
         $peer_address = $data[0]['peer address'];
         $peer_port = $data[0]['peer port'];
         $max_response_delay = $data[0]['max-response-delay'];
         $max_unacked_updates = $data[0]['max-unacked-updates'];
         $mclt = $data[0]['mclt'];
         $split = $data[0]['split'];
         $load_balance_max_seconds = $data[0]['load balance max seconds'];
     }
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('peer_name', $val->ValidateXSS($peer_name), NULL, NULL);
 $tpl->assign('primary', $val->ValidateXSS($primary), NULL, NULL);
 $tpl->assign('address', $val->ValidateXSS($address), NULL, NULL);
 $tpl->assign('port', $val->ValidateXSS($port), NULL, NULL);
 $tpl->assign('peer_address', $val->ValidateXSS($peer_address), NULL, NULL);
 $tpl->assign('peer_port', $val->ValidateXSS($peer_port), NULL, NULL);
 $tpl->assign('max_response_delay', $val->ValidateXSS($max_response_delay), NULL, NULL);
 $tpl->assign('max_unacked_updates', $val->ValidateXSS($max_unacked_updates), NULL, NULL);
 $tpl->assign('mclt', $val->ValidateXSS($mclt), NULL, NULL);
 $tpl->assign('split', $val->ValidateXSS($split), NULL, NULL);
 $tpl->assign('load_balance_max_seconds', $val->ValidateXSS($load_balance_max_seconds), NULL, NULL);
 // assign error messages
 $tpl->assign('peer_name_err', $peer_name_err, NULL, NULL);
 $tpl->assign('primary_err', $primary_err, NULL, NULL);
 $tpl->assign('address_err', $address_err, NULL, NULL);
Ejemplo n.º 4
0
         $bootp = $data[0]['bootp'];
     }
 }
 // quick fix for option elements
 if (!empty($ddns_update_style) && $ddns_update_style !== "---------") {
     $ddns_update_style = "<option value={$ddns_update_style}>{$ddns_update_style}</option>";
 }
 if (!empty($authoritative) && $authoritative !== "---------") {
     $authoritative = "<option value={$authoritative}>{$authoritative}</option>";
 }
 if (!empty($bootp) && $bootp !== "---------") {
     $bootp = "<option value={$bootp}>{$bootp}</option>";
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('domain_name', $val->ValidateXSS($domain_name), NULL, NULL);
 $tpl->assign('dns_server_list', $val->ValidateXSS($dns_server_list), NULL, NULL);
 $tpl->assign('default_lease_time', $val->ValidateXSS($default_lease_time), NULL, NULL);
 $tpl->assign('max_lease_time', $val->ValidateXSS($max_lease_time), NULL, NULL);
 $tpl->assign('time_offset', $val->ValidateXSS($time_offset), NULL, NULL);
 $tpl->assign('routers', $val->ValidateXSS($routers), NULL, NULL);
 $tpl->assign('lpr_server_list', $val->ValidateXSS($lpr_server_list), NULL, NULL);
 $tpl->assign('broadcast_addr', $val->ValidateXSS($broadcast_addr), NULL, NULL);
 $tpl->assign('subnet_mask_addr', $val->validateXSS($subnet_mask_addr), NULL, NULL);
 $tpl->assign('server_ident', $val->ValidateXSS($server_ident), NULL, NULL);
 $tpl->assign('ddns_update_style', $ddns_update_style, NULL, NULL);
 $tpl->assign('authoritative', $authoritative, NULL, NULL);
 $tpl->assign('bootp', $bootp, NULL, NULL);
 // assign error messages
 $tpl->assign('domain_name_err', $domain_name_err, NULL, NULL);
Ejemplo n.º 5
0
         $mtftp_delay = $data[0]['mtftp-delay'];
         $discovery_control = $data[0]['discovery-control'];
         $discovery_mcast_addr = $data[0]['discovery-mcast-addr'];
     }
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 if ($pxe_enabled === "true") {
     $pxe_enabled_true = "checked";
 }
 if ($pxe_enabled === "false" || empty($pxe_enabled)) {
     $pxe_enabled_false = "checked";
 }
 $tpl->assign('pxe_enabled_true', $pxe_enabled_true, NULL, NULL);
 $tpl->assign('pxe_enabled_false', $pxe_enabled_false, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('option_space', $val->ValidateXSS($option_space), NULL, NULL);
 $tpl->assign('mtftp_ip', $val->ValidateXSS($mtftp_ip), NULL, NULL);
 $tpl->assign('mtftp_cport', $val->ValidateXSS($mtftp_cport), NULL, NULL);
 $tpl->assign('mtftp_sport', $val->ValidateXSS($mtftp_sport), NULL, NULL);
 $tpl->assign('mtftp_tmout', $val->ValidateXSS($mtftp_tmout), NULL, NULL);
 $tpl->assign('mtftp_delay', $val->ValidateXSS($mtftp_delay), NULL, NULL);
 $tpl->assign('discovery_control', $val->ValidateXSS($discovery_control), NULL, NULL);
 $tpl->assign('discovery_mcast_addr', $val->ValidateXSS($discovery_mcast_addr), NULL, NULL);
 // assign error messages
 $tpl->assign('pxe_enabled_err', $pxe_enabled_err, NULL, NULL);
 $tpl->assign('option_space_err', $option_space_err, NULL, NULL);
 $tpl->assign('mtftp_ip_err', $mtftp_ip_err, NULL, NULL);
 $tpl->assign('mtftp_cport_err', $mtftp_cport_err, NULL, NULL);
 $tpl->assign('mtftp_sport_err', $mtftp_sport_err, NULL, NULL);
 $tpl->assign('mtftp_tmout_err', $mtftp_tmout_err, NULL, NULL);
Ejemplo n.º 6
0
       <tr>
        <td colspan="3">
         <a href="javascript:popUp('../help/help.html#app_setup','800','800')">
          <img src="<?php 
echo $STYLE;
?>
/images/help02.jpg" border="0" alt="">
         </a>
         &nbsp;&nbsp;<b>The MySQL Administrative user</b><br>
         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In order for this application to import the database schema, create a default user account used by the phpDHCPAdmin application you need to provide the username and password that has the 'create, modify and grant' privileges needed by the MySQL service.
        </td>
       </tr>
       <tr>
        <td width="5%" nowrap><b>MySQL Root User:</b></td>
        <td><input type="text" name="mysql_root_user" value="<?php 
echo $val->ValidateXSS($_POST['mysql_root_user']);
?>
" style="width: 100%"></td>
        <td class="copyright" nowrap><?php 
echo $mysql_root_user_err;
?>
* root</td>
       </tr>
       <tr>
        <td nowrap><b>MySQL Root Password:</b></td>
        <td><input type="password" name="mysql_root_passwd" value="<?php 
echo $val->ValidateXSS($_POST['mysql_root_passwd']);
?>
" style="width: 100%"></td>
        <td class="copyright" nowrap><?php 
echo $mysql_root_passwd_err;
Ejemplo n.º 7
0
                         $hostname = $data[0]['hostname'];
                         $hardware = $data[0]['hardware'];
                         $ip = $data[0]['ip'];
                         $state = $data[0]['current-state'];
                         $next_state = $data[0]['next-state'];
                         $start = $data[0]['start'];
                         $end = $data[0]['end'];
                         $cltt = $data[0]['cltt'];
                         $abandoned = $data[0]['abandoned'];
                         $circut_id = $data[0]['circut-id'];
                         $remote_id = $data[0]['remote-id'];
                         $ddns_text = $data[0]['ddns-text'];
                         $ddns_fwd_name = $data[0]['ddns-fwd-name'];
                         $ddns_client_fqdn = $data[0]['ddns-client-fqdn'];
                         $ddns_rev_name = $data[0]['ddns-rev-name'];
                         $error = $err->GenerateErrorLink("help/help.html", "#lease_search", $defined['good'], "Your search for '" . $val->ValidateXSS($search) . "' returned '" . $db->dbNumRows($value) . "' results. The form has been populated for you to edit record #" . $id, NULL, NULL);
                     } else {
                         $lease_list = $misc->GenJumpMenuBoxLEASES($data, 'lease_list', $_GET['skin']);
                         $error = $err->GenerateErrorLink("help/help.html", "#lease_search", $defined['good'], "Your search for '" . $val->ValidateXSS($search) . "' returned '" . $db->dbNumRows($value) . "' results. Please select the host you wish to edit from the select box below", NULL, NULL);
                     }
                 } else {
                     $error = $err->GenerateErrorLink("help/help.html", "#lease_search", $defined['error'], $errors['sql_empty'], NULL, NULL);
                 }
             }
         } else {
             $search_err = $err->GenerateErrorImg($defined['error'], "help/help.html#lease_search", '800', '800');
             $list = "<ol><li>Search string is invalid. Allowed formats:<br>MAC Address: xx:xx:xx:xx:xx<br>IPv4 Address: xxx.xxx.xxx.xxx<br>Hostname: [0-9a-z]</li></ol>";
             $error = $err->GenerateErrorLink("help/help.html", "#lease_search", $defined['error'], $errors['val_host'] . $list, NULL, NULL);
         }
     }
 } else {
 if ($group === "admin") {
     $grp = "SELECT `group` FROM `auth_groups` ORDER BY `group` ASC";
 } else {
     $grp = "SELECT `group` FROM `auth_groups` WHERE `group` = \"" . $group . "\" ORDER BY `group` ASC";
 }
 if (($return = $db->dbQuery($val->ValidateSQL($grp, $dbconn), $dbconn)) !== -1) {
     $grps = $db->dbArrayResultsAssoc($return);
 }
 if (count($grps) === 0) {
     $user_group = "No Groups defined";
 } else {
     $user_group = $misc->GenDropMenuWSelectedGroups($grps, $user_group, 'user_group');
 }
 // assign our data to the template
 $tpl->assign('message', $message, NULL, NULL);
 $tpl->assign('user_id', $val->ValidateXSS($user_id), NULL, NULL);
 $tpl->assign('user_group', $user_group, NULL, NULL);
 $tpl->assign('user_list', $user_list, NULL, NULL);
 $tpl->assign('user_pw_list', $user_pw_list, NULL, NULL);
 $tpl->assign('user_access_level', $user_access_level, NULL, NULL);
 $tpl->assign('user_username', $val->ValidateXSS($user_username), NULL, NULL);
 $tpl->assign('user_fname', $val->ValidateXSS($user_fname), NULL, NULL);
 $tpl->assign('user_lname', $val->ValidateXSS($user_lname), NULL, NULL);
 $tpl->assign('user_department', $val->ValidateXSS($user_department), NULL, NULL);
 $tpl->assign('user_contact', $val->ValidateXSS($user_contact), NULL, NULL);
 $tpl->assign('user_address', $val->ValidateXSS($user_address), NULL, NULL);
 $tpl->assign('user_phone', $val->ValidateXSS($user_phone), NULL, NULL);
 $tpl->assign('user_email', $val->ValidateXSS($user_email), NULL, NULL);
 // and the corresponding errors if any
 $tpl->assign('user_group_err', $user_group_err, NULL, NULL);
 $tpl->assign('user_access_level_err', $user_access_level_err, NULL, NULL);
         $list .= "</ol>";
         // give them an error message with link to the help file
         $message = $err->GenerateErrorLink("help/help.php", "#val_missing", $defined['error'], $errors['val_missing'] . $list, '600', '600');
     }
 }
 // get a list of current groups
 if (count($group_list) === 0) {
     $group_query = "SELECT * FROM `auth_groups` ORDER BY `group` ASC";
     if (($current = $db->dbQuery($val->ValidateSQL($group_query, $dbconn), $dbconn)) !== -1) {
         $group_list = $db->dbArrayResultsAssoc($current);
     }
     $group_list = $misc->GenJumpMenuBoxGROUPS($group_list, 'group_list', $_GET['skin']);
 }
 // assign our data to the template
 $tpl->assign('message', $message, NULL, NULL);
 $tpl->assign('group_id', $val->ValidateXSS($group_id), NULL, NULL);
 $tpl->assign('group_list', $group_list, NULL, NULL);
 $tpl->assign('group_name', $val->ValidateXSS($group_name), NULL, NULL);
 $tpl->assign('group_manager', $val->ValidateXSS($group_manager), NULL, NULL);
 $tpl->assign('group_contact', $val->ValidateXSS($group_contact), NULL, NULL);
 $tpl->assign('group_description', $val->ValidateXSS($group_description), NULL, NULL);
 // and the corresponding errors if any
 $tpl->assign('group_list_err', $group_list_err, NULL, NULL);
 $tpl->assign('group_name_err', $group_name_err, NULL, NULL);
 $tpl->assign('group_manager_err', $group_manager_err, NULL, NULL);
 $tpl->assign('group_contact_err', $group_contact_err, NULL, NULL);
 $tpl->assign('group_description_err', $group_description_err, NULL, NULL);
 // Do some cleaning before leaving
 $misc->CleanUpVars($_POST, NULL);
 // Perform analyze, repair and optimize on used tables
 $db->dbFixTable("auth_groups", $dbconn);
Ejemplo n.º 10
0
 if (($current = $db->dbQuery($val->ValidateSQL($secopts, $dbconn), $dbconn)) !== -1) {
     $dnssecopts = $db->dbArrayResultsAssoc($current);
 }
 $dnssec_opt = $misc->GenJumpMenuBoxDNSSEC($dnssecopts, 'dnssecopt', $_GET['skin']);
 // populate our `algorithm` list
 $alg = "SELECT `name` FROM `admin_config_algorithm` ORDER BY `name`";
 if (($return = $db->dbQuery($val->ValidateSQL($alg, $dbconn), $dbconn)) === -1) {
     $error = $err->GenerateErrorLink("help/help.html", "#config_dnssec", $defined['error'], $errors['db_select'], NULL, NULL);
 } else {
     $algs = $db->dbArrayResultsAssoc($return);
 }
 $algorithm = $misc->GenDropMenuWSelected($algs, $algorithm, 'algorithm');
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('dnssec_opt', $dnssec_opt, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('key_name', $val->ValidateXSS($key_name), NULL, NULL);
 $tpl->assign('algorithm', $algorithm, NULL, NULL);
 $tpl->assign('key', $val->ValidateXSS($key), NULL, NULL);
 // assign error messages
 $tpl->assign('dnssec_opt_err', $dnssec_opt_err, NULL, NULL);
 $tpl->assign('key_name_err', $key_name_err, NULL, NULL);
 $tpl->assign('algorithm_err', $algorithm_err, NULL, NULL);
 $tpl->assign('key_err', $key_err, NULL, NULL);
 // Do some cleaning before leaving
 $misc->CleanUpVars($_POST, NULL);
 // Perform analyze, repair and optimize on used tables
 $db->dbFixTable("conf_dnssec_opts", $dbconn);
 // Free db handle and close connection(s)
 $db->dbFreeData($dbconn);
 $db->dbCloseConn($dbconn);
Ejemplo n.º 11
0
     } else {
         $dnssec_key = $misc->GenDropMenuWSelectedDNS($list, $dnssec_key, 'dnssec_key');
     }
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('dns_opt', $dns_opt, NULL, NULL);
 if ($dnssec_enabled === "true") {
     $dnssec_enabled_true = "checked";
 }
 if ($dnssec_enabled === "false" || empty($dnssec_enabled)) {
     $dnssec_enabled_false = "checked";
 }
 $tpl->assign('dnssec_enabled_true', $dnssec_enabled_true, NULL, NULL);
 $tpl->assign('dnssec_enabled_false', $dnssec_enabled_false, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('zone', $val->ValidateXSS($zone), NULL, NULL);
 $tpl->assign('primary', $val->ValidateXSS($primary), NULL, NULL);
 $tpl->assign('dnssec_key', $dnssec_key, NULL, NULL);
 // assign error messages
 $tpl->assign('dns_opt_err', $dns_opt_err, NULL, NULL);
 $tpl->assign('dnssec_enabled_err', $dnssec_enabled_err, NULL, NULL);
 $tpl->assign('zone_err', $zone_err, NULL, NULL);
 $tpl->assign('primary_err', $primary_err, NULL, NULL);
 $tpl->assign('file_name_err', $file_name_err, NULL, NULL);
 $tpl->assign('dnssec_key_err', $dnssec_key_err, NULL, NULL);
 // Do some cleaning before leaving
 $misc->CleanUpVars($_POST, NULL);
 // Perform analyze, repair and optimize on used tables
 $db->dbFixTable("conf_dns_opts", $dbconn);
 // Free db handle and close connection(s)
Ejemplo n.º 12
0
         }
         // process our query
         if (($value = $db->dbQuery($val->ValidateSQL($query, $dbconn), $dbconn)) === -1) {
             $error = $err->GenerateErrorLink("help/help.html", "#host_search", $defined['error'], $errors['db_search_err'], NULL, NULL);
         } else {
             // process results of search
             if ($db->dbNumRows($value) >= 1) {
                 $data = $db->dbArrayResultsAssoc($value);
                 if ($db->dbNumRows($value) === 1) {
                     $id = $data[0]['id'];
                     $hostname = $data[0]['hostname'];
                     $mac_address = $data[0]['mac-address'];
                     $ip_address = $data[0]['ip-address'];
                     $subnet_name = $data[0]['subnet-name'];
                     $pxe_group = $data[0]['pxe-group'];
                     $error = $err->GenerateErrorLink("help/help.html", "#host_search", $defined['good'], "Your search for '" . $val->ValidateXSS($search) . "' returned '" . $db->dbNumRows($value) . "' results. The form has been populated for you to edit record #" . $id, NULL, NULL);
                 } else {
                     $hosts_list = $misc->GenJumpMenuBoxHOSTS($data, 'hosts_list', $_GET['skin'], NULL);
                     $error = $err->GenerateErrorLink("help/help.html", "#host_search", $defined['good'], "Your search for '" . $val->ValidateXSS($search) . "' returned '" . $db->dbNumRows($value) . "' results. Please select the host you wish to edit from the select box below", NULL, NULL);
                 }
             } else {
                 $error = $err->GenerateErrorLink("help/help.html", "#host_search", $defined['error'], $errors['sql_empty'], NULL, NULL);
             }
         }
     } else {
         $search_err = $err->GenerateErrorImg($defined['error'], "help/help.html#host_search", '800', '800');
         $list = "<ol><li>Search string is invalid. Allowed formats:<br>MAC Address: xx:xx:xx:xx:xx<br>IPv4 Address: xxx.xxx.xxx.xxx<br>Hostname: [0-9a-z]</li></ol>";
         $error = $err->GenerateErrorLink("help/help.html", "#host_search", $defined['error'], $errors['val_host'] . $list, NULL, NULL);
     }
 } else {
     $sql_success = -1;
     } else {
         $select_groups = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], "No groups defined", NULL, NULL);
     }
 } else {
     $select_groups = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], $errors['db_select_err'], NULL, NULL);
 }
 // configure radio buttons
 if ($enable_forwarding === "true") {
     $enable_forwarding_true = "checked";
 }
 if ($enable_forwarding === "false" || empty($enable_forwarding)) {
     $enable_forwarding_false = "checked";
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('shared_network_name', $val->ValidateXSS($shared_network), NULL, NULL);
 $tpl->assign('shared_networks', $shared_networks, NULL, NULL);
 $tpl->assign('subnet_checkboxes', $subnet_checks, NULL, NULL);
 $tpl->assign('dns_server_1', $val->ValidateXSS($dns_server_1), NULL, NULL);
 $tpl->assign('dns_server_2', $val->ValidateXSS($dns_server_2), NULL, NULL);
 $tpl->assign('router', $val->ValidateXSS($router), NULL, NULL);
 $tpl->assign('bootp_filename', $val->ValidateXSS($bootp_filename), NULL, NULL);
 $tpl->assign('bootp_server', $val->ValidateXSS($bootp_server), NULL, NULL);
 $tpl->assign('subnets', $subnets, NULL, NULL);
 $tpl->assign('enable_forwarding_true', $val->ValidateXSS($enable_forwarding_true), NULL, NULL);
 $tpl->assign('enable_forwarding_false', $val->ValidateXSS($enable_forwarding_false), NULL, NULL);
 $tpl->assign('broadcast_address', $val->ValidateXSS($broadcast_address), NULL, NULL);
 $tpl->assign('netbios_servers', $val->ValidateXSS($netbios_servers), NULL, NULL);
 $tpl->assign('ntp_servers', $val->ValidateXSS($ntp_servers), NULL, NULL);
 $tpl->assign('default_lease', $val->ValidateXSS($default_lease), NULL, NULL);
 function BuildGETParams($get)
 {
     $val = new ValidateStrings();
     $data = "?";
     foreach ($get as $key => $value) {
         $data .= $val->ValidateXSS($key) . "=" . $val->ValidateXSS($value) . "&";
     }
     $data = substr_replace($data, '', -1, count($data));
     return $data;
 }
Ejemplo n.º 15
0
         if (!empty($_GET['id'])) {
             $sql = "SELECT * FROM `auth_groups_perms` WHERE `resource` = \"" . $subnet_name . "\"";
             if (($sql_res = $db->dbQuery($val->ValidateSQL($sql, $dbconn), $dbconn)) !== -1) {
                 $select_groups = $db->dbArrayResultsAssoc($sql_res);
             }
         }
         $select_groups = $misc->GenGroupsCheckBoxes($groups, 'select_groups', $_GET['skin'], $select_groups, $group);
     } else {
         $select_groups = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], "No groups defined", NULL, NULL);
     }
 } else {
     $select_groups = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], $errors['db_select_err'], NULL, NULL);
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('pxe_group_name', $val->ValidateXSS($pxe_group_name), NULL, NULL);
 $tpl->assign('pxe_server', $val->ValidateXSS($pxe_server), NULL, NULL);
 $tpl->assign('bootp_filename', $val->ValidateXSS($bootp_filename), NULL, NULL);
 $tpl->assign('assign_subnet', $assign_subnet, NULL, NULL);
 $tpl->assign('pxe_groups', $pxe_groups, NULL, NULL);
 $tpl->assign('select_groups', $select_groups, NULL, NULL);
 $tpl->assign('ex_group', $val->ValidateXSS($ex_group), NULL, NULL);
 // assign error messages
 $tpl->assign('pxe_group_name_err', $pxe_group_name_err, NULL, NULL);
 $tpl->assign('pxe_server_err', $pxe_server_err, NULL, NULL);
 $tpl->assign('bootp_filename_err', $bootp_filename_err, NULL, NULL);
 $tpl->assign('assign_subnet_err', $assign_subnet_err, NULL, NULL);
 $tpl->assign('pxe_groups_err', $pxe_err, NULL, NULL);
 $tpl->assign('select_groups_err', $select_groups_err, NULL, NULL);
 // Do some cleaning before leaving
Ejemplo n.º 16
0
         if (!empty($_GET['id'])) {
             $sql = "SELECT * FROM `auth_groups_perms` WHERE `resource` = \"" . $subnet_name . "\"";
             if (($sql_res = $db->dbQuery($val->ValidateSQL($sql, $dbconn), $dbconn)) !== -1) {
                 $select_groups = $db->dbArrayResultsAssoc($sql_res);
             }
         }
         $select_groups = $misc->GenGroupsCheckBoxes($groups, 'select_groups', $_GET['skin'], $select_groups, $group);
     } else {
         $select_groups = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], "No groups defined", NULL, NULL);
     }
 } else {
     $select_groups = $err->GenerateErrorLink("help/help.html", "#undef", $defined['error'], $errors['db_select_err'], NULL, NULL);
 }
 // Assign form variables
 $tpl->assign('error', $error, NULL, NULL);
 $tpl->assign('id', $val->ValidateXSS($id), NULL, NULL);
 $tpl->assign('class_name', $val->ValidateXSS($class_name), NULL, NULL);
 $tpl->assign('class_value', $val->ValidateXSS($class_value), NULL, NULL);
 $tpl->assign('class_option', $class_option, NULL, NULL);
 $tpl->assign('classes', $classes, NULL, NULL);
 $tpl->assign('encoded', $encoded, NULL, NULL);
 $tpl->assign('form', $form, NULL, NULL);
 $tpl->assign('count', $count, NULL, NULL);
 $tpl->assign('select_groups', $select_groups, NULL, NULL);
 $tpl->assign('ex_group', $val->ValidateXSS($ex_group), NULL, NULL);
 // assign error messages
 $tpl->assign('class_name_err', $class_name_err, NULL, NULL);
 $tpl->assign('class_option_err', $class_option_err, NULL, NULL);
 $tpl->assign('class_value_err', $class_value_err, NULL, NULL);
 $tpl->assign('classes_err', $classes_err, NULL, NULL);
 $tpl->assign('select_groups_err', $select_groups_err, NULL, NULL);