示例#1
0
function main_admin_tabs()
{
    $array["t:frontend"] = "{admin}";
    $users = new usersMenus();
    $sys = new syslogs();
    $artica = new artica_general();
    $tpl = new templates();
    $page = CurrentPageName();
    $array["t:graphs"] = '{graphs}';
    if ($artica->EnableMonitorix == 1) {
        $array["t:monitorix"] = '{monitorix}';
    }
    if ($users->POSTFIX_INSTALLED) {
        $array["t:emails_received"] = "{emails_received}";
    }
    $sock = new sockets();
    if ($users->SQUID_INSTALLED) {
        $SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
        if ($SQUIDEnable == null) {
            $SQUIDEnable = 1;
        }
        if ($SQUIDEnable == 1) {
            $array["t:HTTP_FILTER_STATS"] = "{HTTP_FILTER_MONITOR}";
        }
    }
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $array["t:kaspersky"] = "Kaspersky";
    } else {
        $array["t:system"] = "{system_settings}";
    }
    $array = $array + main_admin_tabs_perso_tabs();
    $count = count($array);
    if ($count < 7) {
        $array["add-tab"] = "{add}&nbsp;&raquo;";
    }
    $page = CurrentPageName();
    if ($_GET["tab_current"] == null) {
        $_GET["tab_current"] = "frontend";
    }
    $tpl = new templates();
    while (list($num, $ligne) = each($array)) {
        if (preg_match("#t:(.+)#", $num, $re)) {
            $ligne = $tpl->javascript_parse_text($ligne);
            if (strlen($ligne) > 15) {
                $ligne = texttooltip(substr($ligne, 0, 12) . "...", $ligne);
            }
            $html[] = "<li><a href=\"admin.tabs.php?main={$re[1]}\"><span>{$ligne}</span></li>\n";
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"admin.tabs.php?tab={$num}\"><span>{$ligne}</span></li>\n");
    }
    return "\n\t<div id='mainlevel' style='width:758px;height:auto;'>\n\t\t<div id=admin_perso_tabs style='width:755px;height:auto;'>\n\t\t\t<ul>" . implode("\n", $html) . "</ul>\n\t\t</div>\n\t</div>\n\t\t<script>\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\$('#admin_perso_tabs').tabs({\n\t\t\t\t    load: function(event, ui) {\n\t\t\t\t        \$('a', ui.panel).click(function() {\n\t\t\t\t            \$(ui.panel).load(this.href);\n\t\t\t\t            return false;\n\t\t\t\t        });\n\t\t\t\t    }\n\t\t\t\t});\n\t\t\t\n\t\t\t\n\t\t\t});\n\t\t</script>";
}
示例#2
0
function main_admin_tabs()
{
    if ($GLOBALS["VERBOSE"]) {
        echo "<li>" . __FUNCTION__ . " line:" . __LINE__ . "</li>";
    }
    $array["t:frontend"] = "{status}";
    $array["t:orgs"] = "{organizations}";
    $users = new usersMenus();
    $sys = new syslogs();
    $artica = new artica_general();
    $tpl = new templates();
    $page = CurrentPageName();
    $sock = new sockets();
    $array["t:graphs"] = '{graphs}';
    if ($artica->EnableMonitorix == 1) {
        $array["t:monitorix"] = '{monitorix}';
    }
    if ($users->POSTFIX_INSTALLED) {
        $EnableArticaSMTPStatistics = $sock->GET_INFO("EnableArticaSMTPStatistics");
        if (!is_numeric($EnableArticaSMTPStatistics)) {
            $EnableArticaSMTPStatistics = 1;
        }
        if ($EnableArticaSMTPStatistics == 1) {
            $array["t:emails_received"] = "{emails_received}";
        }
    }
    $sock = new sockets();
    if ($users->SQUID_INSTALLED) {
        $SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
        if (!is_numeric($SQUIDEnable)) {
            $SQUIDEnable = 1;
        }
        if ($SQUIDEnable == 1) {
            $array["t:HTTP_FILTER_STATS"] = "{MONITOR}";
            $array["t:HTTP_BLOCKED_STATS"] = "{blocked_websites}";
        }
    }
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $array["t:kaspersky"] = "Kaspersky";
    } else {
        $array["t:system"] = "{webinterface}";
    }
    if ($users->AsSystemAdministrator) {
        $array["t:cnx"] = "{connections}";
    }
    $array = $array + main_admin_tabs_perso_tabs();
    $count = count($array);
    //if($count<7){$array["add-tab"]="{add}&nbsp;&raquo;";}
    $page = CurrentPageName();
    $tpl = new templates();
    $width = "758px";
    if (isset($_GET["tab-font-size"])) {
        if ($_GET["tab-font-size"] == "14px") {
            $_GET["tab-font-size"] = "12px";
        }
        $style = "style=font-size:{$_GET["tab-font-size"]}";
    }
    if (isset($_GET["tab-width"])) {
        $width = $_GET["tab-width"];
    }
    if (isset($_GET["newfrontend"])) {
        $newfrontend = "&newfrontend=yes";
    }
    while (list($num, $ligne) = each($array)) {
        if (preg_match("#t:(.+)#", $num, $re)) {
            $ligne = $tpl->javascript_parse_text($ligne);
            if (strlen($ligne) > 15) {
                $ligne = substr($ligne, 0, 12) . "...";
            }
            if ($re[1] == "cnx") {
                $html[] = "<li ><a href=\"admin.cnx.php?t=0{$newfrontend}\"><span {$style}>{$ligne}</span></a></li>\n";
                continue;
            }
            if ($re[1] == "orgs") {
                $html[] = "<li ><a href=\"domains.index.php?inside-tab=yes{$newfrontend}\"><span {$style}>{$ligne}</span></a></li>\n";
                continue;
            }
            $html[] = "<li><a href=\"admin.tabs.php?main={$re[1]}{$newfrontend}\"><span {$style}>{$ligne}</span></a></li>\n";
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"admin.tabs.php?tab={$num}{$newfrontend}\"><span {$style}>{$ligne}</span></a></li>\n");
    }
    return "\n\t<div id='mainlevel' style='width:{$width};height:auto;'>\n\t\t<div id=admin_perso_tabs style='width:{$width};height:auto;'>\n\t\t\t<ul>" . implode("\n", $html) . "</ul>\n\t\t</div>\n\t</div>\n\t\t<script>\n\t\t  \$(document).ready(function() {\n\t\t\t\$(\"#admin_perso_tabs\").tabs();});\n\t\t</script>";
}
示例#3
0
function main_admin_tabs(){
	$array["t:frontend"]="{admin}";
	$users=new usersMenus();
	$sys=new syslogs();
	$artica=new artica_general();
	$tpl=new templates();
	$page=CurrentPageName();
	$sock=new sockets();
	$array["t:graphs"]='{graphs}';	
	if($artica->EnableMonitorix==1){$array["t:monitorix"]='{monitorix}';}
	
	if($users->POSTFIX_INSTALLED){
			$EnableArticaSMTPStatistics=$sock->GET_INFO("EnableArticaSMTPStatistics");
			if(!is_numeric($EnableArticaSMTPStatistics)){$EnableArticaSMTPStatistics=1;}
			if($EnableArticaSMTPStatistics==1){	
				$array["t:emails_received"]="{emails_received}";
			}
	}

	
	$sock=new sockets();
	if($users->SQUID_INSTALLED){
		$SQUIDEnable=$sock->GET_INFO("SQUIDEnable");
		if($SQUIDEnable==null){$SQUIDEnable=1;}
		if($SQUIDEnable==1){
			$array["t:HTTP_FILTER_STATS"]="{HTTP_FILTER_MONITOR}";
			$array["t:HTTP_BLOCKED_STATS"]="{blocked_websites}";
			
			
		}
	}
	

if($users->KASPERSKY_SMTP_APPLIANCE){
	$array["t:kaspersky"]="Kaspersky";	
}else{
	$array["t:system"]="{system_settings}";
}	

if($users->AsSystemAdministrator){
	$array["t:cnx"]="{connections}";
}

$array=$array+main_admin_tabs_perso_tabs();
$count=count($array);
if($count<7){
	$array["add-tab"]="{add}&nbsp;&raquo;";
}
$page=CurrentPageName();
if($_GET["tab_current"]==null){$_GET["tab_current"]="frontend";}
$tpl=new templates();


	while (list ($num, $ligne) = each ($array) ){
		if(preg_match("#t:(.+)#",$num,$re)){
			$ligne=$tpl->javascript_parse_text($ligne);
			if(strlen($ligne)>15){$ligne=substr($ligne,0,12)."...";}
			
			if($re[1]=="cnx"){
				$html[]= "<li><a href=\"admin.cnx.php\"><span>$ligne</span></a></li>\n";
				continue;
			}
			
			$html[]= "<li><a href=\"admin.tabs.php?main={$re[1]}\"><span>$ligne</span></a></li>\n";
			continue;
		}
		$html[]= $tpl->_ENGINE_parse_body("<li><a href=\"admin.tabs.php?tab=$num\"><span>$ligne</span></a></li>\n");
		}
	
	
return "
	<div id='mainlevel' style='width:758px;height:auto;'>
		<div id=admin_perso_tabs style='width:755px;height:auto;'>
			<ul>". implode("\n",$html)."</ul>
		</div>
	</div>
		<script>
		  $(document).ready(function() {
			$(\"#admin_perso_tabs\").tabs();});
		</script>";		
		
}