File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 6565 < td >
6666 < select class ="vst-list " name ="v_ip ">
6767 < ?php
68- foreach ($ips as $key => $value) {
69- $display_ip = $key;
70- if (!empty($value['NAT'])) $display_ip = $value['NAT'];
71- $skey = "'".$display_ip."'";
72- echo "\n\t\t\t\t\t\t\t\t\t\t\t\t< option value =\ "".htmlentities($display_ip)."\"";
73- if ((!empty($v_ip)) && ( $display_ip == $v_ip ) || ( $skey == $v_ip )){
74- echo ' selected';
75- }
76- echo "> ".htmlentities($display_ip)."</ option > \n";
68+ foreach ($ips as $ip => $value) {
69+ $display_ip = htmlentities(empty($value['NAT']) ? $ip : "{$ip} → {$value['NAT']}");
70+ $ip_selected = ((!empty($v_ip) && $ip == $v_ip) || $v_ip == "'{$ip}'") ? 'selected' : '';
71+ echo "\n\t\t\t\t\t\t\t\t\t\t\t\t< option value =\ "{$ip}\" {$ip_selected}> {$display_ip}</ option > \n";
7772 }
7873 ?>
7974 </ select >
You can’t perform that action at this time.
0 commit comments