From 02384bde543962b75426da92bd81d2a61c754487 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 07 Jun 2012 11:46:18 -0400 Subject: [PATCH] Implemented: FS#1977 - IP address(es) and * --- interface/web/sites/ajax_get_ip.php | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/interface/web/sites/ajax_get_ip.php b/interface/web/sites/ajax_get_ip.php index faf7753..bca24cc 100644 --- a/interface/web/sites/ajax_get_ip.php +++ b/interface/web/sites/ajax_get_ip.php @@ -33,6 +33,7 @@ //* Check permissions for module $app->auth->check_module_permissions('sites'); +$app->uses('getconf'); $server_id = intval($_GET["server_id"]); $client_group_id = intval($_GET["client_group_id"]); @@ -40,23 +41,26 @@ if($_SESSION["s"]["user"]["typ"] == 'admin' or $app->auth->has_clients($_SESSION['s']['user']['userid'])) { + //* Get global web config + $web_config = $app->getconf->get_server_config($server_id, 'web'); + $sql = "SELECT ip_address FROM server_ip WHERE ip_type = '$ip_type' AND server_id = $server_id"; $ips = $app->db->queryAllRecords($sql); // $ip_select = "<option value=''></option>"; if($ip_type == 'IPv4'){ - $ip_select = "*"; + $ip_select = ($web_config['enable_ip_wildcard'] == 'y')?"*#":""; } else { - $ip_select = ""; + $ip_select = "#"; } if(is_array($ips)) { foreach( $ips as $ip) { //$selected = ($ip["ip_address"] == $this->dataRecord["ip_address"])?'SELECTED':''; - $ip_select .= "#$ip[ip_address]"; + $ip_select .= "$ip[ip_address]#"; } } unset($tmp); unset($ips); } -echo $ip_select; +echo substr($ip_select,0,-1); ?> \ No newline at end of file -- Gitblit v1.9.1