function page()
{
    $tr = array();
    $tr[] = paragraph_youtube("Use Parent proxy in acls", "//www.youtube.com/embed/-zqElEzAR08?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("Block FaceBook during productive time", "//www.youtube.com/embed/tuuM_jC0cBs?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("Artica Webfiltering databases in acls rules", "//www.youtube.com/embed/1JZUHrQzdNc?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("Allow only domains gob.mx, .gob", "//www.youtube.com/embed/sPaMjM6g9fA?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("Browsers & Applications Web filter rules", "//www.youtube.com/embed/Nt_zW4JNHkI?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $acls = CompileTr3($tr);
    $tr = array();
    $tr[] = paragraph_youtube("Starting Guide", "//www.youtube.com/embed/7ZUqX8_5NGk?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("How to connect Proxy to Active Directory ?", "//www.youtube.com/embed/C106liv9GAk?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("How to turn your proxy to transparent mode ?", "//www.youtube.com/embed/gh5oh_gYJX8?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("NAT compatibility mode + Zywall", "//www.youtube.com/embed/IaHB9HVLFKI?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("How to use a proxy parent ?", "//www.youtube.com/embed/J8Z_5k_J-9w?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("HTTP compression with remote sites", "//www.youtube.com/embed/oGdezHsmeH0?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("Multiple Processors wihout disk caches - howto", "//www.youtube.com/embed/2cA-fB2Wo20?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("Youtube and video streaming caching feature - howto", "//www.youtube.com/embed/EUvW28nmDVg?list=UUYbS4gGDNP62LsEuDWOMN1Q");
    $tr[] = paragraph_youtube("TSE/RDP Gateway Howto", "//www.youtube.com/embed/1_z9IF-Ghtc");
    $A = CompileTr3($tr);
    $tr = array();
    $tr[] = paragraph_youtube("MAC to Member translation feature", "//www.youtube.com/embed/_DGLLTvamF4");
    $A1 = CompileTr3($tr);
    $tr = array();
    $tr[] = paragraph_youtube("How to Bridge 2 network interfaces ?", "//www.youtube.com/embed/pvBWxOUl4OU");
    $tr[] = paragraph_youtube("Play with the Firewall - basic demonstration", "//www.youtube.com/embed/Qk1em2kOBHQ");
    $tr[] = paragraph_youtube("Traffic analysis daemon - howto", "//www.youtube.com/embed/LiHE5lK58Qc");
    $B = CompileTr3($tr);
    $tr = array();
    $tr[] = paragraph_youtube("Update Manually Artica software", "//www.youtube.com/embed/1fxAVMpcrXs");
    $tr[] = paragraph_youtube("Update the Proxy version Software", "//www.youtube.com/embed/1x00u3AfIDU");
    $C = CompileTr3($tr);
    $html = "\n\t<div style='font-size:24px;margin-bottom:15px'>Proxy Architectures & Settings</div>{$A}\n\t<div style='font-size:24px;margin-bottom:15px'>Advanced security rules ( ACLs )</div>{$acls}\n\t\n\t\n\t<div style='font-size:24px;margin-bottom:15px'>Proxy Monitoring</div>{$A1}\n\t\n\t\n\t<div style='font-size:24px;margin-bottom:15px;margin-top:20px'>Networks videos</div>{$B}\n\t<div style='font-size:24px;margin-bottom:15px;margin-top:20px'>Maintain</div>{$C}\t\t\n\t\t\t\n\t";
    echo $html;
}
function internalnets()
{
    $tpl = new templates();
    $users = new usersMenus();
    $page = CurrentPageName();
    $sock = new sockets();
    $fontsize = 16;
    $add_categories = Paragraphe("64-categories-add.png", "{add_category}", "{add_category_text}", "AddCategory(0)");
    $html = "<div class=explain style='font-size:14px'>{banned_categories_explain}</div>";
    $tr[] = $add_categories;
    $table = CompileTr3($tr);
    echo "<div class=form>" . $tpl->_ENGINE_parse_body("{$html}{$table}") . "</div>";
}
function squid()
{
    $templates_error = Paragraphe('squid-templates-64.png', '{squid_templates_error}', '{squid_templates_error_text}', "javascript:Loadjs('squid.templates.php')");
    $tr[] = $authenticate_users;
    $tr[] = $blackcomputer;
    $tr[] = $whitecomputer;
    $tr[] = $proxy_pac;
    $tr[] = $proxy_pac_rules;
    $tr[] = $APP_SQUIDKERAUTH;
    $tr[] = $templates_error;
    $html = "\n\t\n\t<center><div style='width:700px'>" . CompileTr3($tr) . "</div></center>";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    echo $html;
}
function content2()
{
    if (isset($_SESSION[__FILE__][__FUNCTION__])) {
        echo $_SESSION[__FILE__][__FUNCTION__];
        return;
    }
    $tpl = new templates();
    $servers = $_SESSION["VIRTUALS_SERVERS"];
    while (list($key, $val) = each($servers)) {
        $tR[] = Paragraphe("blue-server.png", "{$key}", "{manage_this_file_server}", "miniadm.samba-virtual.php?hostname={$key}");
    }
    $content = CompileTr3($tR, "none");
    $html = "<div class=BodyContent><center><div style='width:700px'>{$content}</div></center></div>";
    $html = $tpl->_ENGINE_parse_body($html);
    $_SESSION[__FILE__][__FUNCTION__] = $html;
    echo $html;
}
Exemple #5
0
function main_switch_status(){
	$switch=$_GET["eth"];
	$tpl=new templates();
	$sock=new sockets();
	$datas=$sock->getFrameWork("vde.php?switch-main-status=$switch");
	$ini=new Bs_IniHandler();
	$ini->loadString($datas);
	$f[]=DAEMON_STATUS_ROUND("VDE_$switch",$ini,null,0);
	$f[]=DAEMON_STATUS_ROUND("VDHOOK_$switch",$ini,null,0);
	
	$install=button("{install_virtual_switch}",
	"Loadjs('virtualswitch.install.php?switch=$switch')",18);
	
	$html="<table style='width:100%'>
	<tr><td width=50%>$install</td>
	</tr>
	</table>".CompileTr3($f);
	echo $tpl->_ENGINE_parse_body($html);
	
}
function status()
{
    $tpl = new templates();
    $sock = new sockets();
    $EnablePDNS = $sock->GET_INFO("EnablePDNS");
    if (!is_numeric($EnablePDNS)) {
        $EnablePDNS = 0;
    }
    if ($EnablePDNS == 0) {
        echo $tpl->_ENGINE_parse_body("<p class=text-error>{error_powerdns_disabled}</p>");
        return;
    }
    $page = CurrentPageName();
    $datas = base64_decode($sock->getFrameWork("services.php?pdns-status=yes"));
    $ini = new Bs_IniHandler();
    $ini->loadString($datas);
    $tr[] = DAEMON_STATUS_ROUND("APP_PDNS", $ini, null);
    $tr[] = DAEMON_STATUS_ROUND("APP_PDNS_INSTANCE", $ini, null);
    $tr[] = DAEMON_STATUS_ROUND("PDNS_RECURSOR", $ini, null);
    echo "<center><div style='width:850px'>" . $tpl->_ENGINE_parse_body(CompileTr3($tr, true)) . "</div></center>";
}
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $movefolder = Paragraphe('folder-storage-64.png', '{storage_directory}', '{change_mysql_directory_text}', "javascript:YahooWin3(650,'{$page}?mysql-dir=yes','{storage_directory}');", null);
    $tasks = Paragraphe('processor-64.png', '{processes_list}', '{processes_list_mysql_explain}', "javascript:Loadjs('zarafa.dabatase.processlist.php');", null);
    $trash = Paragraphe("database-linker-delete-64.png", "{REMOVE_DATABASE}", "{REMOVE_DATABASE_ZARAFA_TEXT}", "javascript:REMOVE_DATABASE()");
    // mysqladmin --socket /var/run/mysqld/zarafa-db.sock -u root processlist
    $sock = new sockets();
    $ZarafaDedicateMySQLServer = intval($sock->GET_INFO("ZarafaDedicateMySQLServer"));
    if ($ZarafaDedicateMySQLServer == 1) {
        $trash = Paragraphe("database-linker-delete-64.png", "{REMOVE_DATABASE}", "{REMOVE_DATABASE_ZARAFA_TEXT}", "javascript:Loadjs('zarafa.trash.php')");
    }
    $tr[] = $movefolder;
    $tr[] = $restore;
    $tr[] = $tasks;
    $tr[] = $trash;
    $confirm_remove_zarafa_db = $tpl->javascript_parse_text("{confirm_remove_zarafa_db}");
    $table = CompileTr3($tr, "form");
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'><div id='dbsize' style=width:300px></div></td>\t\t\n\t<td valign='top'><div style=width:550px><center>{$table}</center></div></td>\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tLoadAjaxTiny('dbsize','{$page}?dbsize=yes&refresh=dbsize');\n\t\t\n\nvar x_REMOVE_DATABASE=function(obj){\n      var tempvalue=obj.responseText;\n      if(tempvalue.length>5){alert(tempvalue);}\n     \tRefreshTab('main_config_zarafa');\n      }\t\n\t\t\n\tfunction REMOVE_DATABASE(){\n\t\tif(confirm('{$confirm_remove_zarafa_db}')){\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('remove-db','1');\n\t\t\tXHR.sendAndLoad('zarafa.tools.php', 'POST',x_REMOVE_DATABASE);\n\t\t\t}\n\t}\n\n\t\t\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $users = new usersMenus();
    $ARRAY = unserialize(base64_decode($sock->getFrameWork("squid.php?ps-aux-squid=yes")));
    $CPU_NUM = count($ARRAY);
    $t = time();
    $error = null;
    if (!$users->CORP_LICENSE) {
        $error = "<p class=text-error>{multiprocessor_performance_no_license}</p>";
    }
    for ($i = 0; $i < $CPU_NUM; $i++) {
        $title = "CPU #<strong>{$i}</strong>";
        $titleM = "{memory}";
        if ($i == 0) {
            $title = "Master CPU";
        }
        if ($i == 0) {
            $titleM = "{memory}";
        }
        $CPU = $ARRAY[$i]["CPU"];
        $MEM = $ARRAY[$i]["MEM"];
        if (!is_numeric($CPU)) {
            $CPU = 0;
        }
        if (!is_numeric($MEM)) {
            $MEM = 0;
        }
        $HTML[] = "\n\t\t<div style='font-size:18px;margin-top:20px;margin-bottom:5px'><img src='img/processor-24.png' style='float:left:margin:5px'>&nbsp;&nbsp;{$title} -&nbsp;<span id='TEXTC-{$i}-{$t}'>{$CPU}</span>%</div>\t\n\t\t<div id='progressC-{$i}-{$t}' style='height:35px'></div>\n\t\t<div style='font-size:18px;margin-top:20px;margin-bottom:5px'>{$titleM} -&nbsp;<span id='TEXTM-{$i}-{$t}'>{$MEM}</span>%</div>\n\t\t<div id='progressM-{$i}-{$t}' style='height:35px'></div>\n\t\t</div>";
        $JS[] = "\$('#progressC-{$i}-{$t}').progressbar({ value: {$CPU} });";
        $JS[] = "\$('#progressM-{$i}-{$t}').progressbar({ value: {$MEM} });";
    }
    $html = "{$error}<div style='width:93%;margin-left:5px;margin-right:5px' class=form>\n\t<input type='hidden' id='pointer-{$t}' value='11'>\n\t<div style='font-size:22px;margin-bottom:15px'>{multiprocessor_performance}<div>" . CompileTr3($HTML, true) . "\n\t<script>\n\t" . @implode("\n", $JS) . "\n\tLoadjs('{$page}?ping=yes&t={$t}');\t\t\n\t</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $blackbox = new blackboxes($_GET["nodeid"]);
    $squid = new squidbee();
    $hostid = $_GET["hostid"];
    $t = time();
    $tpl = new templates();
    $t = time();
    $tr = array();
    $ini = new Bs_IniHandler();
    $ini->loadString($blackbox->SquidSMPStatus);
    while (list($index, $line) = each($ini->_params)) {
        if ($GLOBALS["VERBOSE"]) {
            echo __FUNCTION__ . "::" . __LINE__ . "::{$index} -> DAEMON_STATUS_ROUND<br>\n";
        }
        $tr[] = DAEMON_STATUS_ROUND($index, $ini, null, 1);
    }
    if (count($tr) > 0) {
        $tr[] = squid_booster_smp($blackbox->BoosterSMPStatus);
        $smpstatus = CompileTr3($tr);
    }
    $actions[] = Paragraphe32("reload_proxy_service", "reload_proxy_service_text", "SquidNodeReload{$t}()", "reload-32.png");
    $actions[] = Paragraphe32("restart_proxy_service", "restart_proxy_service_text", "SquidNodeRestart{$t}()", "service-restart-32.png");
    $actions[] = Paragraphe32("reconfigure_proxy_service", "reconfigure_proxy_service_text", "SquidNodeReconf{$t}()", "reconfigure-32.png");
    $actions[] = Paragraphe32("configuration_file", "display_generated_configuration_file", "Loadjs('nodes.squid.conf.php?nodeid={$_GET["nodeid"]}')", "script-32.png");
    $action = CompileTr3($actions);
    $nodes_names = $squid->visible_hostname;
    if (isset($squid->nodes_names[$hostid])) {
        $nodes_names = $squid->nodes_names[$hostid];
    }
    $html = "\n\t<div id='{$t}'></div>\n\t<table style='width:99%' class=form>\n\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{ipaddr}:</td>\n\t\t\t\t<td><strong style='font-size:14px'><strong style='font-size:14px'>{$blackbox->ipaddress}:{$blackbox->port}</td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{APP_SQUID}:</td>\n\t\t\t\t<td><strong style='font-size:14px'><strong style='font-size:14px'>{$blackbox->squid_version}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{visible_hostname}:</td>\n\t\t\t\t<td><strong style='font-size:14px'><strong style='font-size:14px'>\n\t\t\t\t\t<a href=\"javascript:Loadjs('{$page}?visible-hostname-js=yes&hostid={$hostid}&nodeid={$_GET["nodeid"]}');\"\n\t\t\t\t\t style='font-size:14px;text-decoration:underline;font-weight:bold'>{$nodes_names}</a>\n\t\t\t\t\t</td>\n\t\t\t</tr>\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend style='font-size:14px'>{last_status}:</td>\n\t\t\t\t<td><strong style='font-size:14px'>{$blackbox->laststatus}</td>\n\t\t\t</tr>\t\t\n\t\t\t</table>\n\t\t\n\t\t\n\t\t\n\t{$smpstatus}\n\t{$action}\n\t\n\t<script>\n\tvar x_SquidNodeReload{$t}= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){alert(res);}\n\t\tdocument.getElementById('{$t}').innerHTML='';\n\t\tif(document.getElementById('main_squid_quicklinks_tabs{$_GET["nodeid"]}')){\n\t\t\tRefreshTab('main_squid_quicklinks_tabs{$_GET["nodeid"]}');\n\t\t}\n\t}\t\n\n\n\tfunction SquidNodeReload{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('reconfigure-squid','{$hostid}');\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidNodeReload{$t});\n\t}\n\t\n\tfunction SquidNodeRestart{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('restart-squid','{$hostid}');\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidNodeReload{$t});\n\t}\n\n\tfunction SquidNodeReconf{$t}(){\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('reconf-squid','{$hostid}');\n\t\tAnimateDiv('{$t}');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SquidNodeReload{$t});\t\n\t\n\t}\n\t\n\tLoadAjax('{$t}-filters','{$page}?filters-specific=yes&hostid={$hostid}');\n\t\n\t</script>\n\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
function hd_tasks()
{
    $dev = $_GET["dev"];
    $users = new usersMenus();
    $tpl = new templates();
    $sock = new sockets();
    $page = CurrentPageName();
    if (!is_file('ressources/usb.scan.inc')) {
        $sock->getFrameWork("cmd.php?usb-scan-write=yes");
    }
    include_once 'ressources/usb.scan.inc';
    if (!isset($_GLOBAL["disks_list"][$dev])) {
        return $tpl->_ENGINE_parse_body("<center><H2>{UNABLE_TO_OBTAIN_INFORMATIONS_FROM}:{$dev}</H2></center>");
    }
    $dev_enc = urlencode($dev);
    $array = $_GLOBAL["disks_list"];
    $mounted = $array["{$dev}"]["PARTITIONS"]["{$dev}1"]["MOUNTED"];
    //print_r($array);
    $remove_disk = null;
    $BuildBigParts = Paragraphe("hd-toolbar-add-64.png", "{macro_build_bigpart}", "{macro_build_bigpart_explain}", "javascript:BuildBigPartition('{$dev}')");
    $lvm_master_disabled = Paragraphe("hd-toolbar-lvm-add-64-grey.png", "{macro_build_lvm}", "{macro_build_lvm_explain}");
    $buildPartition_disabled = Paragraphe("hd-toolbar-add-64-grey.png", "{macro_build_bigpart}", "{macro_build_bigpart_explain}");
    if ($mounted != null) {
        if ($mounted != "/") {
            $remove_disk = Paragraphe("disk-64-delete.png", "{macro_remove_disk}", "{macro_remove_disk_explain}", "javascript:Loadjs('{$page}?unlink-disk-js={$dev_enc}',true)");
        }
    }
    $intro[] = "<table style='width:99%' class=form>";
    while (list($xdevPart, $ligne) = each($_GLOBAL["disks_list"][$dev]["PARTITIONS"])) {
        $blkidArray = unserialize(base64_decode($sock->getFrameWork("services.php?blkid={$xdevPart}")));
        $icon = imgtootltip("mailbox_hd.png", "Loadjs('system.internal.partition.php?dev={$xdevPart}')", "{$xdevPart}");
        $href = "<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('system.internal.partition.php?dev={$xdevPart}')\"\n\t\tstyle='font-size:13px;font-weight:bold;text-decoration:underline'>";
        $intro[] = "<tr>\n\t\t<td style='font-size:13px;font-weight:bold'>{$icon}</td>\n\t\t<td class=legend style='font-size:13px'>UUID:</td>\n\t\t<td style='font-size:13px;font-weight:bold'>{$href}{$blkidArray["UUID"]}</a></td>\n\t\t<td class=legend style='font-size:13px' width=1%>&nbsp;|&nbsp;</td>\n\t\t<td class=legend style='font-size:13px'>{xtype}:</td>\n\t\t<td style='font-size:13px;font-weight:bold'>{$href}{$blkidArray["TYPE"]}</a></td>\n\t\t<td class=legend style='font-size:13px' width=1%>&nbsp;|&nbsp;</td>\n\t\t<td class=legend style='font-size:13px'>{label}:</td>\n\t\t<td style='font-size:13px;font-weight:bold'>{$href}{$blkidArray["LABEL"]}</a></td>\n\t</tr>";
    }
    $intro[] = "</table>";
    $introImpl = @implode("", $intro);
    if ($users->LVM_INSTALLED) {
        $lvm_master = Paragraphe("hd-toolbar-lvm-add-64.png", "{macro_build_lvm}", "{macro_build_lvm_explain}", "javascript:pvcreate_dev('{$dev}')");
        $hash = unserialize(base64_decode($sock->getFrameWork("cmd.php?lvmdiskscan=yes")));
        if ($hash[$dev] != null) {
            $lvm_master = $lvm_master_disabled;
        }
    } else {
        $lvm_master = $lvm_master_disabled;
    }
    if ($mounted == '/') {
        $BuildBigParts = $buildPartition_disabled;
        $lvm_master = $lvm_master_disabled;
    }
    $tpl = new templates();
    $tr[] = $BuildBigParts;
    $tr[] = $remove_disk;
    $tr[] = $lvm_master;
    $tables = CompileTr3($tr);
    $html = "\n{$introImpl}\n<div id='HardDrivesTasksSection'></div>\n<center>\n<div style='width:700px'>{$tables}</div>\n</center>";
    $tpl = new templates();
    $datas = $tpl->_ENGINE_parse_body($html, "postfix.plugins.php");
    return $datas;
}
Exemple #11
0
function transparent_help(){
	
			
	$tr[]=Paragraphe("youtube-play-64.png", "Video", 
	"Proxy Transparent: Setup the Proxy in transparent mode with SSL interception","http://youtu.be/nn5R6CqkHk8",null,250);
			
	$tr[]=Paragraphe("youtube-play-64.png", "Video",
	"Proxy Transparent: MAN-IN-THE-MIDDLE with Dynamic SSL Certificate Generation feature",
	"http://youtu.be/vFYmYw6t9EM",null,250);

	$tr[]=Paragraphe("youtube-play-64.png", "Video",
	"Proxy Transparent: SSL Traffic inspection With Kaspersky",
	"http://youtu.be/9t5B91rllrA",null,250);
			
	
	echo "<center style='width:80%'>".CompileTr3($tr)."</center>";
	
}
function proxy_service()
{
    $defaultsize = 250;
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $users = new usersMenus();
    $seconds = $tpl->javascript_parse_text("{seconds}");
    $server_all_kbytes_in = $tpl->javascript_parse_text("{server_all_kbytes_in}");
    $server_all_kbytes_out = $tpl->javascript_parse_text("{server_all_kbytes_out}");
    $active_requests = $tpl->javascript_parse_text("{active_requests}");
    $members = $tpl->_ENGINE_parse_body("{members}");
    $ipaddr = $tpl->_ENGINE_parse_body("{ipaddr}");
    $cpunum = intval($users->CPU_NUMBER);
    $maxload = $cpunum + 1;
    $parameters_link = null;
    $Storage_Capacity = $tpl->javascript_parse_text("{Storage_Capacity}");
    $parameters = $tpl->_ENGINE_parse_body("{parameters}");
    $t = $_GET["t"];
    $currentload = "<canvas id='CurrentLoad' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>Current System load<span id='CurrentLoad-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $Memory = "<canvas id='realMemory' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>System Memory Usage<span id='realMemory-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $cpuUSage = "<canvas id='CpuUsage' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>Proxy CPU Usage<span id='CpuUsage-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $TotalAccounted = "<canvas id='TotalAccounted' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>Proxy Memory Usage<span id='TotalAccounted-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $HttpRequests = "<canvas id='HttpRequests' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>HTTP Requests/{$seconds}<span id='HttpRequests-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $ActiveRequests = "<canvas id='ActiveRequests' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>{$active_requests}<span id='ActiveRequests-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $ActiveRequestsMembers = "<canvas id='ActiveRequestsMembers' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>{$active_requests} {$members}<span id='ActiveRequestsMembers-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $ActiveRequestsIpaddr = "<canvas id='ActiveRequestsIpaddr' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>{$active_requests} {$ipaddr}<span id='ActiveRequestsIpaddr-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $server_all_kbytes_inTR = "<canvas id='server_all_kbytes_in' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>{$server_all_kbytes_in}/{$seconds}<span id='server_all_kbytes_in-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $server_all_kbytes_outTR = "<canvas id='server_all_kbytes_out' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>{$server_all_kbytes_out}/{$seconds}<span id='server_all_kbytes_out-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $FilesDescriptors = "<canvas id='FilesDescriptors' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t<center style='font-size:16px'>File Descriptors<span id='FilesDescriptors-title' style='padding-left:5px;font-weight:bold'></span></center>";
    $f[] = $currentload;
    $f[] = $Memory;
    $f[] = $cpuUSage;
    $f[] = $ActiveRequests;
    $f[] = $ActiveRequestsMembers;
    $f[] = $ActiveRequestsIpaddr;
    $f[] = $TotalAccounted;
    $f[] = $FilesDescriptors;
    $f[] = $HttpRequests;
    $f[] = $server_all_kbytes_inTR;
    $f[] = $server_all_kbytes_outTR;
    $StorageCapacity = unserialize(base64_decode($sock->getFrameWork("squid.php?StorageCapacity=yes")));
    $countStorages = count($StorageCapacity);
    for ($i = 0; $i < $countStorages; $i++) {
        $f[] = "<canvas id='Storage{$i}' width='{$defaultsize}' height='{$defaultsize} ' style='margin:10px'></canvas>\n\t\t<center style='font-size:16px'>Storage Capacity Kid " . ($i + 1) . "</center>";
        $js[] = "        Storage{$i} = new steelseries.RadialBargraph('Storage{$i}', {\n                            gaugeType: steelseries.GaugeType.TYPE3,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Storage " . ($i + 1) . "',\n                            unitString: '%',\n                            threshold: 70,\n\t\t\t\t\t\t\tmaxValue:100,\n                            lcdVisible: true\n                        });\t";
    }
    $storages = CompileTr4($f, false, null, true);
    if (isset($_GET["byenduser-interface"])) {
        $storages = CompileTr3($f, false, null, true);
    }
    if (isset($_SESSION["uid"])) {
        $parameters_link = "<div style='width:100%;text-align:right'><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('{$page}?monitor-parameters=yes&t={$t}');\"\n\t\tstyle='font-size:16px;text-decoration:underline;font-weight:bold;color:#DF0000'>{$parameters}</a></div>";
    }
    if (isset($_GET["loadjs"])) {
        $loadthis = "<script type='text/javascript' language='javascript' src='/js/tween-min.js'></script>";
        $parameters_link = "<div style='width:1160;text-align:right'>\n\t\t\t\t<a href=\"javascript:blur()\" OnClick=\"javascript:Loadjs('{$page}?monitor-parameters=yes&t={$t}')\" \n\tid='none' class=\"Button2014 Button2014-success Button2014-lg\"  style=\"font-size:30px;text-transform:capitalize\" \n\t>&laquo;&nbsp;{$parameters}&nbsp;&raquo;</a></div>";
    }
    $html = "\n\t\t{$loadthis}\n\t\t<script type='text/javascript' language='javascript' src='/js/steelseries-min.js'></script>\t\t\n\t\t{$parameters_link}\n\t\t<div id='counter-{$t}'>\n\t\t\n\t\t{$storages}\n\t\t</div>\t\n\t\t\t\n<script>\n\t\n\tvar sections = [steelseries.Section(0, 25, 'rgba(0, 0, 220, 0.3)'),\n    \tsteelseries.Section(25, 50, 'rgba(0, 220, 0, 0.3)'),\n        steelseries.Section(50, 75, 'rgba(220, 220, 0, 0.3)') ],\n\n        areas = [steelseries.Section(75, 100, 'rgba(220, 0, 0, 0.3)')],\n\n            // Define value gradient for bargraph\n            valGrad = new steelseries.gradientWrapper(  0,\n                                                        100,\n                                                        [ 0, 0.33, 0.66, 0.85, 1],\n                                                        [ new steelseries.rgbaColor(0, 0, 200, 1),\n                                                          new steelseries.rgbaColor(0, 200, 0, 1),\n                                                          new steelseries.rgbaColor(200, 200, 0, 1),\n                                                          new steelseries.rgbaColor(200, 0, 0, 1),\n                                                          new steelseries.rgbaColor(200, 0, 0, 1) ]);\t\n       CpuUsageRadial = new steelseries.RadialBargraph('CpuUsage', {\n                            gaugeType: steelseries.GaugeType.TYPE3,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n\t\t\t\t\t\t\tmaxValue:100,\n                            titleString: 'CPU Usage',\n                            unitString: '%',\n                            threshold: 50,\n                            lcdVisible: true\n                        });\n                        \n                        \n       LoadCurrent = new steelseries.Radial('CurrentLoad', {\n                            gaugeType: steelseries.GaugeType.TYPE1,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'LOAD',\n                            threshold: 2,\n                            maxValue: '{$maxload}',\n                            lcdVisible: true\n                        }); \n                        \n         FilesDescriptors = new steelseries.Radial('FilesDescriptors', {\n                            gaugeType: steelseries.GaugeType.TYPE1,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Files',\n                            threshold: 2,\n                            maxValue: '100',\n                            lcdVisible: true\n                        });  \n\n         ActiveRequests = new steelseries.Radial('ActiveRequests', {\n                            gaugeType: steelseries.GaugeType.TYPE1,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Files',\n                            threshold: 2,\n                            maxValue: '150',\n                            lcdVisible: true\n                        });   \n                        \n                \n         ActiveRequestsMembers = new steelseries.Radial('ActiveRequestsMembers', {\n                            gaugeType: steelseries.GaugeType.TYPE1,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Files',\n                            threshold: 2,\n                            maxValue: '150',\n                            lcdVisible: true\n                        });    \n\n                        \n         ActiveRequestsIpaddr = new steelseries.Radial('ActiveRequestsIpaddr', {\n                            gaugeType: steelseries.GaugeType.TYPE1,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Files',\n                            threshold: 2,\n                            maxValue: '150',\n                            lcdVisible: true\n                        });                        \n\n                        \n                       \n                        \n\n                        \n\trealMemory = new steelseries.Radial('realMemory', {\n                            gaugeType: steelseries.GaugeType.TYPE1,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Memory',\n                             unitString: '%',\n                            threshold: 70,\n                            maxValue: '100',\n                            lcdVisible: true\n                        }); \n\n                        \n                        \n                        \n                        \n                       \n\t\t\t\n       HttpRequestsRadial = new steelseries.RadialBargraph('HttpRequests', {\n                            gaugeType: steelseries.GaugeType.TYPE3,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'HTTP requests',\n                            unitString: '{$seconds}',\n                            threshold: 50,\n\t\t\t\t\t\t\tmaxValue:150,\n                            lcdVisible: true\n                        });\t\n                        \n       TotalAccounted = new steelseries.RadialBargraph('TotalAccounted', {\n                            gaugeType: steelseries.GaugeType.TYPE3,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Memory %',\n                            threshold: 50,\n\t\t\t\t\t\t\tmaxValue:100,\n                            lcdVisible: true\n                        });\t                        \n                  \n\n                        \n        server_all_kbytes_in = new steelseries.RadialBargraph('server_all_kbytes_in', {\n                            gaugeType: steelseries.GaugeType.TYPE3,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Kb IN',\n                            unitString: 'KB',\n                            threshold: 50,\n\t\t\t\t\t\t\tmaxValue:250,\n                            lcdVisible: true\n                        });\t\n                        \n                        \n        server_all_kbytes_out = new steelseries.RadialBargraph('server_all_kbytes_out', {\n                            gaugeType: steelseries.GaugeType.TYPE3,\n                            size: {$defaultsize},\n                            section: sections,\n                            area: areas,\n                            titleString: 'Kb OUT',\n                            unitString: 'KB',\n                            threshold: 50,\n\t\t\t\t\t\t\tmaxValue:250,\n                            lcdVisible: true\n                        });\t                        \n                        \n        " . @implode("\n", $js) . "\n\t\t\t\n\t\tfunction RefreshRadial{$t}(){\n\t\t\tif(!document.getElementById('counter-{$t}')){return;}\n\t\t\tLoadjs('{$page}?radialValues=yes&t={$t}');\n\t\t}\n\t\t\$('#flexRT{$t}').remove();\n\t\tRefreshRadial{$t}();\n</script>\n\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t\n";
    echo $html;
}
function all_status($asroot=false){
	
	if($asroot){$GLOBALS["AS_ROOT"]=true;}
	
	if(!$GLOBALS["AS_ROOT"]){
		if(is_file("/usr/share/artica-postfix/ressources/logs/web/squid.services.html")){
			$tpl=new templates();
			echo $tpl->_ENGINE_parse_body(@file_get_contents("/usr/share/artica-postfix/ressources/logs/web/squid.services.html"));
			return;
		}
	
	}
	
	if(GET_CACHED(__FILE__, __FUNCTION__,__FUNCTION__)){return;}
	
	$page=CurrentPageName();
	$sock=new sockets();
	$ini=new Bs_IniHandler();
	$tpl=new templates();
	$users=new usersMenus();
	$squid=new squidbee();
	$t=time();
	
	$APP_SAMBA_WINBIND=null;
	$winbind=null;
	$UseDynamicGroupsAclsTR=null;
	$ufdbbutt=null;
	$cicapButt=null;
	
	if(!isset($_GET["miniadmin"])){
	
	$SecondScript="
		function RefreshAdKer$t(){	
			LoadAjaxTiny('squid-adker-status','squid.adker.php?status=yes&t=squid-adker-status');
		}
		RefreshAdKer$t();
		setTimeout('RefreshAdKer$t()',2000);	
	";
	
	}
	
	



	$Authenticator_cacheFile="/usr/share/artica-postfix/ressources/logs/web/ntlmauthenticator.cache";
	$cacheSwap="/usr/share/artica-postfix/ressources/logs/web/squid_swap_status.html";
	$ini->loadString(base64_decode($sock->getFrameWork('cmd.php?squid-ini-status=yes')));
	
	
	
	$DisableAnyCache=$sock->GET_INFO("DisableAnyCache");
	$SquidActHasReverse=$sock->GET_INFO("SquidActHasReverse");
	$AsSquidLoadBalancer=$sock->GET_INFO("AsSquidLoadBalancer");
	$EnableRemoteStatisticsAppliance=$sock->GET_INFO("EnableRemoteStatisticsAppliance");
	$EnableKerbAuth=$sock->GET_INFO("EnableKerbAuth");
	if(!is_numeric($DisableAnyCache)){$DisableAnyCache=0;}
	$SquidBoosterMem=$sock->GET_INFO("SquidBoosterMem");
	$WizardStatsApplianceSeen=$sock->GET_INFO("WizardStatsApplianceSeen");
	
	if(!is_numeric($EnableKerbAuth)){$EnableKerbAuth=0;}
	if(!is_numeric($SquidBoosterMem)){$SquidBoosterMem=0;}
	if(!is_numeric($DisableAnyCache)){$DisableAnyCache=0;}
	if(!is_numeric($SquidActHasReverse)){$SquidActHasReverse=0;}	
	if(!is_numeric($AsSquidLoadBalancer)){$AsSquidLoadBalancer=0;}
	if(!is_numeric($AsSquidLoadBalancer)){$AsSquidLoadBalancer=0;}
	if(!is_numeric($WizardStatsApplianceSeen)){$WizardStatsApplianceSeen=0;}		
	$UnlockWebStats=$sock->GET_INFO("UnlockWebStats");
	if(!is_numeric($UnlockWebStats)){$UnlockWebStats=0;}
	if($UnlockWebStats==1){$EnableRemoteStatisticsAppliance=0;}	
	
	$squid_status=DAEMON_STATUS_ROUND("SQUID",$ini,null,1);
	$dansguardian_status=DAEMON_STATUS_ROUND("DANSGUARDIAN",$ini,null,1);
	$kav=DAEMON_STATUS_ROUND("KAV4PROXY",$ini,null,1);
	$cicap=DAEMON_STATUS_ROUND("C-ICAP",$ini,null,1);
	$APP_PROXY_PAC=DAEMON_STATUS_ROUND("APP_PROXY_PAC",$ini,null,1);
	$APP_SQUIDGUARD_HTTP=DAEMON_STATUS_ROUND("APP_SQUIDGUARD_HTTP",$ini,null,1);
	$APP_UFDBGUARD=DAEMON_STATUS_ROUND("APP_UFDBGUARD",$ini,null,1);
	$APP_UFDBGUARD_CLIENT=DAEMON_STATUS_ROUND("APP_UFDBGUARD_CLIENT",$ini,null,1);
	$APP_UFDBCAT=DAEMON_STATUS_ROUND("APP_UFDBCAT",$ini,null,1);
	$APP_HYPERCACHE_WEB=DAEMON_STATUS_ROUND("APP_HYPERCACHE_WEB",$ini,null,1);
	$APP_FRESHCLAM=DAEMON_STATUS_ROUND("APP_FRESHCLAM",$ini,null,1);
	$APP_ARTICADB=DAEMON_STATUS_ROUND("APP_ARTICADB",$ini,null,1);
	$APP_SQUID_DB=DAEMON_STATUS_ROUND("APP_SQUID_DB",$ini,null,1);
	$APP_HAARP=DAEMON_STATUS_ROUND("APP_HAARP",$ini,null,1);
	$APP_CNTLM=DAEMON_STATUS_ROUND("APP_CNTLM",$ini,null,1);
	$APP_CNTLM_PARENT=DAEMON_STATUS_ROUND("APP_CNTLM_PARENT",$ini,null,1);
	$APP_SQUID_NAT=DAEMON_STATUS_ROUND("APP_SQUID_NAT",$ini,null,1);
	

	$CLAMAV=DAEMON_STATUS_ROUND("CLAMAV",$ini,null,1);
	$DNSCACHE=DAEMON_STATUS_ROUND("DNSMASQ_SQUID",$ini,null,1);
	$UCARP_MASTER=DAEMON_STATUS_ROUND("UCARP_MASTER",$ini,null,1);
	$UCARP_SLAVE=DAEMON_STATUS_ROUND("UCARP_SLAVE",$ini,null,1);
	$HOTSPOT_WWW=DAEMON_STATUS_ROUND("HOTSPOT_WWW",$ini,null,1);
	$HOTSPOT_FW=DAEMON_STATUS_ROUND("HOTSPOT_FW",$ini,null,1);
	$HOTSPOT_SERVICE=DAEMON_STATUS_ROUND("HOTSPOT_SERVICE",$ini,null,1);
	$APP_ZIPROXY=DAEMON_STATUS_ROUND("APP_ZIPROXY",$ini,null,1);
	$APP_SARG=DAEMON_STATUS_ROUND("APP_SARG",$ini,null,1);
	
	//$APP_CONNTRACKD=DAEMON_STATUS_ROUND("APP_CONNTRACKD",$ini,null,1);
	if($users->PROXYTINY_APPLIANCE){$APP_ARTICADB=null;}
	if($EnableRemoteStatisticsAppliance==1){$APP_ARTICADB=null;}
	$APP_FTP_PROXY=DAEMON_STATUS_ROUND("APP_FTP_PROXY",$ini,null,1);
	$CacheManagement2=$sock->GET_INFO("CacheManagement2");
	if(!is_numeric($CacheManagement2)){$CacheManagement2=0;}

	
	
	if($EnableKerbAuth==1){
		$APP_SAMBA_WINBIND=DAEMON_STATUS_ROUND("SAMBA_WINBIND",$ini,null,1);
	}	
	$tr[]="<div id='squid-mem-status'></div><script>LoadAjaxTiny('squid-mem-status','$page?squid-mem-status=yes');</script>";
	$tr[]="<div id='squid-stores-status'></div>";
	$tr[]="<div id='squid-info-status'></div>";
	
	
	
	if(is_file($cacheSwap)){
		$tr[]=@file_get_contents($cacheSwap);
	}
	
	
	if(is_file($Authenticator_cacheFile)){
		$tr[]="<div id='squid-ntlmauth-status'></div><script>LoadAjaxTiny('squid-ntlmauth-status','$page?squid-ntlmauth-status=yes');</script>";
	}
	
	$cacheFile="/usr/share/artica-postfix/ressources/logs/web/dnsperformances.cache";
	$data=@file_get_contents($cacheFile);
	if(strlen($data)>10){
		$tr[]=$data;
	}
	

	
	
	$md=md5(date('Ymhis'));
	if(!$users->WEBSTATS_APPLIANCE){
		$swappiness=intval($sock->getFrameWork("cmd.php?sysctl-value=yes&key=".base64_encode("vm.swappiness")));
		$sock=new sockets();
		$swappiness_saved=unserialize(base64_decode($sock->GET_INFO("kernel_values")));
		if(!is_numeric($swappiness_saved["swappiness"])){
			if($swappiness>30){
				$tr[]=DAEMON_STATUS_ROUND_TEXT("warning-panneau-42.png","{high_swap_value}",
				"{high_swap_value_text}","Loadjs('squid.perfs.php')");
			}
			
		}
		
		$q=new mysql();
		$SquidAsSeenCache=$sock->GET_INFO("SquidAsSeenCache");
		if(!is_numeric($SquidAsSeenCache)){$SquidAsSeenCache=0;}
		if($q->COUNT_ROWS("squid_speed", "artica_backup")==0){
			if($SquidAsSeenCache==0){
				$tr[]=DAEMON_STATUS_ROUND_TEXT("warning-panneau-42.png","{cached_rules_not_set}",
				"{cached_rules_not_set_explain}","Loadjs('squid.caches.rules.php')");
			}
				
		}
			
		$SquidAsSeenCacheCenter=$sock->GET_INFO("SquidAsSeenCacheCenter");
		if(!is_numeric($SquidAsSeenCacheCenter)){$SquidAsSeenCacheCenter=0;}
			
		if($CacheManagement2==0){
			if($SquidAsSeenCacheCenter==0){
				$tr[]=DAEMON_STATUS_ROUND_TEXT("48-infos.png","{CacheManagement2}",
						"{CacheManagement2_explain}","Loadjs('squid.caches.ManagementChoose.php')");
					
				}
				
			}
			
			
			if($WizardStatsApplianceSeen==0){
				$tr[]=DAEMON_STATUS_ROUND_TEXT("warning-panneau-42.png","{use_remote_server_stats}",
				"{use_remote_server_stats_explain}","Loadjs('squid.stats-appliance.php')");
				
			}
	}
	
	
	
	$CicapEnabled=0;
	if($users->C_ICAP_INSTALLED){
		$CicapEnabled=$sock->GET_INFO("CicapEnabled");
		if(!is_numeric($CicapEnabled)){$CicapEnabled=0;}
	}
	
	
	
		$squid_status=null;
		
		$ini=new Bs_IniHandler();
		$ini->loadString(base64_decode($sock->getFrameWork('squid.php?smp-status=yes')));
		
		if(is_array($ini->_params)){
			while (list ($index, $line) = each ($ini->_params) ){
				if($GLOBALS["VERBOSE"]){echo __FUNCTION__."::".__LINE__."::$index -> DAEMON_STATUS_ROUND<br>\n";}
				$tr[]=DAEMON_STATUS_ROUND($index,$ini,null,1);
				
			}
		}
		
	
	

	
	if($SquidBoosterMem>0){
		
			if($DisableAnyCache==0){
				$tr[]=squid_booster_smp();
			}
		
	}
	
	
	$tr[]=$squid_status;
	$tr[]=$APP_SQUID_NAT;
	$tr[]=$APP_HAARP;
	$tr[]=$APP_HYPERCACHE_WEB;
	$tr[]=$APP_SAMBA_WINBIND;
	$tr[]=$APP_CNTLM;
	$tr[]=$APP_CNTLM_PARENT;
	$tr[]=$dansguardian_status;
	$tr[]=$kav;
	$tr[]=$cicap;
	$tr[]=$DNSCACHE;
	$tr[]=$CLAMAV;
	$tr[]=$APP_PROXY_PAC;
	$tr[]=$APP_SQUIDGUARD_HTTP;
	$tr[]=$APP_SARG;
	$tr[]=$HOTSPOT_WWW;
	$tr[]=$HOTSPOT_SERVICE;
	
	$tr[]=$HOTSPOT_FW;
	$tr[]=$APP_ZIPROXY;
	$tr[]=$APP_UFDBGUARD;
	$tr[]=$APP_UFDBGUARD_CLIENT;
	$tr[]=$APP_UFDBCAT;
	$tr[]=$APP_ARTICADB;
	$tr[]=$APP_SQUID_DB;
	$tr[]=$APP_FTP_PROXY;

	$tr[]=$UCARP_MASTER;
	$tr[]=$UCARP_SLAVE;
	
	if(isset($_GET["miniadmin"])){
		echo $tpl->_ENGINE_parse_body(CompileTr3($tr,true));
		return;
		
	}
	$EnableUfdbGuard=$sock->EnableUfdbGuard();
	if(!is_numeric($EnableUfdbGuard)){$EnableUfdbGuard=0;}
	if(!$users->APP_UFDBGUARD_INSTALLED){$EnableUfdbGuard=0;}
	
	$tables[]="<div style='min-height:350px;'>
		<table style='width:100%' class='TableRemove TableMarged'><tr>";
	$t=0;
	while (list ($key, $line) = each ($tr) ){
			$line=trim($line);
			if($line==null){continue;}
			$t=$t+1;
			$tables[]="<td valign='top'>$line</td>";
			if($t==2){$t=0;$tables[]="</tr><tr>";}
			}
	
	if($t<2){
		for($i=0;$i<=$t;$i++){
			$tables[]="<td valign='top'>&nbsp;</td>";				
		}
	}
	

	

	$SquidBoosterMemText="
		<tr>
			<td width=1%><img src='img/memory-32.png'></td>
			<td><div id='ptx-status'></div></td>
		</tr>
	";
	
	
	
	if($EnableKerbAuth==1){	
		$winbind="
			<tr>
		<td width=1%><img src='img/32-logs.png'></td>
		<td nowrap><a href=\"javascript:blur();\"
		OnClick=\"javascript:Loadjs('winbindd.events.php');\"
		style='font-size:12px;text-decoration:underline'>{APP_SAMBA_WINBIND}</a></td>
		</tr>
	";

		$UseDynamicGroupsAcls=$sock->GET_INFO("UseDynamicGroupsAcls");
		if(!is_numeric($UseDynamicGroupsAcls)){$UseDynamicGroupsAcls=0;}
		
		if($UseDynamicGroupsAcls==1){
			$UseDynamicGroupsAclsTR="
			<tr>
		<td width=1%><img src='img/32-logs.png'></td>
		<td nowrap><a href=\"javascript:blur();\"
		OnClick=\"javascript:Loadjs('DynamicGroupsAcls.events.php');\"
		style='font-size:12px;text-decoration:underline'>{dynamicgroupsAcls_events}</a></td>
		</tr>
	";			
		}
		
		
	}
	
	if($EnableUfdbGuard==1){
		$ufdbbutt="
			<tr>
		<td width=1%><img src='img/service-check-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:ReconfigureUfdb();\" 
		style='font-size:12px;text-decoration:underline'>{reconfigure_webfilter_service}</a></td>
		</tr>	
	";
	}
	
	if($CicapEnabled==1){
		$cicapButt="
			<tr>
		<td width=1%><img src='img/icon-antivirus-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('c-icap.index.php');\" 
		style='font-size:12px;text-decoration:underline'>{antivirus_parameters}</a></td>
		</tr>	
	";		
		
	}
	
	
	

$supportpckg="
			<tr>
		<td width=1%><img src='img/technical-support-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('squid.support.package.php');\" 
		style='font-size:12px;text-decoration:underline'>{build_support_package}</a></td>
		</tr>	
	";	

$dns_query="
			<tr>
		<td width=1%><img src='img/dns-32.png' id='events-dns-32-squid'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('system.dns.query.php?img=events-rotate-32-squid&src=events-dns-32-squid');\" 
		style='font-size:12px;text-decoration:underline'>{dns_query}</a></td>
		</tr>	
	";

$squid_rotate="
			<tr>
		<td width=1%><img src='img/events-rotate-32.png' id='events-rotate-32-squid'></td>
		<td nowrap><a href=\"javascript:blur();\"
		OnClick=\"javascript:Loadjs('squid.perf.logrotate.php?img=events-rotate-32-squid&src=events-rotate-32.png');\"
		style='font-size:12px;text-decoration:underline'>{squid_logrotate_perform}</a></td>
		</tr>
	";


$reconfigure="
			<tr>
		<td width=1%><img src='img/reconfigure-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('squid.compile.progress.php');\"
		style='font-size:12px;text-decoration:underline'>{reconfigure}</a></td>
		</tr>	
	";	
$debug_compile="
			<tr>
		<td width=1%><img src='img/32-logs.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('squid.debug.compile.php');\" 
		style='font-size:12px;text-decoration:underline'>{compile_in_debug}</a></td>
		</tr>	
	";	

$current_sessions="
			<tr>
		<td width=1%><img src='img/32-many-users.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('squid.squidclient.clientlist.php');\" 
		style='font-size:12px;text-decoration:underline'>{display_current_sessions}</a></td>
		</tr>	
	";	

$squidconf="
			<tr>
		<td width=1%><img src='img/script-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\"
		OnClick=\"javascript:Loadjs('squid.conf.php');\"
		style='font-size:12px;text-decoration:underline'>{configuration_file}</a></td>
		</tr>
	";




$performances="
			<tr>
		<td width=1%><img src='img/performance-tuning-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('squid.squidclient.info.php');\" 
		style='font-size:12px;text-decoration:underline'>{display_performance_status}</a></td>
		</tr>	
	";	

$restart_all_services="	<tr>
		<td width=1%><img src='img/service-restart-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('squid.restart.php');\" 
		style='font-size:12px;text-decoration:underline'>{restart_all_services}</a></td>
	</tr>
	";

$restart_service_only="
	<tr>
		<td width=1%><img src='img/service-restart-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\" 
		OnClick=\"javascript:Loadjs('squid.restart.php?onlySquid=yes');\" 
		style='font-size:12px;text-decoration:underline'>{restart_onlysquid}</a></td>
	</tr>	";

$reloadservice="
	<tr>
		<td width=1%><img src='img/reload-32.png'></td>
		<td nowrap><a href=\"javascript:blur();\"
		OnClick=\"javascript:Loadjs('squid.restart.php?onlyreload=yes');\"
		style='font-size:12px;text-decoration:underline'>{reload_service}</a></td>
	</tr>	";

$checkCaches="
	<tr>
		<td width=1%><img src='img/database-connect-32-2.png'></td>
		<td nowrap><a href=\"javascript:blur();\"
		OnClick=\"javascript:Loadjs('squid.restart.php?CheckCaches=yes');\"
		style='font-size:12px;text-decoration:underline'>{check_caches}</a></td>
	</tr>	";
	
$users=new usersMenus();

if($users->WEBSTATS_APPLIANCE){
	$squid_rotate=null;
	$debug_compile=null;
	$current_sessions=null;
	$restart_service_only=null;
	$performances=null;
	$SquidBoosterMemText=null;
	$supportpckg=null;
	$squidconf=null;
}

if($DisableAnyCache==1){
	$SquidBoosterMemText=null;
}

	$refresh=imgtootltip("refresh-32.png","{refresh}","LoadAjax('squid-services','$page?squid-services=yes&force=yes');");
	$tables[]="
	
	<div id='squid-adker-status'></div>
	</table>
	<div style='text-align:right;margin-top:-15px'>$refresh</div>
	</div>
	<table style='width:99%' class=form>
	<tr>
	<td valign='top' width='50%'>
		<table style='width:100%'>
	$squidconf
	$reconfigure
	$restart_all_services
	$restart_service_only
	$SquidBoosterMemText
	$squid_rotate
	$winbind
	$UseDynamicGroupsAclsTR
	$dns_query
	</table>
	</td>
	<td valign='top' width='50%'>
		<table style='width:100%'>
			$reloadservice
			$checkCaches
			$ufdbbutt
			$debug_compile
			$supportpckg		
			$cicapButt
			$current_sessions
			$performances
		</table>
	</td>
	</tr>
	</table>";
	
	if($asroot){
		$tables[]="<div style='width:100%;text-align:right'><i>". date("H:i:s")."</i></div>";
	}
	
	
	
	
	$html=@implode("\n", $tables)."
	<script>
	var x_ReconfigureUfdb= function (obj) {
		var res=obj.responseText;
		if (res.length>3){alert(res);}
		RefreshTab('squid_main_svc');
	}		
		
	function ReconfigureUfdb(){
			var XHR = new XHRConnection();
		    XHR.appendData('ReconfigureUfdb', 'yes');
		    AnimateDiv('squid-services');
		    XHR.sendAndLoad('$page', 'POST',x_ReconfigureUfdb); 
		
	}
	
	LoadAjaxTiny('ptx-status','$page?ptx-status=yes');

	$SecondScript
</script>	
";
	

	
if($GLOBALS["AS_ROOT"]){
	@file_put_contents("/usr/share/artica-postfix/ressources/logs/web/squid.services.html", $html);
	@chmod("/usr/share/artica-postfix/ressources/logs/web/squid.services.html",0755);
	return;
}
	
	SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
	if($asroot){ return; }		
	
	echo $tpl->_ENGINE_parse_body($html);
	
}
Exemple #14
0
function parameters()
{
    $sock = new sockets();
    $EnableCommunityFilters = $sock->GET_INFO("EnableCommunityFilters");
    if ($EnableCommunityFilters == null) {
        $EnableCommunityFilters = 1;
    }
    $rescan_visited = Paragraphe("compile-database-64.png", "{RESCAN_WWWVISISTED}", "{WEB_RESCAN_VISITED_TEXT}", "javascript:Loadjs('squid.visited.php?rescan-js=yes')");
    $tr[] = $rescan_visited;
    $table = CompileTr3($tr);
    $page = CurrentPageName();
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td class=legend>{alert_in_frontpage_website_categorize}:</td>\n\t<td>" . Field_checkbox("EnableCommunityFilters", 1, $EnableCommunityFilters, "EnableCommunityFiltersCheck()") . "</td>\n\t</tr>\n\t</table> \n\t{$table}\n\t<script>\n\t\tvar x_EnableCommunityFiltersCheck=function(obj){\n     \tvar tempvalue=obj.responseText;\n      \tif(tempvalue.length>3){alert(tempvalue);}\n     \tdocument.getElementById('ssl-bump-wl-id').innerHTML='';\n     \tsslBumpList();\n     \t}\t\n      \n\n\n\tfunction EnableCommunityFiltersCheck(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('EnableCommunityFilters').checked){\n\t\t\tXHR.appendData('EnableCommunityFilters',1);}else{\n\t\t\tXHR.appendData('EnableCommunityFilters',0);\n\t\t\t}\n\t\tXHR.sendAndLoad('{$page}', 'GET');\t\t\n\t\t}\n\t\n\t\n</script>\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function section_architecture_content()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $users = new usersMenus();
    $compilefile = "ressources/logs/squid.compilation.params";
    if (!is_file($compilefile)) {
        $sock->getFrameWork("squid.php?compil-params=yes");
    }
    $COMPILATION_PARAMS = unserialize(base64_decode(file_get_contents($compilefile)));
    $listen_port = Paragraphe('folder-network-64.png', '{listen_port}', '{listen_port_text}', "javascript:Loadjs('squid.popups.php?script=listen_port')");
    $listen_addr = Paragraphe('folder-network-64.png', '{listen_address}', '{squid_listen_text}', "javascript:Loadjs('squid.nic.php')");
    $transparent_mode = Paragraphe('relayhost.png', '{transparent_mode}', '{transparent_mode_text}', "javascript:Loadjs('squid.newbee.php?squid-transparent-js=yes')");
    $your_network = Paragraphe('folder-realyrules-64.png', '{your_network}', '{your_network_text}', "javascript:Loadjs('squid.popups.php?script=network')");
    $sslbump = Paragraphe('web-ssl-64.png', '{squid_sslbump}', '{squid_sslbump_text}', "javascript:Loadjs('squid.sslbump.php')");
    $watchdog = Paragraphe('service-check-64-grey.png', '{squid_watchdog}', '{squid_watchdog_text}', "");
    $ftp_user = Paragraphe('ftp-user-64.png', '{squid_ftp_user}', '{squid_ftp_user_text}', "javascript:Loadjs('squid.ftp.user.php')");
    $messengers = Paragraphe('messengers-64.png', '{instant_messengers}', '{squid_instant_messengers_text}', "javascript:Loadjs('squid.messengers.php')");
    $watchdog = Paragraphe('service-check-64.png', '{squid_watchdog}', '{squid_watchdog_text}', "javascript:Loadjs('squid.watchdog.php')");
    $booster = Paragraphe('perfs-64.png', '{squid_booster}', '{squid_booster_text}', "javascript:Loadjs('squid.booster.php')");
    $googlenossl = Paragraphe('google-64.png', '{disable_google_ssl}', '{disable_google_ssl_text}', "javascript:Loadjs('squid.google.ssl.php')");
    $forwarded_for = Paragraphe("icon-html-64.png", "x-Forwarded-For", "{x-Forwarded-For_explain}", "javascript:Loadjs('squid.forwarded_for.php')");
    if ($users->SQUID_REVERSE_APPLIANCE) {
        $sslbump = null;
        $messengers = null;
        $googlenossl = null;
        $ftp_user = null;
        $your_network = null;
    }
    $tr = array();
    $tr[] = $watchdog;
    $tr[] = $listen_port;
    $tr[] = $listen_addr;
    $tr[] = $timeouts;
    $tr[] = $forwarded_for;
    $tr[] = $transparent_mode;
    $tr[] = $your_network;
    $tr[] = $booster;
    $tr[] = $ftp_user;
    $tr[] = $messengers;
    $tr[] = $sslbump;
    $tr[] = $googlenossl;
    $html = CompileTr3($tr);
    $tpl = new templates();
    $html = "<div id='architecture-status'></div>\n<center style='width:100%'>\n<div style='width:80%;text-align:center'>{$html}</div>\n</center>\n<script>\n\tLoadAjaxTiny('architecture-status','squid.main.quicklinks.php?architecture-status=yes');\n\tQuickLinkShow('quicklinks-proxy_parameters');\n</script>";
    $html = $tpl->_ENGINE_parse_body($html, 'squid.index.php');
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
function section_content_filtering()
{
    $spamassassin = "yes";
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $sock = new sockets();
    $SpamAssMilterEnabled = $sock->GET_INFO("SpamAssMilterEnabled");
    $ou_encoded = base64_encode("_Global");
    $keywords = Paragraphe('keywords-64.png', '{block_keywords}', '{block_keywords_text}', "javascript:Loadjs('spamassassin.keywords.php')", null, 210, null, 0, true);
    $keywords_disabled = Paragraphe('keywords-64-grey.png', '{block_keywords}', '{block_keywords_text}', "javascript:blur()", null, 210, null, 0, true);
    $global_smtp_rules = Buildicon64('DEF_ICO_POSTFIX_REGEX');
    $extensions_block = Paragraphe("bg_forbiden-attachmt-64.png", "{attachment_blocking}", "{attachment_blocking_text}", "javascript:Loadjs('domains.edit.attachblocking.ou.php?ou={$ou_encoded}')", null, 210, null, 0, true);
    $tests_eml = Paragraphe("email-64-infos.png", "{message_analyze}", "{message_as_analyze_text}", "javascript:Loadjs('spamassassin.analyze.php')", null, 210, null, 0, true);
    $tests_eml_disabled = Paragraphe("email-info-64-grey.png", "{message_analyze}", "{message_as_analyze_text}", "", null, 210, null, 0, true);
    $message_analyze = $tests_eml;
    $sa_update_disabled = Paragraphe("64-spam-update-grey.png", "{UPDATE_SA_UPDATE}", "{UPDATE_SA_UPDATE_TEXT}", "", null, 210, null, 0, true);
    $sa_update = Paragraphe("64-spam-update.png", "{UPDATE_SA_UPDATE}", "{UPDATE_SA_UPDATE_TEXT}", "javascript:Loadjs('sa.update.php')", null, 210, null, 0, true);
    $sa_rules = Paragraphe("script-64.png", "{SPAMASSASSIN_RULES}", "{SPAMASSASSIN_RULES_TEXT}", "javascript:Loadjs('spamassassin.rules.php?byid=main_config_postfix_security')", null, 210, null, 0, true);
    $sa_rules_disabled = Paragraphe("script-64-grey.png", "{SPAMASSASSIN_RULES}", "{SPAMASSASSIN_RULES_TEXT}", "", null, 210, null, 0, true);
    $spamassassin = Paragraphe('64-spam.png', '{APP_SPAMASSASSIN}', '{SPAMASSASSIN_TEXT}', "javascript:Loadjs('spamassassin.index.php')", null, 210, null, 0, true);
    $spamassassin_disabled = Paragraphe('64-spam-grey.png', '{APP_SPAMASSASSIN}', '{SPAMASSASSIN_TEXT}', "javascript:blur()", null, 210, null, 0, true);
    $kas3 = Paragraphe('folder-caterpillar.png', '{APP_KAS3}', '{KAS3_TEXT}', 'javascript:Loadjs("kas.group.rules.php?ajax=yes")', null, 210, null, 0, true);
    $kas3_disabled = Paragraphe('folder-caterpillar-grey.png', '{APP_KAS3}', '{KAS3_TEXT}', 'javascript:blur()', null, 210, null, 0, true);
    $amavis = Paragraphe('64-amavis.png', '{APP_AMAVISD_NEW}', '{APP_AMAVISD_NEW_ICON_TEXT}', "javascript:Loadjs('amavis.index.php?ajax=yes')", null, 210, 100, 0, true);
    $amavis_disabled = Paragraphe('64-amavis-grey.png', '{APP_AMAVISD_NEW}', '{feature_not_installed}', "", null, 210, 100, 0, true);
    $mimedefang = Paragraphe('folder-64-mimedefang.png', '{APP_MIMEDEFANG}', '{MIMEDEFANG_TEXT}', 'mimedefang.index.php', null, 210, 100, 0, true);
    $mailspy = Paragraphe('64-milterspy.png', '{APP_MAILSPY}', '{APP_MAILSPY_TEXT}', 'mailspy.index.php', null, 210, 100, 0, true);
    $install = Buildicon64("DEF_ICO_CONTROLCENTER");
    $milter_script = Paragraphe('64-milter-behavior.png', '{plugins_behavior}', '{plugins_behavior_text}', "javascript:Loadjs('postfix.index.php?script=milterbehavior')", null, 210, 100, 0, true);
    $plugins_activate = Paragraphe('folder-lego.png', '{postfix_plugins}', '{postfix_plugins_text}', "javascript:Loadjs('postfix.plugins.php?js=yes')", null, 210, 100, 0, true);
    $wbl = Buildicon64('DEF_ICO_MAIL_WBL');
    $quarantine = Paragraphe('folder-quarantine-0-64.png', '{quarantine_and_backup_storage}', '{quarantine_and_backup_storage_text}', "javascript:Loadjs('quarantine.php?script=quarantine')", null, 210, 100, 0, true);
    $apply = applysettings_postfix(true);
    $assp = Buildicon64("DEF_ICO_ASSP");
    $quarantine_report = Paragraphe("biohazard-settings-64.png", "{quarantine_reports}", "{quarantine_reports_text}", "javascript:Loadjs('domains.quarantine.php?js=yes&MailSettings=yes')", null, 210, 100, 0, true);
    $quarantine_policies = Paragraphe("script-64.png", "{quarantine_policies}", "{quarantine_policies_text}", "javascript:Loadjs('quarantine.policies.php')", null, 210, null, 0, true);
    if ($spamassassin != null) {
        if (!$users->AMAVIS_INSTALLED) {
            if ($users->SPAMASS_MILTER_INSTALLED) {
                if ($SpamAssMilterEnabled != 1) {
                    $keywords = $keywords_disabled;
                    $message_analyze = $tests_eml_disabled;
                    $sa_update = $sa_update_disabled;
                    $sa_rules = $sa_rules_disabled;
                }
            } else {
                $keywords = $keywords_disabled;
                $message_analyze = $tests_eml_disabled;
                $sa_update = $sa_update_disabled;
                $sa_rules = $sa_rules_disabled;
            }
        }
        if ($users->AMAVIS_INSTALLED) {
            if ($users->EnableAmavisDaemon != 1) {
                if ($users->SPAMASS_MILTER_INSTALLED) {
                    if ($SpamAssMilterEnabled != 1) {
                        $keywords = $keywords_disabled;
                        $message_analyze = $tests_eml_disabled;
                        $sa_update = $sa_update_disabled;
                        $sa_rules = $sa_rules_disabled;
                    }
                } else {
                    $keywords = $keywords_disabled;
                    $message_analyze = $tests_eml_disabled;
                    $sa_update = $sa_update_disabled;
                    $sa_rules = $sa_rules_disabled;
                }
            }
        }
    }
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $keywords = null;
        $message_analyze = null;
    }
    $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
    $SpamAssMilterEnabled = $sock->GET_INFO("SpamAssMilterEnabled");
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    if (!$users->ASSP_INSTALLED) {
        $assp = null;
    }
    if ($users->EnableAmavisDaemon == 0) {
        $amavis = $amavis_disabled;
    }
    if (!$users->AMAVIS_INSTALLED) {
        $amavis = $amavis_disabled;
    }
    if (!$users->spamassassin_installed) {
        $spamassassin = $spamassassin_disabled;
    }
    if (!$users->MEM_HIGER_1G) {
        $spamassassin = $spamassassin_disabled;
    }
    if ($users->KasxFilterEnabled != 1) {
        $kas3 = $kas3_disabled;
    }
    if ($users->kas_installed != 1) {
        $kas3 = $kas3_disabled;
    }
    if (!$users->KAV_MILTER_INSTALLED) {
        $kasper = $kas3_disabled;
    }
    if ($users->KAVMILTER_ENABLED != 1) {
        $kasper = $kas3_disabled;
    }
    if ($users->EnableAmavisDaemon == 0) {
        $amavis = $amavis_disabled;
    }
    if (!$users->MEM_HIGER_1G) {
        $amavis = $amavis_disabled;
    }
    if (!$users->AMAVIS_INSTALLED) {
        $amavis = $amavis_disabled;
    }
    if ($EnablePostfixMultiInstance == 1) {
        $amavis = $amavis_disabled;
    }
    if ($users->MimeDefangEnabled != 1) {
        $mimedefang = null;
    }
    if (!$users->MIMEDEFANG_INSTALLED) {
        $mimedefang = null;
    }
    if (!$users->spamassassin_installed) {
        $spamassassin = $spamassassin_disabled;
    }
    if (!$users->spamassassin_installed) {
        $spamassassin = $spamassassin_disabled;
    }
    if ($users->KasxFilterEnabled != 1) {
        $kas3 = $kas3_disabled;
    }
    if ($users->kas_installed != 1) {
        $kas3 = $kas3_disabled;
    }
    if ($users->ClamavMilterEnabled != 1) {
        $clamav = null;
    }
    if (!$users->CLAMAV_MILTER_INSTALLED) {
        $clamav = null;
    }
    if ($EnablePostfixMultiInstance == 1) {
        $clamav = null;
    }
    if ($users->MilterGreyListEnabled != 1) {
        $mg = null;
    }
    if (!$users->MILTERGREYLIST_INSTALLED) {
        $mg = null;
    }
    if ($EnablePostfixMultiInstance == 1) {
        $mg = null;
    }
    if ($users->EnableMilterSpyDaemon != 1) {
        $mailspy = null;
    }
    if (!$users->MILTER_SPY_INSTALLED) {
        $mailspy = null;
    }
    if ($spamassassin != null) {
        if (!$users->AMAVIS_INSTALLED) {
            if ($users->SPAMASS_MILTER_INSTALLED) {
                if ($SpamAssMilterEnabled != 1) {
                    $spamassassin = $spamassassin_disabled;
                }
            } else {
                $spamassassin = $spamassassin_disabled;
            }
        }
        if ($users->AMAVIS_INSTALLED) {
            if ($users->EnableAmavisDaemon != 1) {
                if ($users->SPAMASS_MILTER_INSTALLED) {
                    if ($SpamAssMilterEnabled != 1) {
                        $spamassassin = $spamassassin_disabled;
                    }
                } else {
                    $spamassassin = $spamassassin_disabled;
                }
            }
        }
    }
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $spamassassin = null;
        $keywords = null;
    }
    $tr[] = $keywords;
    $tr[] = $global_smtp_rules;
    $tr[] = $extensions_block;
    $tr[] = $message_analyze;
    $tr[] = $spamassassin;
    $tr[] = $sa_rules;
    $tr[] = $sa_update;
    $tr[] = $amavis;
    if (!$users->KLMS_INSTALLED) {
        $tr[] = $assp;
        $tr[] = $kas3;
    }
    $tr[] = $keywords;
    $tr[] = $quarantine_policies;
    $tr[] = $quarantine;
    $tr[] = $quarantine_admin;
    $tr[] = $quarantine_report;
    $tr[] = $wbl;
    $tr[] = $clamav;
    $tr[] = $mailspy;
    $html = CompileTr3($tr);
    $html = "<center><div style='width:700px'>{$html}</div>\n\n\n</center>\n";
    $tpl = new templates();
    $datas = $tpl->_ENGINE_parse_body($html);
    echo $datas;
}
function organization_messaging()
{
    $ou = $_GET["ou"];
    $ou_encoded = base64_encode($ou);
    $sock = new sockets();
    $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
    if (trim($ou == null)) {
        if (isset($_COOKIE["SwitchOrgTabsOu"])) {
            $_GET["ou"] = $_COOKIE["SwitchOrgTabsOu"];
        }
    }
    $EnableArticaSMTPStatistics = $sock->GET_INFO("EnableArticaSMTPStatistics");
    if (!is_numeric($EnableArticaSMTPStatistics)) {
        $EnableArticaSMTPStatistics = 1;
    }
    $tpl = new templates();
    $usersmenus = new usersMenus();
    $usersmenus->LoadModulesEnabled();
    $network = Paragraphe('folder-network-64.png', '{postfix_network}', '{postfix_network_text}', "javascript:Loadjs('domains.postfix.network.php?ou={$ou_encoded}')", null, 210, null, 0, true);
    $restrictions = Paragraphe('64-sender-check.png', '{smtpd_client_restrictions}', '{smtpd_client_restrictions_text}', "javascript:Loadjs('domains.postfix.smtpd.restrictions.php?ou={$ou_encoded}')", null, 210, null, 0, true);
    $whitelists = Paragraphe("routing-domain-relay.png", "{PostfixAutoBlockDenyAddWhiteList}", "{PostfixAutoBlockDenyAddWhiteList_explain}", "javascript:Loadjs('domains.postfix.conwhitelist.php?ou={$ou_encoded}')", null, 210, null, 0, true);
    $dnsbl = Paragraphe("64-cop-acls-dnsbl.png", "{DNSBL_settings}", "{DNSBL_settings_text}", "javascript:Loadjs('domains.postfix.rbl.php?ou={$ou_encoded}')", null, 210, null, 0, true);
    if ($usersmenus->ASSP_INSTALLED) {
        $assp = Paragraphe("64-spam.png", "{APP_ASSP}", "{APP_ASSP_TEXT}", "javascript:Loadjs('domains.assp.php?ou={$ou_encoded}')", null, 210, null, 0, true);
    }
    $text_disbaled = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}";
    if ($usersmenus->KAV_MILTER_INSTALLED == true) {
        if ($usersmenus->KAVMILTER_ENABLED == 1) {
            $kavmilter = Paragraphe('icon-antivirus-64.png', '{antivirus}', '{antivirus_text}', "javascript:Loadjs('domains.edit.kavmilter.ou.php?ou={$ou_encoded}')", null, 210, null, 0, true);
            $extensions_block = Paragraphe("bg_forbiden-attachmt-64.png", "{attachment_blocking}", "{attachment_blocking_text}", "javascript:Loadjs('domains.edit.attachblocking.ou.php?ou={$ou_encoded}')", null, 210, null, 0, true);
        }
    }
    if ($usersmenus->kas_installed) {
        if ($usersmenus->KasxFilterEnabled) {
            $kas3x = Paragraphe('folder-caterpillar.png', '{as_plugin}', '{kaspersky_anti_spam_text}', "javascript:Loadjs('domains.edit.kas.php?ou={$ou_encoded}')", null, 210, null, 0, true);
        }
    }
    if ($usersmenus->AsPostfixAdministrator or $usersmenus->AsMessagingOrg or $usersmenus->AsOrgAdmin or $usersmenus->AllowEditOuSecurity) {
        $quarantine = icon_quarantine($usersmenus);
        $quarantine_admin = Paragraphe("64-banned-regex.png", "{all_quarantines}", "{all_quarantines_text}", "javascript:Loadjs('domains.quarantine.php?js=yes&Master=yes')", null, 210, 100, 0, true);
        $rttm = "<div style='float:left'>" . Buildicon64('DEF_ICO_EVENTS_RTMMAIL') . "</div>";
        $stats = Paragraphe('64-milterspy.png', '{statistics}', '{statistics_ou_text}', "javascript:Loadjs('statistics.ou.php?ou={$ou}')", null, 210, 100, 0, true);
        $quarantine_robot = Paragraphe("folder-64-denycontries.png", "{quarantine_robots}", "{quarantine_robots_text}", "javascript:Loadjs('domains.white.list.robots.php?ou={$ou}');", null, 210, 100, 0, true);
        if ($sock->GET_INFO("EnableWhiteListAndBlackListPostfix") == 1) {
            $whitelistrobots = Paragraphe('bg_chess-64.png', '{enable_artica_wbl_robots}', '{enable_artica_wbl_robots_icon}', "javascript:Loadjs('domains.white.list.robots.php?ou={$ou}')", null, 210, 0, 0, true);
        }
    }
    if (!isset($_GET["miniadm"])) {
        if ($usersmenus->AllowChangeDomains or $usersmenus->AsPostfixAdministrator or $usersmenus->AsMessagingOrg) {
            $transport = Paragraphe('folder-transport-64.png', '{localdomains}', '{localdomains_text}', "javascript:Loadjs('domains.edit.domains.php?js=yes&ou={$ou}')", null, 210, null, 0, true);
        }
    }
    if ($usersmenus->cyrus_imapd_installed) {
        $buildAllmailboxes = Paragraphe("rebuild-mailboxes-64.png", "{rebuild_mailboxes_org}", "{rebuild_mailboxes_org_text}", "javascript:Loadjs('domains.rebuild-mailboxes.php?ou={$ou_encoded}')", null, 210, 100, 0, true);
    }
    if ($usersmenus->AsQuarantineAdministrator) {
        $quarantine_query = Paragraphe('folder-quarantine-extrainfos-64.png', '{quarantine_manager}', '{quarantine_manager_text}', "javascript:Loadjs(\"domains.quarantine.php?js={$ou}\")", null, 210, null, 0, true);
    }
    if ($usersmenus->ZARAFA_INSTALLED) {
        if ($usersmenus->AsMailBoxAdministrator) {
            $zarafa = Paragraphe("zarafa-logo-64.png", "{APP_ZARAFA}", "{ZARAFA_OU_ICON_TEXT}", "javascript:Loadjs('domains.edit.zarafa.php?ou={$ou_encoded}')", null, 210, 100, 0, true);
        }
    }
    if ($usersmenus->ZARAFA_INSTALLED) {
        if ($usersmenus->cyrus_imapd_installed) {
            $zarafa_migration = Paragraphe("database-migration-64.png", "{CYRUS_TO_ZARAFA}", "{CYRUS_TO_ZARAFA_TEXT}", "javascript:Loadjs('domains.migr.zarafa.php?ou={$ou_encoded}')", null, 210, 100, 0, true);
        }
    }
    if ($usersmenus->AllowEditOuSecurity) {
        $director_report = Paragraphe("postmaster-identity.png", "{global_director_report}", "{global_director_report_text}", "javascript:Loadjs('domains.director.report.php?ou={$ou_encoded}')", null, 210, 100, 0, true);
    }
    if ($usersmenus->MAILMAN_INSTALLED) {
        if ($sock->GET_INFO('MailManEnabled') == 1) {
            if ($usersmenus->AsMailManAdministrator) {
                $mailman = Paragraphe("mailman-64.png", "{APP_MAILMAN}", '{user_mailman_explain}', "javascript:Loadjs('domains.mailman.lists.php?ou={$ou_encoded}')", null, 210, 100, 0, true);
            }
        }
    }
    if ($usersmenus->cyrus_imapd_installed) {
        if (!$usersmenus->EnableManageUsersTroughActiveDirectory) {
            $migration = Paragraphe("group-migration-64.png", "{MAILBOXES_MIGRATION}", '{MAILBOXES_MIGRATION_TEXT}', "javascript:Loadjs('domains.mailboxes.migration.php?ou={$ou_encoded}')", null, 210, 100, 0, true);
        }
    }
    if ($usersmenus->ZARAFA_INSTALLED) {
        if (!$usersmenus->EnableManageUsersTroughActiveDirectory) {
            $migration = Paragraphe("group-migration-64.png", "{MAILBOXES_MIGRATION}", '{MAILBOXES_MIGRATION_TEXT}', "javascript:Loadjs('domains.mailboxes.migration.php?ou={$ou_encoded}')", null, 210, 100, 0, true);
        }
    }
    if ($EnableArticaSMTPStatistics == 0) {
        $stats = null;
    }
    $network = null;
    $restrictions = null;
    $whitelists = null;
    $dnsbl = null;
    $assp = null;
    $tr[] = $transport;
    $tr[] = $network;
    $tr[] = $zarafa;
    $tr[] = $zarafa_migration;
    $tr[] = $buildAllmailboxes;
    $tr[] = $restrictions;
    $tr[] = $whitelists;
    $tr[] = $dnsbl;
    $tr[] = $director_report;
    $tr[] = $mailman;
    $tr[] = $assp;
    $tr[] = $kavmilter;
    $tr[] = $extensions_block;
    $tr[] = $kas3x;
    $tr[] = $whitelistrobots;
    $tr[] = $quarantine_robot;
    $tr[] = $rttm;
    $tr[] = $quarantine;
    $tr[] = $quarantine_admin;
    $tr[] = $quarantine_report;
    $tr[] = $quarantine_query;
    $tr[] = $stats;
    $tr[] = $ArticaHtml;
    $tr[] = $icon_backuphtml;
    $tr[] = $migration;
    $table = CompileTr3($tr);
    $html = "<center><div style='width:700px'>{$table}</div></center>\n\t";
    return $html;
}
Exemple #18
0
function status(){
	$page=CurrentPageName();
	$sock=new sockets();
	$tpl=new templates();
	$q=new mysql();
	$APP_SARG=$tpl->_ENGINE_parse_body("{APP_SARG}");
	$EnableSargGenerator=intval($sock->GET_INFO("EnableSargGenerator"));
	$EnableSargWeb=intval($sock->GET_INFO("EnableSargWeb"));
	$SargWebPort=intval($sock->GET_INFO("SargWebPort"));
	if($SargWebPort==0){$SargWebPort=rand(55600,59000);$sock->SET_INFO("SargWebPort", $SargWebPort);}
	$t=time();
	
	
	
	$disabled=$tpl->_ENGINE_parse_body("{disabled}");
	if($EnableSargGenerator==0){
		$version=Paragraphe32("noacco:$APP_SARG", "$disabled", "blur()", "warning-panneau-32.png");
		
	}else{
		$version=$sock->getFrameWork("sarg.php?version=yes");
		$status=unserialize($sock->GET_INFO("SargDirStatus"));
		$ff[]="version: $version";
		$ff[]="{size}: ".FormatBytes($status["SIZE"]);
		$ff[]="{files}: ".FormatNumber($status["FILES"])." {free}: ".FormatNumber($array["F_FREE"]);
		$ff[]="{free}: {$status["FREE"]}M";
		
		
		$version=Paragraphe32("noacco:$APP_SARG", "noacco:<div style='font-size:12px'>".$tpl->_ENGINE_parse_body(@implode("<br>", $ff))."</div>", "blur()", "ok32.png");
	}
	
	$sql="SELECT COUNT(*) as tcount FROM freeweb WHERE `groupware`='SARG'";
	$ligne=@mysql_fetch_array($q->QUERY_SQL($sql,"artica_backup"));
	if(!$q->ok){echo $q->mysql_error_html();}
	$count=$ligne["tcount"];
	if($count==0){
		$tr[]=Paragraphe32("no_website", "no_freeweb_service_explain", "Loadjs('freeweb.edit.php?hostname=&force-groupware=SARG');", "warning-panneau-32.png");
		
	}
	
	$tr[]=Paragraphe32("build_index_page", "build_index_page_sarg",
			"Loadjs('$page?index-run-js=yes');", "48-run.png");
	
	$tr[]=Paragraphe32("weekly_reports", "weekly_reports_execute", 
			"Loadjs('$page?weekly-run-js=yes');", "48-run.png");
	
	$tr[]=Paragraphe32("monthly_reports", "monthly_reports_execute",
			"Loadjs('$page?monthly-run-js=yes');", "48-run.png");	
	
	
	$tr[]=$version;
	
	
	$tableau=CompileTr3($tr,true);
	
	$html="
	<table style='width:100%'>
	<tr>
		<td style='width:340px;vertical-align:top'><div id='status-sarg'></div></td>
		<td style='width:98%'>
	<div style='width:98%' class=form>
	". Paragraphe_switch_img("{enable_sarg_service}", 
		"{APP_SARG_TXT}<br>{enable_sarg_service_text}",
		"EnableSargGenerator-$t",$EnableSargGenerator,null,780)
	. Paragraphe_switch_img("{enable_sarg_webservice}", 
			"{enable_sarg_webservice_text}","EnableSargWeb-$t"
			,$EnableSargWeb,null,780).
	"			
	<table style='width:100%'>
	<tr>
	 <td class=legend style='font-size:22px'>{listen_port}</td>
	 <td>". Field_text("SargWebPort-$t",$SargWebPort,"font-size:22px;width:120px")."</td>
	</tR>	
	<tr>
	 	<td colspan=2 align='right' style='font-size:18px'>
	 			<a href=\"http://{$_SERVER["SERVER_NAME"]}:$SargWebPort\" style='text-decoration:underline' _target=_new>http://{$_SERVER["SERVER_NAME"]}:$SargWebPort</a></td>
	 </tr>
	 </table>
	<p><hr></p>
	<div style='text-align:right'>". button("{apply}","Save$t()",26)."</div>
	</div>
	</td>
	</tr>
	</table>
	$tableau
	<script>
	var xSave$t= function (obj) {
			var tempvalue=obj.responseText;
			if(tempvalue.length>3){alert(tempvalue)};
			Loadjs('squid.restart.php?ApplyConfToo=yes&ask=yes');
		}
				
		function Save$t(){
			var XHR = new XHRConnection();
			XHR.appendData('EnableSargGenerator',document.getElementById('EnableSargGenerator-$t').value);
			XHR.appendData('EnableSargWeb',document.getElementById('EnableSargWeb-$t').value);
			XHR.appendData('SargWebPort',document.getElementById('SargWebPort-$t').value);
			XHR.sendAndLoad('$page', 'POST',xSave$t);	
		}

	LoadAjax('status-sarg','$page?status-sarg=yes')	
	</script>
		
	";
	
	echo $tpl->_ENGINE_parse_body($html);
}
Exemple #19
0
function security2()
{
    $failedtext = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}";
    $page = CurrentPageName();
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $tls = Buildicon64("DEF_ICO_POSTFIX_TLS");
    //$security_rules=Paragraphe('folder-rules-64.png','{security_rules}','{security_rules_text}',"javascript:Loadjs('postfix.security.rules.php?js=yes')",null,210,null,0,true);
    $messages_restriction = Paragraphe('folder-message-restriction.png', '{messages_restriction}', '{messages_restriction_text}', "javascript:Loadjs('postfix.messages.restriction.php?script=yes')", null, 210, null, 0, true);
    $internet_deny = Paragraphe('64-internet-deny.png', '{INTERNET_DENY}', '{INTERNET_DENY_TEXT}', "javascript:Loadjs('postfix.internet.deny.php')", null, 210, 100, 0, true);
    $ssl = Paragraphe('folder-64-routing-secure.png', '{SSL_ENABLE}', '{SSL_ENABLE_TEXT}', "javascript:Loadjs('postfix.master.cf.php?script=ssl');", null, 210, null, 0, true);
    $ou_encoded = base64_encode("_Global");
    //$extensions_block=Paragraphe("bg_forbiden-attachmt-64.png","{attachment_blocking}","{attachment_blocking_text}","javascript:Loadjs('domains.edit.attachblocking.ou.php?ou=$ou_encoded')",null,210,null,0,true);
    $plugins_activate = Paragraphe('folder-lego.png', '{POSTFIX_BUNDLE}', '{POSTFIX_BUNDLE_TEXT}', "javascript:Loadjs('postfix.plugins.php?script=yes')", null, 210, 100, 0, true);
    $postfixInstantIptables = Buildicon64("DEF_ICO_MAIL_IPABLES");
    $backup = icon_backup();
    $header_clean = Paragraphe("gomme-64.png", "{HIDE_CLIENT_MUA}", '{HIDE_CLIENT_MUA_TEXT}', "javascript:Loadjs('postfix.hide.headers.php')", null, 210, 100, 0, true);
    $vipwatch = Paragraphe("vipwatch-64.png", "VIPTrack", '{VIPTrack_text}', "javascript:Loadjs('postfix.viptrack.php')", null, 210, 100, 0, true);
    $tr[] = $backup;
    $tr[] = $vipwatch;
    $tr[] = $tls;
    $tr[] = $messages_restriction;
    $tr[] = $sasl;
    $tr[] = $ssl;
    $tr[] = $internet_deny;
    $tr[] = $header_clean;
    $table = CompileTr3($tr);
    $html = "\n<center>\n<div style='width:700px'>{$table}</div></center>";
    $tpl = new templates();
    $datas = $tpl->_ENGINE_parse_body($html);
    return $datas;
}
function nic_infos()
{
    $sock = new sockets();
    $q = new mysql();
    $tpl = new templates();
    $datas = unserialize(base64_decode($sock->getFrameWork("cmd.php?list-nics=yes")));
    $tcp = new networking();
    $IPBANS = unserialize(base64_decode($sock->GET_INFO("ArticaIpListBanned")));
    $sql = "SELECT Interface FROM nics";
    $results = $q->QUERY_SQL($sql, 'artica_backup');
    while ($ligne = @mysql_fetch_array($results, MYSQL_ASSOC)) {
        $MYSQL_NIC[$ligne["Interface"]] = $ligne["Interface"];
    }
    while (list($num, $val) = each($datas)) {
        writelogs("Found: {$val}", __FUNCTION__, __FILE__, __LINE__);
        $val = trim($val);
        $wire = '';
        $defaultroute_text = null;
        $color = "black";
        $error = null;
        $MUST_CHANGE = false;
        $WCCP_INTERFACE = false;
        $icon = "network-128-ok.png";
        if (preg_match('#master#', $val)) {
            continue;
        }
        if (preg_match("#^veth.+?#", $val)) {
            continue;
        }
        if (preg_match("#^tunl[0-9]+#", $val)) {
            continue;
        }
        if (preg_match("#^dummy[0-9]+#", $val)) {
            continue;
        }
        if (preg_match("#^gre[0-9]+#", $val)) {
            continue;
        }
        if (preg_match("#^ip6tnl[0-9]+#", $val)) {
            continue;
        }
        if (preg_match("#^sit[0-9]+#", $val)) {
            continue;
        }
        if (preg_match("#^vlan[0-9]+#", $val)) {
            continue;
        }
        if (preg_match("#^virt[0-9]+#", $val)) {
            continue;
        }
        if (preg_match("#wccp[0-9]+#", $val)) {
            $WCCP_INTERFACE = true;
        }
        $radius = "-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;/* behavior:url(/css/border-radius.htc); */";
        unset($MYSQL_NIC[$val]);
        $nicinfos = $sock->getFrameWork("cmd.php?nicstatus={$val}");
        $tbl = explode(";", $nicinfos);
        if ($IPBANS[$tbl[0]]) {
            continue;
        }
        $nicz = new system_nic($val);
        if (trim($val) == null) {
            continue;
        }
        if ($nicz->Bridged == 1) {
            continue;
        }
        $tcp->ifconfig(trim($val));
        $TCP_NIC_STATUS = $sock->getFrameWork("cmd.php?nicstatus={$val}");
        if (trim($tbl[5]) == "yes") {
            $wire = " (wireless)";
        }
        $gateway = trim($tbl[4]);
        if ($gateway == null) {
            $gateway = $nicz->GATEWAY;
        }
        if ($nicz->defaultroute == 1) {
            $defaultroute_text = "<i style='font-weight:blod;font-size:14px'>{default_route}</i>";
        }
        if ($tbl[0] == null) {
            $error = "<span style='color:#BA0000'>{waiting_network_reload}</span>";
            $icon = "network-128-warn.png";
        }
        if ($nicz->IPADDR != $tbl[0]) {
            $MUST_CHANGE = true;
        }
        if ($nicz->NETMASK != $tbl[2]) {
            $MUST_CHANGE = true;
        }
        if ($nicz->GATEWAY != $gateway) {
            $MUST_CHANGE = true;
        }
        if ($nicz->dhcp == 1) {
            $ip = new IP();
            if ($ip->isValid($tbl[0])) {
                $MUST_CHANGE = false;
            }
        }
        if ($nicz->enabled == 0) {
            $MUST_CHANGE = false;
        }
        if ($MUST_CHANGE) {
            $icon = "network-128-warn.png";
            $error = "<span style='color:#BA0000;font-size:16px'>{need_to_apply_network_settings_interface}</span>";
        }
        if ($nicz->enabled == 0) {
            $icon = "network-128-disabled.png";
            $color = "#8E8E8E";
        }
        if ($tbl[0] == null) {
            $tbl[0] = "<span style='color:#8a8a8a'>{$nicz->IPADDR}</span>";
        }
        if ($tbl[2] == null) {
            $tbl[2] = "<span style='color:#8a8a8a'>{$nicz->NETMASK}</span>";
        }
        $button = button("{modify}", "Loadjs('system.nic.edit.php?nic={$val}')", 16, 150);
        if ($WCCP_INTERFACE) {
            $error = null;
            $button = null;
        }
        $tr[] = "\n\t\t<table style='width:100%;border:2px solid #CCCCCC;margin-bottom:10x;{$radius}'>\n\t\t\n\t\t<tr>\n\t\t\t<td style='font-size:22px;font-weight:bold' colspan=2>\n\t\t\t<div style='margin-top:10px;margin-bottom:10px'>{$nicz->netzone}</span>: {$nicz->NICNAME} ({$val})\n\t\t\t<div style='text-align:right;width:80%;margin-top:-2px;\n\t\t\tpadding-top:5px;margin-bottom:10px'>{$defaultroute_text} {$error}</div>\n\t\t\t</div>\n\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=2>\n\t\t<table style='width:100%'>\n\t\t<td valign='top'><img src='img/{$icon}'></td>\n\t\t<td valign='top'>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t\t<td style='font-size:16px;color:{$color}' class=legend>{tcp_address}:</td>\n\t\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$tbl[0]}</td>\n\t\t\t</tr>\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend nowrap style='color:{$color};font-size:16px'>{netmask}</td>\n\t\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$tbl[2]}</a></td>\n\t\t\t</tr>\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend nowrap style='color:{$color};vertical-align:top;font-size:16px'>{gateway}:</td>\n\t\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$gateway}</a></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class=legend nowrap style='color:{$color};vertical-align:top;font-size:16px'>{metric}:</td>\n\t\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$nicz->metric}</a></td>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t\t<td class=legend nowrap style='color:{$color};font-size:16px'>{mac_addr}:</td>\n\t\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$tbl[1]}</a></td>\n\t\t\t</tr>\t\n\t\t\t</table>\n\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t</td>\n\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right' style='padding-bottom:9px'>{$button}</td>\n\t\t</tr>\t\t\n\t\t</table><p>&nbsp;</p>\n\t\t";
    }
    if (count($MYSQL_NIC) > 0) {
        while (list($num, $val) = each($MYSQL_NIC)) {
            $nicz = new system_nic($val);
            $tr[] = "\n\t\t\t<table style='width:100%;border:2px solid #CCCCCC;margin-bottom:10x;{$radius}'>\n\t\t\t\n\t\t\t<tr>\n\t\t\t<td style='font-size:22px;font-weight:bold' colspan=2>\n\t\t\t<div style='margin-top:10px;margin-bottom:10px'>{$nicz->netzone}</span>: {$nicz->NICNAME} ({$val})\n\t\t\t<div style='font-size:18px;color:#d32d2d'>{hardware_error}</div>\n\t\t\t</div>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td colspan=2>\n\t\t\t<table style='width:100%'>\n\t\t\t<td valign='top'><img src='img/network-128-fatal.png'></td>\n\t\t\t<td valign='top'>\n\t\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t<td style='font-size:16px;color:{$color}' class=legend>{tcp_address}:</td>\n\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$nicz->IPADDR}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td class=legend nowrap style='color:{$color};font-size:16px'>{netmask}</td>\n\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$nicz->NETMASK}</a></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td class=legend nowrap style='color:{$color};vertical-align:top;font-size:16px'>{gateway}:</td>\n\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$nicz->GATEWAY}</a></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td class=legend nowrap style='color:{$color};vertical-align:top;font-size:16px'>{metric}:</td>\n\t\t\t<td style='font-weight:bold;font-size:16px;color:{$color}'>{$nicz->metric}</a></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</td>\n\t\t\t\n\t\t\t<tr>\n\t\t\t<td colspan=2 align='right' style='padding-bottom:9px'>" . button("{delete}", "Loadjs('system.nic.edit.php?nic-delete-js={$val}')", 16, 150) . "</td>\n\t\t\t</tr>\n\t\t\t</table><p>&nbsp;</p>\n\t\t";
        }
    }
    $tr[] = "\n\t<center>" . button("{apply_network_configuration}", "Loadjs('network.restart.php')", 18, 390) . "</center>\n\t<center style='margin-top:10px'>" . button("{network_status}", "Loadjs('network.status.php')", 18, 390) . "</center>";
    $i = 0;
    $datas = unserialize(@file_get_contents("/usr/share/artica-postfix/ressources/usb.scan.serialize"));
    while (list($HDS, $MAIN_HD) = each($datas)) {
        if ($HDS == "UUID") {
            continue;
        }
        $HDSENC = urlencode($HDS);
        $tr[] = "\n\t\t<p>&nbsp;</p>\n\t\t<table style='width:100%;border:2px solid #CCCCCC;margin-bottom:10x;{$radius}'>\n\t\t\n\t\t<tr>\n\t\t<td style='font-size:22px;font-weight:bold'>\n\t\t<div style='margin-top:10px;margin-bottom:10px'>{disk} \n\t\t\n\t\t<a href=\"javascript:blur();\"\n\t\tOnClick=\"javascript:Loadjs('system.internal.disks.php?partinfos-js={$HDSENC}')\"\n\t\tstyle='text-decoration:underline;font-weight:bold'>{$HDS}</a> - {$MAIN_HD["SIZE"]}</div></td>\n\t\t</tr>\n\t\t";
        while (list($dev, $MAIN_PART) = each($MAIN_HD["PARTITIONS"])) {
            $i++;
            $ID_FS_LABEL = $MAIN_PART["ID_FS_LABEL"];
            if ($ID_FS_LABEL == null) {
                $ID_FS_LABEL = $MAIN_PART["MOUNTED"];
            }
            $SIZE = round($MAIN_PART["INFO"]["SIZE"] / 1024);
            if ($SIZE == 0) {
                continue;
            }
            $UTIL = round($MAIN_PART["INFO"]["UTIL"] / 1024);
            $ID_FS_UUID = $MAIN_PART["ID_FS_UUID"];
            $script[] = "\nvar g{$i} = new JustGage({\n\tid: '{$ID_FS_UUID}',\n\tvalue: {$UTIL},\n\tmin: 0,\n\tmax: {$SIZE},\n\ttitle: '{$ID_FS_LABEL}',\n\tlabel: 'MB',\n\tlevelColorsGradient: true\n});";
            $icz[] = "<div style='width:130px;height:100px' id='{$ID_FS_UUID}'></div>\n\t\t\t\t\n\t\t";
        }
        $tr[] = "\n\t\t<tr>\n\t\t<td>" . CompileTr3($icz, true) . "</td>\n\t\t\t\t\n\t\t</table><p>&nbsp;</p>";
    }
    echo $tpl->_ENGINE_parse_body(@implode("\n", $tr)) . "\n\n<script>\n" . @implode("\n", $script) . "\n</script>";
}
Exemple #21
0
function services_status(){
	$page=CurrentPageName();
	$tpl=new templates();		
	$sock=new sockets();
	$users=new usersMenus();
	$timefile="/usr/share/artica-postfix/ressources/databases/ZARAFA_DB_STATUS.db";
	$ARRAY=unserialize(@file_get_contents($timefile));
	$ttr=array();
	if(isset($ARRAY["ZARAFA_INDEX"])){
		if($ARRAY["ZARAFA_INDEX"]>0){
			$ttr[]="<tr><td style='font-size:14px;height:42px'>{indexes_size}:</td><td style='font-size:14px;font-weight:bold'>". FormatBytes($ARRAY["ZARAFA_INDEX"]/1024)."</td></tr>";
		}
		
	}
	if(isset($ARRAY["ZARAFA_DB"])){
		if($ARRAY["ZARAFA_DB"]>0){
			$ttr[]="<tr><td style='font-size:14px;height:42px'>{database_size}:</td><td style='font-size:14px;font-weight:bold'>". FormatBytes($ARRAY["ZARAFA_DB"]/1024)."</td></tr>";
		}
	
	}	
	if(isset($ARRAY["ATTACHS"])){
		if($ARRAY["ATTACHS"]>0){
			$ttr[]="<tr><td style='font-size:14px;height:48px'>{attachments_path}:</td><td style='font-size:14px;font-weight:bold'>". FormatBytes($ARRAY["ATTACHS"]/1024)."</td></tr>";
		}
	
	}	
	
	if(count($ttr)>0){
		$tr[]=RoundedLightGreen("<table style='width:100%;background-color:#D5EED9;font-size:11px;line-height:auto' 
				class='TableRemove TableMarged'>".@implode("", $ttr)."</table>");
		
	}
	
	$array[]="APP_ZARAFA";
	$array[]="APP_ZARAFA_SERVER2";
	$array[]="APP_ZARAFA_DB";
	$array[]="APP_ZARAFA_GATEWAY";
	$array[]="APP_ZARAFA_SPOOLER";
	$array[]="APP_ZARAFA_WEB";
	$array[]="APP_ZARAFA_MONITOR";
	$array[]="APP_ZARAFA_DAGENT";
	$array[]="APP_ZARAFA_ICAL";
	if($users->ZARAFA_INDEXER_INSTALLED){
		$APP_ZARAFA_INDEXER=$sock->GET_INFO("EnableZarafaIndexer");
		if(!is_numeric($APP_ZARAFA_INDEXER)){$APP_ZARAFA_INDEXER=0;}		
		if($APP_ZARAFA_INDEXER==1){$array[]="APP_ZARAFA_INDEXER";}
		
	}
	$array[]="APP_ZARAFA_LICENSED";
	if($users->ZARAFA_SEARCH_INSTALLED){
		$APP_ZARAFA_SEARCH=$sock->GET_INFO("EnableZarafaSearch");
		if(!is_numeric($APP_ZARAFA_SEARCH)){$APP_ZARAFA_SEARCH=0;}
		if($APP_ZARAFA_SEARCH==1){$array[]="APP_ZARAFA_SEARCH";}
		
	}
	$array[]="APP_YAFFAS";

	
	$ini=new Bs_IniHandler();
	$datas=base64_decode($sock->getFrameWork('cmd.php?zarafa-status=yes'));
	$ini->loadString($datas);
	
	while (list ($num, $ligne) = each ($array) ){
		$tr[]=DAEMON_STATUS_ROUND($ligne,$ini,null,1);
		
	}
	
	
	
	
$tables[]="<div style='width:98%' class=form>";	
if(isset($_GET["miniadm"])){
	$tables[]=CompileTr4($tr,true);
	$et="&miniadm=yes";
	
}else{
	$tables[]=CompileTr3($tr,true);
}
$tables[]="
<div style='width:100%;text-align:right'>". 
imgtootltip("32-refresh.png","{refresh}","LoadAjax('zarafa-services-status','$page?services-status=yes$et');")."</div>";


$html=implode("\n",$tables);	
echo $tpl->_ENGINE_parse_body($html);		

	
	
}
Exemple #22
0
function section_architecture_content()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $users = new usersMenus();
    $compilefile = "ressources/logs/squid.compilation.params";
    if (!is_file($compilefile)) {
        $sock->getFrameWork("squid.php?compil-params=yes");
    }
    $COMPILATION_PARAMS = unserialize(base64_decode(file_get_contents($compilefile)));
    $listen_port = Paragraphe('folder-network-64.png', '{listen_port}', '{listen_port_text}', "javascript:Loadjs('squid.popups.php?script=listen_port')");
    $dns_servers = Paragraphe('64-bind.png', '{dns_servers}', '{dns_servers_text}', "javascript:Loadjs('squid.popups.php?script=dns')");
    $visible_hostname = Paragraphe('64-work-station-linux.png', '{visible_hostname}', '{visible_hostname_intro}', "javascript:Loadjs('squid.popups.php?script=visible_hostname')");
    $transparent_mode = Paragraphe('relayhost.png', '{transparent_mode}', '{transparent_mode_text}', "javascript:Loadjs('squid.newbee.php?squid-transparent-js=yes')");
    $squid_parent_proxy = Paragraphe('server-redirect-64.png', '{squid_parent_proxy}', '{squid_parent_proxy_text}', "javascript:Loadjs('squid.parent.proxy.php')");
    $squid_reverse_proxy = Paragraphe('squid-reverse-64.png', '{squid_reverse_proxy}', '{squid_reverse_proxy_text}', "javascript:Loadjs('squid.reverse.proxy.php')");
    $your_network = Paragraphe('folder-realyrules-64.png', '{your_network}', '{your_network_text}', "javascript:Loadjs('squid.popups.php?script=network')");
    $sslbump = Paragraphe('web-ssl-64.png', '{squid_sslbump}', '{squid_sslbump_text}', "javascript:Loadjs('squid.sslbump.php')");
    if (!isset($COMPILATION_PARAMS["enable-ssl"])) {
        $sslbump = Paragraphe('web-ssl-64-grey.png', '{squid_sslbump}', '{squid_sslbump_text}', "");
    }
    if ($sock->GET_INFO("SquidActHasReverse") == 1) {
        $listen_port = null;
        $proxy_pac = null;
        $proxy_pac_rules = null;
        $SquidEnableProxyPac = 0;
        $squid_accl_websites = Paragraphe('website-64.png', '{squid_accel_websites}', '{squid_accel_websites_text}', "javascript:Loadjs('squid.reverse.websites.php')");
    }
    if ($sock->GET_INFO("hasProxyTransparent") == 1) {
        $proxy_pac = null;
        $proxy_pac_rules = null;
        $SquidEnableProxyPac = 0;
    }
    $tr = array();
    $tr[] = $listen_port;
    $tr[] = $visible_hostname;
    $tr[] = $transparent_mode;
    $tr[] = $dns_servers;
    $tr[] = $your_network;
    $tr[] = $APP_SQUIDKERAUTH;
    $tr[] = $proxy_pac;
    $tr[] = $proxy_pac_rules;
    $tr[] = $performances_tuning;
    $tr[] = $squid_conf;
    $tr[] = $squid_parent_proxy;
    $tr[] = $squid_reverse_proxy;
    $tr[] = $sslbump;
    $tr[] = $squid_accl_websites;
    $tr[] = $squid_advanced_parameters;
    $tr[] = $enable_squid_service;
    $tr[] = $sarg;
    $html = CompileTr3($tr);
    $tpl = new templates();
    $html = "<div id='architecture-status'></div>\n<center style='width:100%'>\n<div style='width:80%;text-align:center'>{$html}</div>\n</center>\n<script>LoadAjaxTiny('architecture-status','{$page}?architecture-status=yes');</script>";
    $html = $tpl->_ENGINE_parse_body($html, 'squid.index.php');
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
function webstats_middle()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $t = time();
    $boot = new boostrap_form();
    if (isset($_GET["title"])) {
        $buuton0 = button("{save_network_settings}", "Loadjs('{$page}?save-network=yes')");
        $buuton1 = button("{compile_network_settings}", "Loadjs('{$page}?apply-network=yes')");
        $title = $tpl->_ENGINE_parse_body("<div style='float:right'>{$buuton0}&nbsp;{$buuton1}</div><H3>{network_services}</H3><p>{network_services_text}</p>");
    }
    if (isNetSessions()) {
        $array["{edit_networks}"] = "miniadm.network.interfaces.php";
        $array["{routing_tables}"] = "miniadm.network.routes.php";
    }
    if ($users->AsDnsAdministrator) {
        if ($users->POWER_DNS_INSTALLED) {
            $array["{dns_service}"] = "miniadm.PowerDNS.php?popup=yes&explain-title=yes";
        }
    }
    if ($_SESSION["ASDCHPAdmin"]) {
        if ($users->dhcp_installed) {
            $array["{APP_DHCP}"] = "miniadm.dhcp.php?webstats-middle=yes&explain-title=yes";
        }
    }
    if ($_SESSION["AllowChangeDomains"]) {
        $array["{manage_internet_domains}"] = "miniadm.smtpdom.php?webstats-middle=yes&title=yes";
    }
    $array["{etc_hosts}"] = "miniadm.network.etchosts.php";
    $array["{computers}"] = "miniadm.computers.browse.php?page=yes";
    //$array["{events}"]="$page?events=yes";
    echo $title . $boot->build_tab($array);
    return;
    ini_set('display_errors', 1);
    ini_set('error_reporting', E_ALL);
    ini_set('error_prepend_string', null);
    ini_set('error_append_string', null);
    $page = CurrentPageName();
    $tpl = new templates();
    $tr = array();
    $dhcp = Paragraphe("64-dhcp.png", "{APP_DHCP}", "{APP_DHCP_TEXT}", "miniadm.dhcp.php?webstats-middle=yes");
    $domains = Paragraphe("domain-main-64.png", "{manage_internet_domains}", "{manage_internet_domains_text}", "miniadm.smtpdom.php");
    if (!$_SESSION["ASDCHPAdmin"]) {
        $dhcp = Paragraphe("64-dhcp-grey.png", "{APP_DHCP}", "{APP_DHCP_TEXT}");
    }
    if (!$users->dhcp_installed) {
        $dhcp = null;
        if ($_SESSION["ASDCHPAdmin"]) {
            $dhcp = Paragraphe("64-dhcp-grey.png", "{APP_DHCP}", "{APP_DHCP_TEXT}");
        }
    }
    if (!$_SESSION["AsOrgDNSAdmin"]) {
        $pdns = Paragraphe("dns-64-grey.png", "{manage_DNS_database}", "{APP_PDNS_TEXT}");
    }
    if (!$_SESSION["AllowChangeDomains"]) {
        $domains = Paragraphe("domain-main-64-grey.png", "{manage_internet_domains}", "{manage_internet_domains_text}");
    }
    if (!$users->POWER_DNS_INSTALLED) {
        $pdns = null;
    }
    $tr[] = $dhcp;
    $tr[] = $domains;
    echo $title . $tpl->_ENGINE_parse_body(CompileTr3($tr));
}
function all_services_status_build()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $ini = new Bs_IniHandler();
    $tpl = new templates();
    $users = new usersMenus();
    $squid = new squidbee();
    $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?squid-ini-status=yes')));
    if (!is_numeric($MonitConfig["watchdog"])) {
        $MonitConfig["watchdog"] = 1;
    }
    $DisableAnyCache = $sock->GET_INFO("DisableAnyCache");
    $SquidActHasReverse = $sock->GET_INFO("SquidActHasReverse");
    $AsSquidLoadBalancer = $sock->GET_INFO("AsSquidLoadBalancer");
    $EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
    $EnableKerbAuth = $sock->GET_INFO("EnableKerbAuth");
    if (!is_numeric($DisableAnyCache)) {
        $DisableAnyCache = 0;
    }
    $SquidBoosterMem = $sock->GET_INFO("SquidBoosterMem");
    $SquidCacheLevel = $sock->GET_INFO("SquidCacheLevel");
    if (!is_numeric($SquidCacheLevel)) {
        $SquidCacheLevel = 4;
    }
    if (!is_numeric($EnableKerbAuth)) {
        $EnableKerbAuth = 0;
    }
    if (!is_numeric($SquidBoosterMem)) {
        $SquidBoosterMem = 0;
    }
    if (!is_numeric($DisableAnyCache)) {
        $DisableAnyCache = 0;
    }
    if (!is_numeric($SquidActHasReverse)) {
        $SquidActHasReverse = 0;
    }
    if (!is_numeric($AsSquidLoadBalancer)) {
        $AsSquidLoadBalancer = 0;
    }
    if (!is_numeric($EnableRemoteStatisticsAppliance)) {
        $EnableRemoteStatisticsAppliance = 0;
    }
    $UnlockWebStats = $sock->GET_INFO("UnlockWebStats");
    if (!is_numeric($UnlockWebStats)) {
        $UnlockWebStats = 0;
    }
    if ($UnlockWebStats == 1) {
        $EnableRemoteStatisticsAppliance = 0;
    }
    if ($SquidCacheLevel == 0) {
        $DisableAnyCache = 1;
    }
    $squid_status = DAEMON_STATUS_ROUND("SQUID", $ini, null, 1);
    $dansguardian_status = DAEMON_STATUS_ROUND("DANSGUARDIAN", $ini, null, 1);
    $kav = DAEMON_STATUS_ROUND("KAV4PROXY", $ini, null, 1);
    $cicap = DAEMON_STATUS_ROUND("C-ICAP", $ini, null, 1);
    $APP_PROXY_PAC = DAEMON_STATUS_ROUND("APP_PROXY_PAC", $ini, null, 1);
    $APP_SQUIDGUARD_HTTP = DAEMON_STATUS_ROUND("APP_SQUIDGUARD_HTTP", $ini, null, 1);
    $APP_UFDBGUARD = DAEMON_STATUS_ROUND("APP_UFDBGUARD", $ini, null, 1);
    $APP_FRESHCLAM = DAEMON_STATUS_ROUND("APP_FRESHCLAM", $ini, null, 1);
    $APP_ARTICADB = DAEMON_STATUS_ROUND("APP_ARTICADB", $ini, null, 1);
    $APP_SQUID_DB = DAEMON_STATUS_ROUND("APP_SQUID_DB", $ini, null, 1);
    $APP_HAARP = DAEMON_STATUS_ROUND("APP_HAARP", $ini, null, 1);
    if ($users->PROXYTINY_APPLIANCE) {
        $APP_ARTICADB = null;
    }
    if ($EnableRemoteStatisticsAppliance == 1) {
        $APP_ARTICADB = null;
    }
    $APP_FTP_PROXY = DAEMON_STATUS_ROUND("APP_FTP_PROXY", $ini, null, 1);
    $squid = new squidbee();
    if ($EnableKerbAuth == 1) {
        $APP_SAMBA_WINBIND = DAEMON_STATUS_ROUND("SAMBA_WINBIND", $ini, null, 1);
    }
    $tr[] = "<div id='squid-mem-status'></div><script>LoadAjaxTiny('squid-mem-status','{$page}?squid-mem-status=yes');</script>";
    $tr[] = "<div id='squid-stores-status'></div><script>LoadAjaxTiny('squid-stores-status','{$page}?squid-stores-status=yes');</script>";
    $md = md5(date('Ymhis'));
    if (!$users->WEBSTATS_APPLIANCE) {
        $swappiness = intval($sock->getFrameWork("cmd.php?sysctl-value=yes&key=" . base64_encode("vm.swappiness")));
        $sock = new sockets();
        $swappiness_saved = unserialize(base64_decode($sock->GET_INFO("kernel_values")));
        if (!is_numeric($swappiness_saved["swappiness"])) {
            if ($swappiness > 30) {
                $tr[] = DAEMON_STATUS_ROUND_TEXT("warning-panneau-42.png", "{high_swap_value}", "{high_swap_value_text}", "Loadjs('squid.perfs.php')");
            }
        }
        if ($AsSquidLoadBalancer == 1) {
            $SquidAsSeenDNS = 1;
        }
        if (!$users->IsSquidReverse()) {
            $SquidAsSeenDNS = $sock->GET_INFO("SquidAsSeenDNS");
            if (!is_numeric($SquidAsSeenDNS)) {
                $SquidAsSeenDNS = 0;
            }
            if (count($squid->dns_array) == 0) {
                if ($SquidAsSeenDNS == 0) {
                    $tr[] = DAEMON_STATUS_ROUND_TEXT("warning-panneau-42.png", "{add_dns_in_config}", "{add_dns_in_config_perf_explain}", "Loadjs('squid.popups.php?script=dns')");
                }
            }
        }
    }
    $CicapEnabled = 0;
    if ($users->C_ICAP_INSTALLED) {
        $CicapEnabled = $sock->GET_INFO("CicapEnabled");
        if (!is_numeric($CicapEnabled)) {
            $CicapEnabled = 0;
        }
    }
    $squid_status = null;
    $ini = new Bs_IniHandler();
    $ini->loadString(base64_decode($sock->getFrameWork('squid.php?smp-status=yes')));
    while (list($index, $line) = each($ini->_params)) {
        if ($GLOBALS["VERBOSE"]) {
            echo __FUNCTION__ . "::" . __LINE__ . "::{$index} -> DAEMON_STATUS_ROUND<br>\n";
        }
        $tr[] = DAEMON_STATUS_ROUND($index, $ini, null, 1);
    }
    if ($SquidBoosterMem > 0) {
        if ($DisableAnyCache == 0) {
            $tr[] = squid_booster_smp();
        }
    }
    $tr[] = $squid_status;
    $tr[] = $APP_HAARP;
    $tr[] = $APP_SAMBA_WINBIND;
    $tr[] = $dansguardian_status;
    $tr[] = $kav;
    $tr[] = $cicap;
    $tr[] = $APP_PROXY_PAC;
    $tr[] = $APP_SQUIDGUARD_HTTP;
    $tr[] = $APP_UFDBGUARD;
    $tr[] = $APP_FRESHCLAM;
    $tr[] = $APP_ARTICADB;
    $tr[] = $APP_SQUID_DB;
    $tr[] = $APP_FTP_PROXY;
    $EnableUfdbGuard = $sock->EnableUfdbGuard();
    if (!is_numeric($EnableUfdbGuard)) {
        $EnableUfdbGuard = 0;
    }
    if (!$users->APP_UFDBGUARD_INSTALLED) {
        $EnableUfdbGuard = 0;
    }
    echo CompileTr3($tr, true);
}
Exemple #25
0
function main_disks_discover()
{
    $users = new usersMenus();
    $Disks = $users->disks_size;
    $page = CurrentPageName();
    $sock = new sockets();
    $dd = new harddrive();
    $ArticaDBPath = $sock->GET_INFO("ArticaDBPath");
    if ($ArticaDBPath == null) {
        $ArticaDBPath = "/opt/articatech";
    }
    $arrayDisks = $dd->getDiskList();
    $html = "<tr>";
    if (is_array($arrayDisks)) {
        $count = 0;
        $tr = null;
        while (list($disk, $ARRAY_FINAL) = each($arrayDisks)) {
            $content = null;
            $path = $ARRAY_FINAL["MOUNTED"];
            if ($path == "/boot") {
                continue;
            }
            if ($path == "{$ArticaDBPath}") {
                continue;
            }
            if ($path == "/usr/share/artica-postfix") {
                continue;
            }
            if (isset($already[$path])) {
                continue;
            }
            if ($path == null) {
                continue;
            }
            $already[$path] = true;
            $size = $ARRAY_FINAL["SIZE"];
            $label = $ARRAY_FINAL["LABEL"];
            if ($size == null) {
                continue;
            }
            $pourc = $ARRAY_FINAL["POURC"];
            $js = "Loadjs('SambaBrowse.php?jdisk={$disk}&mounted={$path}&t={$_GET["t"]}&homeDirectory={$_GET["homeDirectory"]}&no-shares={$_GET["no-shares"]}&field={$_GET["field"]}&protocol={$_GET["protocol"]}&no-hidden={$_GET["no-hidden"]}&functionAfter={$_GET["functionAfter"]}')";
            $disk_name = $disk;
            if (preg_match("#mapper\\/.+?\\-(.+)#", $disk_name, $re)) {
                $disk_name = $re[1];
            }
            if (preg_match("#([0-9]+)\\s+MB#", $size, $re)) {
                $size = $size * 1000;
                $size = FormatBytes($size);
                $size = str_replace(" ", "&nbsp;", $size);
            }
            $dirname = basename($path);
            $bandwith_color = "#5DD13D";
            if ($pourc > 70) {
                $bandwith_color = "#F59C44";
            }
            if ($pourc > 95) {
                $bandwith_color = "#D32D2D";
            }
            $count = $count + 1;
            if ($count == 2) {
                $tr = "</tr><tr>";
                $count = 0;
            } else {
                $tr = null;
            }
            $content = "({$size} - {$pourc}% {used})<br><strong>{$path}</strong><br><strong>{$label}</strong>\n\t\t\t\t\t<br><div style='margin-top:-10px'>" . pourcentage_basic($pourc, $bandwith_color, $size) . "</div>";
            $FINALDISKS[] = Paragraphe32("noacco:{$disk_name}", "{$content}", $js, "48-hd.png");
        }
    }
    if (is_array($added_disks_array)) {
        while (list($disk, $path) = each($added_disks_array)) {
            $js = "Loadjs('SambaBrowse.php?jdisk={$disk}&mounted={$path}&t={$_GET["t"]}&homeDirectory={$_GET["homeDirectory"]}&no-shares={$_GET["no-shares"]}&field={$_GET["field"]}&protocol={$_GET["protocol"]}&no-hidden={&functionAfter={$_GET["functionAfter"]}}')";
            $delete = imgtootltip("ed_delete.gif", "{delete} {$disk}...", "DeleteHiddenDisk('{$disk}')");
            $FINALDISKS[] = Paragraphe32("noacco:{$disk}", "{$disk}<br>", $js, "48-hd.png", 220);
        }
    }
    if ($_GET["field"] != null) {
        $js = "Loadjs('autofs.wizard.php?field={$_GET["field"]}')";
        $FINALDISKS[] = Paragraphe32("remote_connection", "remote_connection_wizard_text", $js, "folder-granted-properties-48.png", 220);
    }
    $finalfinal = CompileTr3($FINALDISKS);
    $add_disk = Paragraphe("64-hd-plus.png", "{invisible_disk}", "{add_invisible_disk_text}", "javascript:Loadjs('{$page}?hidden-add=yes')");
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='width:100%'><div style='font-size:18px'>{select_disk}</div></td>\n\t\t<td>\n\t<table style='width:5%'>\n\t<tr>\n\t\t<td width=1%>" . imgtootltip("32-hd-plus.png", "{add_invisible_disk_text}", "Loadjs('{$page}?hidden-add=yes')") . "</td>\n\t\t<td width=99% nowrap><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('{$page}?hidden-add=yes')\" style='font-size:14px;text-decoration:underline'>{invisible_disk}</a></td>\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n{$finalfinal}\n\t\n\t\n\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html, 'fileshares.index.php');
}
Exemple #26
0
function ufdbguard_service_section()
{
    $width = "650px";
    if (isset($_GET["width"])) {
        $width = "{$_GET["width"]}";
    }
    $template = Paragraphe("banned-template-64.png", "{template_label}", '{template_explain}', "javascript:s_PopUp('dansguardian.template.php',800,800)");
    $squidguardweb = Paragraphe("parameters2-64.png", "{banned_page_webservice}", "{banned_page_webservice_text}", "javascript:Loadjs('squidguardweb.php')");
    $ufdbguard_settings = Paragraphe("filter-sieve-64.png", "{APP_UFDBGUARD}", "{APP_UFDBGUARD_PARAMETERS}", "javascript:Loadjs('ufdbguard.php')");
    $recompile_all_database = Paragraphe("database-spider-compile2-64.png", "{recompile_all_db}", "{recompile_all_db_ww_text}", "javascript:Loadjs('ufdbguard.databases.php?scripts=recompile')");
    $compile_schedule = Paragraphe("clock-gold-64.png", "{compilation_schedule}", "{compilation_schedule_text}", "javascript:Loadjs('ufdbguard.databases.php?scripts=compile-schedule')");
    $ufdbguard_conf = Paragraphe("script-64.png", "ufdbguard.conf", "{ufdbguard_conf_read_text}", "javascript:Loadjs('ufdbguard.databases.php?scripts=config-file')");
    $tr[] = $ufdbguard_settings;
    $tr[] = $ufdbguard_conf;
    $tr[] = $squidguardweb;
    $tr[] = $template;
    $tr[] = $recompile_all_database;
    $tr[] = $compile_schedule;
    $html = "<center><div style='width:{$width}'>" . CompileTr3($tr) . "</div></center>";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html, 'squid.index.php');
    echo $html;
}
function GROUP_SETTINGS_PAGE_CONTENT()
{
    $ldap = new clladp();
    $page = CurrentPageName();
    $num = $_GET["LoadGroupSettings"];
    $groupID = $num;
    writelogs("Loading group {$num}", __FUNCTION__, __FILE__, __LINE__);
    if (is_base64_encoded($_GET["ou"])) {
        $_GET["ou"] = base64_decode($_GET["ou"]);
    }
    $ou_conn = $_GET["ou"];
    if (!$ldap->EnableManageUsersTroughActiveDirectory) {
        if (!is_numeric($num)) {
            return null;
        }
    }
    if (trim($num) == null) {
        $num = 0;
    }
    if ($num == 0) {
        if (isset($_GET["byGroupName"])) {
            $num = $ldap->GroupIDFromName($_GET["ou"], $_GET["byGroupName"]);
            writelogs("Numeric identifier=0, try to get numeric identifier by {$_GET["ou"]}/{$_GET["byGroupName"]}={$num}", __FUNCTION__, __FILE__, __LINE__);
            if ($num == 0) {
                return;
            }
        }
    }
    $group = new groups($num);
    if (trim($_GET["ou"]) != null) {
        if ($group->ou != $_GET["ou"]) {
            $tpl = new templates();
            $error = "<center style='border:2px solid red;padding:10px;margin:10px'><span style='font-size:13px;font-weight:bold;color:red'>Group: {$num}/{$_GET["ou"]}<br> {error_group_not_in_your_organization}</span></center>";
            //echo $tpl->_ENGINE_parse_body($error);
            writelogs("ERROR: group {$num} from organization \"{$group->ou}\" is different from requested organization \"{$_GET["ou"]}\"", __FUNCTION__, __FILE__);
            return null;
        }
    }
    $text_disbaled = "{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}";
    $user = new usersMenus();
    $user->LoadModulesEnabled();
    $sock = new sockets();
    $SambaEnabled = $sock->GET_INFO("SambaEnabled");
    if (!is_numeric($SambaEnabled)) {
        $SambaEnabled = 1;
    }
    if ($SambaEnabled == 0) {
        $user->SAMBA_INSTALLED = false;
    }
    $SAMBA_GROUP = Paragraphe('64-group-samba-grey.png', '{MK_SAMBA_GROUP}', $text_disbaled, '');
    $mailing_list = Paragraphe('64-mailinglist-grey.png', "{mailing_list}", "{$text_disbaled}");
    //$hash=$ldap->GroupDatas($num);
    $members = count($group->members);
    if ($user->POSTFIX_INSTALLED == true) {
        $mailing_list_count = $group->CountMailingListes();
        $js = "javascript:Loadjs('domains.edit.group.php?LoadMailingList-js={$_GET['ou']}')";
        $mailing_list = Paragraphe('64-mailinglist.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}", "{$js}");
    }
    if ($user->DANSGUARDIAN_INSTALLED == true) {
        $DANSGUARDIAN = Paragraphe('icon-chevallier-564.png', '{dansguardian_rules}', '{dansguardian_rules_text}', "javascript:DansGuardianRules({$num})");
        //
    }
    $automount = Paragraphe('folder-64-automount.png', '{shared_folders}', '{shared_folders_text}', "javascript:Loadjs('SharedFolders.groups.php?gpid={$num}')");
    if ($user->cyrus_imapd_installed) {
        $sieve_auto = Paragraphe('64-learning.png', '{sieve_auto_script}', '{sieve_auto_script_text}', "javascript:Loadjs('{$page}?sieve-js={$num}')");
    }
    if ($user->SAMBA_INSTALLED) {
        $COMPUTERS = Paragraphe('computers-64.png', '{computers}', '{computers_text}', "javascript:LoadComputerGroup({$num})");
        $SAMBA_GROUP = Paragraphe('64-group-samba.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}', "javascript:Change_group_settings({$num})");
        $LOGON_SCRIPT = Paragraphe('script-64.png', '{LOGON_SCRIPT}', '{LOGON_SCRIPT_TEXT}', "javascript:Loadjs('domains.edit.group.login.script.php?gpid={$num}')");
    }
    if ($DANSGUARDIAN == null) {
        $DANSGUARDIAN = Paragraphe('icon-chevallier-564-grey.png', '{dansguardian_rules}', $text_disbaled, '');
    }
    if ($automount == null) {
        $automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', $text_disbaled, '');
    }
    if ($COMPUTERS == null) {
        $COMPUTERS = Paragraphe('computers-64-grey.png', '{computers}', $text_disbaled, '');
    }
    if (!$user->cyrus_imapd_installed) {
        if ($user->SAMBA_INSTALLED) {
            $sieve_auto = $LOGON_SCRIPT;
            $LOGON_SCRIPT = null;
        }
    }
    $RENAME_GROUP = Paragraphe('group_rename-64.png', '{GROUP_RENAME}', '{GROUP_RENAME_TEXT}', "javascript:Loadjs('domains.edit.group.rename.php?group-id={$num}&ou={$_GET["ou"]}')");
    $OPTIONS_DEFAULT_PASSWORD = Paragraphe('64-key.png', '{group_default_password}', '{group_default_password_text}', "javascript:YahooWin('400','{$page}?default_password=yes&gpid={$num}')");
    $PRIVILEGES = Paragraphe('members-priv-64.png', '{privileges}', '{privileges_text}', "javascript:GroupPrivileges({$num})");
    $ou_encoded = base64_encode($_GET["ou"]);
    $delete_group = imgtootltip("32-cancel.png", "{delete}::{$group->groupName}", "Loadjs('domains.delete.group.php?gpid={$num}')");
    $quotaDisk = Paragraphe("rename-disk-64.png", '{disk_user_quota}', '{disk_group_quota_text}', "javascript:Loadjs('domains.edit.user.quota.php?uid=@{$group->group_id}&ou={$group->ou}&userid=@{$group->group_id}')", null, 210, 'font-size:12px;font-weight:bold');
    $quotaDisk_disabled = Paragraphe("rename-disk-64-grey.png", '{disk_user_quota}', '{disk_group_quota_text}');
    if (!$user->QUOTA_INSTALLED) {
        $quotaDisk = $quotaDisk_disabled;
    }
    if ($user->EnableManageUsersTroughActiveDirectory) {
        $SAMBA_GROUP = Paragraphe('64-group-samba-64.png', '{MK_SAMBA_GROUP}', '{MK_SAMBA_GROUP_text}');
        $mailing_list = Paragraphe('64-mailinglist-grey.png', "({$mailing_list_count}) {mailing_list}", "{mailing_list_text}");
        $automount = Paragraphe('folder-64-automount-grey.png', '{shared_folders}', '{shared_folders_text}');
        $DANSGUARDIAN = null;
        $PRIVILEGES = Paragraphe('members-priv-64-grey.png', '{privileges}', '{privileges_text}');
        $delete_group = null;
    }
    $GroupSettingsID = null;
    if (isset($_GET["GroupSettingsID"])) {
        $GroupSettingsID = $_GET["GroupSettingsID"];
    }
    $html_tab1 = "\n\t\n\t<div style='width:98%' class=form>\n\t<table>\n\t<tr>\n\t<td valign='top'>{$PRIVILEGES}</td>\n\t<td valign='top'>{$COMPUTERS}</td>\n\t<td valign='top'>{$SAMBA_GROUP}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'>{$mailing_list}</td>\n\t<td valign='top'>{$automount}</td>\n\t<td valign='top'></td>\n\t</tr>\n\t</table></div>";
    $html_tab2 = "<div style='width:98%' class=form>\t<table>\n\t<tr>\n\t<td valign='top'>&nbsp;</td>\n\t<td valign='top'>&nbsp;</td>\n\t<td valign='top'>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'>&nbsp;</td>\n\t<td valign='top'>&nbsp;</td>\n\t<td valign='top'>&nbsp;</td>\n\t</tr>\n\t</table></div>";
    $html_tab3 = "<div style='width:98%' class=form>\t\n\t<table>\n\t\t<tr>\n\t\t\t<td valign='top'>{$DANSGUARDIAN}</td>\n\t\t\t<td valign='top'>&nbsp;</td>\n\t\t\t<td valign='top'>&nbsp;</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'>&nbsp;</td>\n\t\t\t<td valign='top'>&nbsp;</td>\n\t\t\t<td valign='top'>&nbsp;</td>\n\t\t</tr>\n\t</table></div>";
    $t[] = $RENAME_GROUP;
    $t[] = $OPTIONS_DEFAULT_PASSWORD;
    $t[] = $sieve_auto;
    $t[] = $LOGON_SCRIPT;
    $t[] = $quotaDisk;
    $html_tab4 = "<div style='width:98%' class=form><table>" . CompileTr3($t) . "</table></div>";
    if ($_GET["tab"] == 'asav') {
        $html_tab1 = $html_tab2;
    }
    if ($_GET["tab"] == 'proxy') {
        $html_tab1 = $html_tab3;
    }
    if ($_GET["tab"] == 'options') {
        $html_tab1 = $html_tab4;
    }
    $html = $html_tab1;
    $tpl = new templates();
    $group_description = $tpl->_ENGINE_parse_body("{group_description}");
    $barre_principale = "\n\t<input type='hidden' id='group_delete_text' value='{group_delete_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=3%><div style='height:1px;border-bottom:1px solid #CCCCCC;width:100%;float:right'>&nbsp;</div></td>\n\t\t<td width=1% nowrap><H5 style='border-bottom:0px'>{group}&nbsp;&nbsp;&laquo;&nbsp;{$group->groupName}&nbsp;&raquo;</h5></td>\n\t\t<td><div style='height:1px;border-bottom:1px solid #CCCCCC;width:100%;float:right'>&nbsp;</div></td>\n\t\t<td width=1%>{$delete_group}</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'><div style='margin-top:-5px;padding-right:50px'>\n\t\t\t<a href=\"javascript:blur();\" OnClick=\"ChangeGroupDescription()\" \n\t\t\tstyle='font-size:11px;text-decoration:underline;font-style:italic'>{$group->description}</a></div></td>\n\t</tr>\n\t</table>\n\t\n\t<script>\n\t\tfunction ChangeGroupDescription(){\n\t\t\tYahooWin5('360','{$page}?ChangeGroupDescription=yes&gpid={$groupID}&ou={$ou_conn}','{$group->groupName}::{$group_description}');\n\t\t\n\t\t}\n\t\t\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body("{$barre_principale}{$tab}{$html}");
}
Exemple #28
0
function popup()
{
    $artica = new artica_general();
    $tpl = new templates();
    $page = CurrentPageName();
    if (preg_match('#(.+?):(.*)#', $artica->MysqlAdminAccount, $re)) {
        $rootm = $re[1];
        $pwd = $re[2];
    }
    //$p=Paragraphe('folder-64-backup.png','{mysql_database}','{mysql_database_text}',"javascript:Loadjs('mysql.index.php')",null);
    //$i=Buildicon64('DEF_ICO_MYSQL_PWD');
    $j = Buildicon64('DEF_ICO_MYSQL_CLUSTER');
    $browse = Buildicon64("DEF_ICO_MYSQL_BROWSE");
    $changep = Buildicon64("DEF_ICO_MYSQL_USER");
    $mysqlrepair = Paragraphe('mysql-repair-64.png', '{mysql_repair}', '{mysql_repair_text}', "javascript:Loadjs('mysql.repair.php')", null);
    $mysqlcheck = Paragraphe('compile-database-64.png', '{mysql_defrag}', '{mysql_defrag_text}', "javascript:Loadjs('mysql.optimize.php')", null);
    $mysqlRoot = Paragraphe('members-priv-64.png', '{chgroot_password}', '{change_root_password_text}', "javascript:Loadjs('mysql.password.php?root=yes')", null);
    //YahooWin(400,'artica.performances.php?main_config_mysql=yes');
    //$mysqlperformances=Paragraphe('mysql-execute-64.png','{mysql_database}','{mysql_performance_level_text}',"javascript:YahooWin(400,'artica.performances.php?main_config_mysql=yes');",null);
    $mysqlperformances = Paragraphe('folder-64-backup.png', '{mysql_database}', '{mysql_performance_level_text}', "javascript:Loadjs('mysql.settings.php');", null);
    $mysql_benchmark = Paragraphe('mysql-benchmark-64.png', '{mysql_benchmark}', '{mysql_benchmark_text}', "javascript:YahooWin3(400,'artica.performances.php?MysqlTestsPerfs=yes','{mysql_benchmark}');", null);
    //$mysql_audit=Paragraphe('mysql-audit-64.png','{mysql_audit}','{mysql_audit_text}',"javascript:YahooWin3(600,'artica.settings.php?mysql-audit=yes');",null);
    $movefolder = Paragraphe('folder-64.png', '{storage_directory}', '{change_mysql_directory_text}', "javascript:YahooWin3(405,'{$page}?mysql-dir=yes','{storage_directory}');", null);
    $mysql_appliance = Paragraphe("www-web-search-64.png", "{statistics_appliance}", "{statistics_appliance_text}", "javascript:Loadjs('statistics.appliance.php')");
    $tmpfile = Paragraphe("bg_memory-64.png", "{mysql_tmp_mem}", "{mysql_tmp_mem_text}", "javascript:Loadjs('system.mysql.tmpdir.php')");
    $tr[] = $p;
    $tr[] = $tmpfile;
    $tr[] = $mysqlcheck;
    $tr[] = $mysqlrepair;
    //$tr[]=$mysqlperformances;
    $tr[] = $i;
    $tr[] = $mysqlRoot;
    $tr[] = $changep;
    $tr[] = $browse;
    $tr[] = $movefolder;
    $tr[] = $j;
    $tr[] = $mysql_benchmark;
    $tr[] = $mysql_audit;
    $tr[] = $mysql_appliance;
    $table = CompileTr3($tr);
    $t = time();
    $html = "\n<center>\n<div style='width:100%'>\n<table style='width:99%' class=form>\n<tr>\n<td valign='top' width=1%><div id='mysql-status' style='width:300px'></div></td>\n<td valign='top' width=99%><div id='{$t}' style='font-size:26px;margin-bottom:20px'></div>\n\t{$table}\n\t</td>\n\t</tr>\n</table>\n\t\n\t</div>\n</center>\n\t<script>\n\tLoadAjax('mysql-status','{$page}?mysql-status=yes');\n\tLoadAjax('{$t}','{$page}?text-status=yes');\n\t</script>\n\t\n\t";
    $tpl = new templates();
    $datas = $tpl->_ENGINE_parse_body($html, "postfix.plugins.php");
    echo $datas;
}
function help(){
	
	$tr[]=Paragraphe("youtube-play-64.png", "Video",
			"Proxy PAC: Dynamic Proxy PAC feature (Howto)","http://youtu.be/6H1XMZIK-S8",null,250);
		
	$tr[]=Paragraphe("youtube-play-64.png", "Video",
			"Web Proxy Auto-Discovery Protocol (WPAD) ",
			"http://www.youtube.com/watch?v=iLxZZNFomdg&list=PL6GqpiBEyv4q1GqpV5QbdYWbQdyxlWKGW&index=5",null,250);
	

	
	echo "<center style='width:80%'>".CompileTr3($tr)."</center>";	
	
}
Exemple #30
0
function form_tabs()
{
    if (!isset($_GET["form"])) {
        $_GET["form"] = "form1";
    }
    $page = CurrentPageName();
    $users = new usersMenus();
    $array["form1"] = '{page} 1';
    $array["form2"] = '{page} 2';
    $tpl = new templates();
    if ($users->roundcube_intversion > 29) {
        $main = base64_encode("MAIN_INSTANCE");
        $sieve = Paragraphe("filter-64.png", '{plugin_sieve}', "{plugin_sieve_text}", "javascript:Loadjs('{$page}?plugins-sieve=yes')");
        $calendar = Paragraphe("calendar-64.png", '{plugin_calendar}', "{plugin_calendar_text}", "javascript:Loadjs('{$page}?plugins-calendar=yes')");
        $globaladdressBook = Paragraphe("addressbook-64.png", "{global_addressbook}", "{global_addressbook_explain}", "javascript:Loadjs('roundcube.globaladdressbook.php?www={$main}')");
    }
    $form1 = Paragraphe("domain-main-64.png", "{webserver_parameters}", "{webserver_parameters_text}", "javascript:Loadjs('{$page}?form1=yes')");
    $form2 = Paragraphe("parameters-64.png", "{roundcube_parameters}", "{roundcube_parameters_text}", "javascript:Loadjs('{$page}?form2=yes')");
    $Hacks = Paragraphe("Firewall-Secure-64.png", "Anti-Hacks", "{AntiHacks_roundcube_text}", "javascript:Loadjs('roundcube.hacks.php')");
    $tr[] = $form1;
    $tr[] = $form2;
    $tr[] = $globaladdressBook;
    $tr[] = $sieve;
    $tr[] = $calendar;
    $tr[] = $Hacks;
    $html = CompileTr3($tr);
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}