function main_Safe_ports(){ $users=new usersMenus(); if($_GET["hostname"]==null){$hostname=$users->hostname;$_GET["hostname"]=$hostname;}else{$hostname=$_GET["hostname"];} $squid=new squid($hostname); $squid->LoadProtocolTable(); $fieldlist=$squid->protocol_field; $local_list=$squid->acls_rules_array["Safe_ports"]["datas"]; $form="<br> " . RoundedLightGreen(" <table style='width:100%'> <tr> <td align='right' nowrap valign='top'><strong>{Safe_ports_add}:</strong></td> <td valign='top'><select name=\"protocol\" id='protocol'>$fieldlist</select></td> <td valign='top'><input type='button' value='{add} »' OnClick=\"javascript:SquidSimpleAddSafePorts('$hostname');\"></td> </tr> </table> "); $html=main_tabs() . "<br> <h5>{Safe_ports}</H5> <p class=caption>{Safe_ports_text}</p> $form<br><div id='Safe_Ports'>" . main_Safe_ports_list() . "</div>"; $tpl=new templates(); echo $tpl->_ENGINE_parse_body($html,'squid.index.php'); }