Esempio n. 1
0
function page()
{
    $page = CurrentPageName();
    $usersmenus = new usersMenus();
    switch ($_GET["main"]) {
        case "master-config":
            echo main_master_config();
            exit;
            break;
        case "slaves":
            echo main_slaves();
            exit;
            break;
        case "download":
            main_download();
            exit;
            break;
        case "rules":
            echo main_rules();
            exit;
            break;
        case "deny_ext":
            main_denyext();
            exit;
            break;
        case "deny_ext_list":
            echo main_denyext_list();
            exit;
            break;
        case "members":
            echo main_members();
            exit;
            break;
        default:
            break;
    }
    $html = "\n<table style='width:100%' align=center>\n<tr>\n<td width=1% valign='top'><img src='img/bg_balance.png'>\n\n</td>\n<td valign='top' align='left'>\n" . main_status() . "\n</tr>\n</table><br>\n<div id='mainconfig'></div>\n\n<script>LoadAjax('mainconfig','{$page}?main=master-config&tab=0');</script>\n\n";
    $CFG["JS"][] = "js/crossroads.js";
    $tpl = new template_users('Postfix {APP_CROSSROADS}', $html, 0, 0, 0, 0, $CFG);
    echo $tpl->web_page;
}
Esempio n. 2
0
function main_denyext(){
	$users=new usersMenus();
	if($_GET["hostname"]==null){$hostname=$users->hostname;$_GET["hostname"]=$hostname;}else{$hostname=$_GET["hostname"];}
	
	$squid=new squid($hostname);
	$local_list=$squid->acls_rules_array["Deny_ext"]["datas"];
	

	$form="<br>
	" . RoundedLightGreen("
	<table style='width:100%'>
	<tr>
	<td align='right' nowrap valign='top'><strong>{deny_ext_add}:</strong></td>
	<td valign='top'>" . Field_text('deny_ext',null,'width:100px')."</td>
	<td valign='top'><input type='button' value='{add}&nbsp;&raquo;' OnClick=\"javascript:SquidSimpleAddDenyExt('$hostname');\"></td>
	</tr>		
	</table>
	");

	$html=main_tabs() . "<br>
	<h5>{deny_ext}</H5>
	<p class=caption>{deny_ext_add_text}</p>
	$form<br><div id='_table_deny_ext'>" . main_denyext_list() . "</div>";
	
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body($html,'squid.index.php');	
	
	
}