From 9cf2c25a64a23a1be36f9cd0af8aac150b659f14 Mon Sep 17 00:00:00 2001 From: latham <latham@ispconfig3> Date: Fri, 28 Oct 2011 11:33:06 -0400 Subject: [PATCH] start adding SPF by adding enum in table --- interface/web/sites/ajax_get_ip.php | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/interface/web/sites/ajax_get_ip.php b/interface/web/sites/ajax_get_ip.php index 62d62e8..faf7753 100644 --- a/interface/web/sites/ajax_get_ip.php +++ b/interface/web/sites/ajax_get_ip.php @@ -38,12 +38,16 @@ $client_group_id = intval($_GET["client_group_id"]); $ip_type = $app->db->quote($_GET['ip_type']); -if($_SESSION["s"]["user"]["typ"] == 'admin') { +if($_SESSION["s"]["user"]["typ"] == 'admin' or $app->auth->has_clients($_SESSION['s']['user']['userid'])) { $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>"; - $ip_select = "*"; + if($ip_type == 'IPv4'){ + $ip_select = "*"; + } else { + $ip_select = ""; + } if(is_array($ips)) { foreach( $ips as $ip) { //$selected = ($ip["ip_address"] == $this->dataRecord["ip_address"])?'SELECTED':''; -- Gitblit v1.9.1