You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Fill the IP select field with the IP addresses that are allowed for this client
98
-
$sql = "SELECT ip_address FROM server_ip WHERE server_id = ".$client['default_webserver']." AND client_id=0 OR client_id=".$_SESSION['s']['user']['client_id'];
97
+
//* Fill the IPv4 select field with the IP addresses that are allowed for this client
98
+
$sql = "SELECT ip_address FROM server_ip WHERE server_id = ".$client['default_webserver']." AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")";
99
99
$ips = $app->db->queryAllRecords($sql);
100
100
$ip_select = "<option value='*'>*</option>";
101
101
//$ip_select = "";
@@ -108,6 +108,21 @@ function onShowEnd() {
108
108
$app->tpl->setVar("ip_address",$ip_select);
109
109
unset($tmp);
110
110
unset($ips);
111
+
112
+
//* Fill the IPv6 select field with the IP addresses that are allowed for this client
113
+
$sql = "SELECT ip_address FROM server_ip WHERE server_id = ".$client['default_webserver']." AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")";
// Fill the IP select field with the IP addresses that are allowed for this client
139
-
$sql = "SELECT ip_address FROM server_ip WHERE server_id = ".$client['default_webserver']." AND client_id=0 OR client_id=".$_SESSION['s']['user']['client_id'];
153
+
//* Fill the IPv4 select field with the IP addresses that are allowed for this client
154
+
$sql = "SELECT ip_address FROM server_ip WHERE server_id = ".$client['default_webserver']." AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")";
140
155
$ips = $app->db->queryAllRecords($sql);
141
156
$ip_select = "<option value='*'>*</option>";
142
157
//$ip_select = "";
@@ -149,6 +164,21 @@ function onShowEnd() {
149
164
$app->tpl->setVar("ip_address",$ip_select);
150
165
unset($tmp);
151
166
unset($ips);
167
+
168
+
//* Fill the IPv6 select field with the IP addresses that are allowed for this client
169
+
$sql = "SELECT ip_address FROM server_ip WHERE server_id = ".$client['default_webserver']." AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")";
0 commit comments