function tabs()
{
    $html = GET_CACHED(__FILE__, __FUNCTION__, $_GET["newinterface"], TRUE);
    if ($html != null) {
        echo $html;
    }
    $page = CurrentPageName();
    $users = new usersMenus();
    $array["popup-main"] = "{BUILD_OPENVPN_CLIENT_CONFIG}";
    $array["help"] = "{help}";
    $font = "font-size:18px";
    $newinterface = "&newinterface=yes";
    while (list($num, $ligne) = each($array)) {
        if ($num == "OPENVPN_SCHEDULE_RUN") {
            $tab[] = "<li><a href=\"index.openvpn.schedule.php?popup=yes\"><span style='{$font}'>{$ligne}</span></a></li>\n";
            continue;
        }
        $tab[] = "<li><a href=\"{$page}?{$num}=yes{$newinterface}\"><span style='{$font}'>{$ligne}</span></a></li>\n";
    }
    $tpl = new templates();
    $html = build_artica_tabs($tab, "main_openvpn_builclientconfig");
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
Esempio n. 2
0
function menus()
{
    include_once 'ressources/class.templates.inc';
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return null;
    }
    $users = new usersMenus();
    if (!$users->AsSystemAdministrator) {
        $html = "\n\t\t<input type='hidden' id='isanuser' name ='isanuser' value='1'>\n\t\t<center><H2 style='color:red'>{logoff}</H2></center>\n\t\t";
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body($html);
        exit;
    }
    $sock = new sockets();
    $AllowShutDownByInterface = $sock->GET_INFO('AllowShutDownByInterface');
    $DisableRebootOrShutDown = $sock->GET_INFO('DisableRebootOrShutDown');
    if ($AllowShutDownByInterface == 1) {
        $AllowShutDownByInterface_tr = "\n\t\t<td align='center'>\n\t\t\t" . imgtootltip('shutdown-computer-64.png', '{shutdown}', "Loadjs('logoff.php?shutdown-js=yes')") . "\n\t\t</td>\t\t\n\t\t";
    }
    $reboot = imgtootltip('reboot-computer-64.png', '{restart_computer}', 'RestartComputer()');
    if ($DisableRebootOrShutDown == 1) {
        $reboot = imgtootltip('reboot-computer-64-grey.png', '{restart_computer}');
        if ($AllowShutDownByInterface_tr != null) {
            $AllowShutDownByInterface_tr = "<td align='center'>" . imgtootltip('shutdown-computer-64-grey.png', '{shutdown}') . "</td>";
        }
    }
    $html = "\n\t<input type='hidden' id='shutdown_computer_text' value='{shutdown_computer_text}'>\n\t<input type='hidden' id='restart_computer_text' value='{restart_computer_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='center'>\n\t\t\t" . imgtootltip('64-disconnect.png', '{logoff}', "MyHref('logoff.php')") . "\n\t\t</td>\t\t\n\t\t<td align='center'>\n\t\t\t{$reboot}\n\t\t</td>\n\t\t{$AllowShutDownByInterface_tr}\t\t\n\t</tr>\n\t</table>\n\t";
    $tpl = new templates();
    $page = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $page);
    echo $page;
}
Esempio n. 3
0
function refresh_service_status()
{
    if (!$GLOBALS["VERBOSE"]) {
        if (GET_CACHED(__FILE__, __FUNCTION__, md5($_GET["refresh-service-status"]), false, 1)) {
            return;
        }
    }
    $refresh["C-ICAP"] = "APP_C_ICAP";
    if (preg_match("#SERVICE-STATUS-ROUND-(.+)#", $_GET["refresh-service-status"], $re)) {
        $tpl = new templates();
        $key = $re[1];
        if ($GLOBALS["VERBOSE"]) {
            echo "Prod: {$key}\n<br>";
        }
        $content = GetIniContent($key);
        if ($content == null) {
            if (!is_file("ressources/logs/global.status.ini")) {
                return;
            }
            $bsini = new Bs_IniHandler("ressources/logs/global.status.ini");
        } else {
            $bsini = new Bs_IniHandler();
            $bsini->loadString($content);
        }
        if ($bsini->_params[$key]["service_name"] == null) {
            return null;
        }
        $prod = $bsini->_params[$key]["service_name"];
        $status = DAEMON_STATUS_ROUND($key, $bsini);
        $html = $tpl->_ENGINE_parse_body($status);
        SET_CACHED(__FILE__, __FUNCTION__, md5($_GET["refresh-service-status"]), $html);
        echo $html;
    }
}
Esempio n. 4
0
function tabs()
{
    if (GET_CACHED(__FILE__, __FUNCTION__)) {
        return;
    }
    $squid = new squidbee();
    $tpl = new templates();
    $users = new usersMenus();
    $page = CurrentPageName();
    $sock = new sockets();
    $array["popup"] = '{parameters}';
    $array["schedules"] = '{schedules}';
    $array["events"] = '{events}';
    $fontsize = 18;
    $t = time();
    while (list($num, $ligne) = each($array)) {
        if ($num == "schedules") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"schedules.php?ForceTaskType=69\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        if ($num == "events") {
            $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"cyrus.watchdog-events.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}={$t}\" style='font-size:{$fontsize}'><span>{$ligne}</span></a></li>\n");
    }
    $html = build_artica_tabs($html, 'main_cyrus_backup');
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
Esempio n. 5
0
function popup()
{
    $page = CurrentPageName();
    $html = "<div class=explain>{smtpd_sasl_exceptions_networks_text}<br>{smtpd_sasl_exceptions_networks_explain}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<div id='smtpd_sasl_exceptions_networks_list'></div>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t<div id='smtpd_sasl_exceptions_toolbox'></div>\n\t\t\t\n\t\t</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\tLoadAjax('smtpd_sasl_exceptions_networks_list','{$page}?popup-list=yes');\n\t\tLoadAjax('smtpd_sasl_exceptions_toolbox','{$page}?popup-toolbox=yes');\n\t</script>\n\t";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
Esempio n. 6
0
function page()
{
    $html = "\n\n\n\n<script>\n\tLoadAjax('middle','squid.users.quicklinks.php');\n\tChangeHTMLTitleUserSquidPerform();\n\tRemoveSearchEnginePerform();\n</script>\n\n\n";
    $tpl = new template_users($title, $html, $_SESSION, 0, 0, 0, $cfg);
    error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
    $html = $tpl->web_page;
    $html = str_replace("admin.tabs.php", "squid.users.admin.tabs.php", $html);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
    return;
}
Esempio n. 7
0
function popup()
{
    if (GET_CACHED(__FILE__, __FUNCTION__)) {
        return;
    }
    $html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<img src='img/change-mysql-128.png'>\n\t\t</td>\n\t\t<td valign='top'><div class=explain>{MYSQL_PASSWORD_USER_TEXT}</div>\n\t\t\t<table style='width:99.5%' class=form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend nowrap>{username}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_text('username', null, "font-size:14px;padding:3px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend>{password}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_password('password', null, "font-size:14px;padding:3px;width:120px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t\t\t<hr>" . button("{change}", "ChangeMysqlPassword()") . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\t\t\n\t\t</td>\n\t</tr>\n\t</table><hr>\n\t<div id='mysqldivForLogs' style='height:250px;overflow:auto'></div>\n\t";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html, "mysql.index.php");
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
function page()
{
    $sock = new sockets();
    $EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
    $MalwarePatrolDatabasesCount = $sock->getFrameWork("cmd.php?MalwarePatrolDatabasesCount=yes");
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return;
    }
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $users = new usersMenus();
    $websitesnums = $q->COUNT_ROWS("visited_sites");
    $websitesnums = numberFormat($websitesnums, 0, "", " ");
    $sql = "DELETE FROM categorize WHERE LENGTH(pattern)=0";
    $q->QUERY_SQL($sql);
    $export = $q->COUNT_ROWS("categorize");
    $export = numberFormat($export, 0, "", " ");
    $categories = $q->COUNT_CATEGORIES();
    $categories = numberFormat($categories, 0, "", " ");
    $tablescat = $q->LIST_TABLES_CATEGORIES();
    $tablescatNUM = numberFormat(count($tablescat), 0, "", " ");
    $q = new mysql_squid_builder();
    $requests = $q->EVENTS_SUM();
    $requests = numberFormat($requests, 0, "", " ");
    $PhishingURIS = $q->COUNT_ROWS("uris_phishing");
    $PhishingURIS = numberFormat($PhishingURIS, 0, "", " ");
    $MalwaresURIS = $q->COUNT_ROWS("uris_malwares");
    $MalwaresURIS = numberFormat($MalwaresURIS, 0, "", " ");
    $Computers = $q->COUNT_ROWS("webfilters_nodes");
    $Computers = numberFormat($Computers, 0, "", " ");
    $DAYSNumbers = $q->COUNT_ROWS("tables_day");
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT SUM(totalsize) as tsize FROM tables_day"));
    $totalsize = FormatBytes($ligne["tsize"] / 1024);
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT AVG(cache_perfs) as pourc FROM tables_day"));
    $pref = round($ligne["pourc"]);
    $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT COUNT(sitename) as tcount FROM visited_sites WHERE LENGTH(category)=0"));
    $websitesnumsNot = numberFormat($ligne["tcount"], 0, "", " ");
    $CachePermformance = $q->CachePerfHour();
    if ($CachePermformance > -1) {
        $color = "#E01313";
        if ($CachePermformance > 20) {
            $color = "#6DBB6A";
        }
        $cachePerfText = "\n\t\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b style='color:{$color}'>{$CachePermformance}%</b> {cache_performance} ({now})</td>\n\t\t</tr>\n\t\t";
    }
    $mouse = "OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
    $submenu = "\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$totalsize}</b> {downloaded_flow}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$pref}%</b> {cache_performance}</td>\n\t</tr>\n\t";
    $main_table = "\n\t<table style='width:98%' class=form>\n\t<tr><td style='font-size:16px'>{statistics}::{status}</td></tr>\n\t{$cachePerfText}\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;><b>{$DAYSNumbers}</b> {daysOfStatistics}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$requests}</b> {requests}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$Computers}</b> {computers}</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$websitesnums}</b> {visited_websites}</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$categories}</b> {websites_categorized}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$PhishingURIS}</b> {phishing_uris}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$MalwaresURIS}</b> {viruses_uris}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$MalwarePatrolDatabasesCount}</b> Malware Patrol</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$websitesnumsNot}</b> {not_categorized}</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td valign='top'  style='font-size:14px;'><b>{$tablescatNUM}</b> {categories}</td>\n\t</tr>\n\t</table>\t\n";
    $main_table = $tpl->_ENGINE_parse_body($main_table);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $main_table);
    echo $main_table;
}
Esempio n. 9
0
function popup()
{
    $t = $_GET["t"];
    $title = "MYSQL_PASSWORD_USER_TEXT";
    $username = Field_text("username-{$t}", null, "font-size:14px;padding:3px");
    $page = CurrentPageName();
    if (isset($_GET["root"])) {
        $title = "change_root_password_text";
        $username = "******";
    }
    $html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<img src='img/change-mysql-128.png'>\n\t\t</td>\n\t\t<td valign='top'><div class=explain style='font-size:14px'>{{$title}}</div>\n\t\t\t<table style='width:99.5%' class=form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend nowrap style='font-size:14px'>{username}:</td>\n\t\t\t\t\t<td valign='top'>{$username}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend style='font-size:14px'>{password}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_password("password-{$t}", null, "font-size:14px;padding:3px;width:120px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t\t\t<hr>" . button("{apply}", "ChangeMysqlPassword()", 16) . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\t\t\n\t\t</td>\n\t</tr>\n\t</table>\n\t<div id='mysql-connect-status' style='min-height:50px'></div>\n\t\n\t\n\t<div id='mysqldivForLogs' style='height:250px;overflow:auto;min-height:250px'></div>\n\t\n\t<script>\n\t\tfunction MySQLConnectStatus(){\n\t\t\tif(YahooWin3Open()){\n\t\t\t\tLoadAjaxTiny('mysql-connect-status','{$page}?mysql-connect-status=yes');\n\t\t\t}\n\t\t}\n\t\t\n\t\tsetTimeout('MySQLConnectStatus()', 3000);\n\t</script>\n\t\n\t";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html, "mysql.index.php");
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
Esempio n. 10
0
function popup()
{
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return;
    }
    $ldap = new clladp();
    $usersnumber = $ldap->COUNT_DE_USERS();
    $ldap->ldap_close();
    $tpl = new templates();
    $users = $tpl->_ENGINE_parse_body("<i>{this_server_store}:&nbsp;<strong>{$usersnumber}</strong>&nbsp;{users}</i>");
    $page = CurrentPageName();
    $html = "<H1>{organizations}</H1>\n<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='{add_new_organisation_text}'>\n<div style='font-size:16px;text-align:left;padding-bottom:5px;border-bottom:1px solid #CCCCCC'>{about_organization}</div>\n<div style='font-size:11px;text-align:right;padding-top:5px;'><span id='countdeusers'>{$users}</span></div>\n<div id='orgs' style='width:720px;height:350px;overflow:auto'></div>\n\n";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
Esempio n. 11
0
function quicklinks_postfix()
{
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return;
    }
    $page = CurrentPageName();
    $tpl = new templates();
    $sock = new sockets();
    $users = new usersMenus();
    $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
    $InnoDBFilePerTableAsk = $sock->GET_INFO("InnoDBFilePerTableAsk");
    if (!is_numeric($EnablePostfixMultiInstance)) {
        $EnablePostfixMultiInstance = 0;
    }
    if (!is_numeric($InnoDBFilePerTableAsk)) {
        $InnoDBFilePerTableAsk = 0;
    }
    $the_specified_module_is_not_installed = $tpl->javascript_parse_text("{the_specified_module_is_not_installed}");
    if ($users->POSTFIX_INSTALLED) {
        if ($users->AsPostfixAdministrator) {
            $tr[] = paragrapheWin("messaging-server-white-64.png", "{APP_POSTFIX}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_postfix')");
            $tr[] = paragrapheWin("64-transport-white.png", "{transport_table}", "AnimateDiv('BodyContent');\n\t\t\t\tLoadAjax('BodyContent','postfix.transport.table.php?hostname=master')");
        }
    }
    if ($users->POSTFIX_INSTALLED) {
        if ($users->ZARAFA_INSTALLED) {
            if ($users->AsMailBoxAdministrator) {
                $tr[] = paragrapheWin("zarafa-white-64.png", "{APP_ZARAFA}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_zarafa')");
                $tr[] = paragrapheWin("webmail-64.png", "WebMail", "AnimateDiv('BodyContent');LoadAjax('BodyContent','zarafa.webmail.php')");
                $tr[] = paragrapheWin("push-mail-64.png", "{smartphones}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','zarafa.zpush.php')");
            }
        }
    }
    //$postfix_multiple=$tpl->_ENGINE_parse_body(quicklinks_paragraphe("postfix-multi-48.png", "multiple_instances",null, "QuickLinkPostfixMulti()"));
    if ($users->POSTFIX_INSTALLED) {
        if ($users->cyrus_imapd_installed) {
            if ($users->AsMailBoxAdministrator) {
                $tr[] = paragrapheWin("bg-cyrus-white-64.png", "{mailboxes}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','cyrus.index.php?popup-index=yes');");
                if ($users->roundcube_installed) {
                    $tr[] = paragrapheWin("webmail-white-64.png", "WebMail", "Loadjs('roundcube.index.php?script=yes&in-front-ajax=yes&newinterface=yes');");
                } else {
                    $tr[] = paragrapheWin("64-deny-white.png", "WebMail", "alert('{$the_specified_module_is_not_installed}');");
                }
                $tr[] = paragrapheWin("database-check-64-white.png", "{backup}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','cyrus.backup.php?tabs=yes');");
            }
        }
        if ($users->AsQuarantineAdministrator) {
            $tr[] = paragrapheWin("quarantine-64-white.png", "{quarantine}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','domains.quarantine.php?SuperAdmin=yes');");
        }
    }
    //certified-64-white.png
    $opendkim = Paragraphe('certified-64.png', '{APP_OPENDKIM}', '{APP_OPENDKIM_TEXT}', "javascript:Loadjs('opendkim.php?mail=master')", null, 210, null, 0, true);
    $tr[] = paragrapheWin("folder-64-backup-white.png", "{backupemail_behavior}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','postfix.backup.fly.php?hostname=master')");
    $tr[] = paragrapheWin("certified-64-white.png", "{APP_OPENDKIM}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','opendkim.php?popup=yes&mail=master')");
    //$backup=Paragraphe('folder-64-backup-grey.png','{backupemail_behavior}','{feature_disabled}',"",null,210,100);
    //$backup=Paragraphe('folder-64-backup.png','{backupemail_behavior}','{backupemail_behavior_text}',"javascript:Loadjs('$page?script=backup')",null,210,100,0,true);
    if ($EnablePostfixMultiInstance == 0) {
        $postfix_multiple = null;
    }
    if (!$users->cyrus_imapd_installed) {
        $cyrus = null;
    }
    //$tr[]=$postfix_multiple;
    if ($users->POSTFIX_INSTALLED) {
        if ($users->AsPostfixAdministrator) {
            $tr[] = paragrapheWin("queue-64-white.png", "{queue_management}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_queue')");
            $tr[] = paragrapheWin("whitelisting-white-64.png", "{white list}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_whitelist')");
            if ($users->MAILMAN_INSTALLED) {
                if (!$users->LIGHT_INSTALL) {
                    $tr[] = paragrapheWin("mailing-white-64.png", "mailman", "Loadjs('mailman.php?script=yes')");
                }
            }
            $tr[] = paragrapheWin("fetch-white-64.png", "{APP_FETCHMAIL}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','fetchmail.index.php?quicklinks=yes');");
        }
    }
    $html = $tpl->_ENGINE_parse_body(CompileTr5_win($tr, true));
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
Esempio n. 12
0
function main_services(){
	$sock=new sockets();
	$users=new usersMenus();
	$users->LoadModulesEnabled();
	if($users->DOTCLEAR_INSTALLED){
		$dotclear=Paragraphe('64-dotclear.png','{APP_DOTCLEAR}','{APP_DOTCLEAR_TEXT}','dotclear.index.php','APP_DOTCLEAR_TEXT');
	}
	
	if($users->OBM2_INSTALLED){
		$obm2=Paragraphe('64-obm2.png','{APP_OBM2}','{APP_OBM2_TEXT}',"javascript:Loadjs('obm2.index.php')",'APP_OBM2_TEXT');
	}
		
	
	if($users->openldap_installed){
		$addressbook=Paragraphe("64-addressbook.png","{remote_addressbook}","{remote_addressbook_text}","javascript:AdressBookPopup();");
	}
	
	if($users->XAPIAN_PHP_INSTALLED){
		$instantsearch=Paragraphe("64-xapian.png","{InstantSearch}","{InstantSearch_text}","javascript:Loadjs('instantsearch.php');");
	}

	if($users->OPENGOO_INSTALLED){
		$opengoo=Paragraphe("64-opengoo.png","{APP_OPENGOO}","{APP_OPENGOO_TEXT}","javascript:Loadjs('opengoo.php');");
	}		

	if($users->phpldapadmin_installed){
		$phpldapadmin=Paragraphe('phpldap-admin-64.png','{APP_PHPLDAPADMIN}','{APP_PHPLDAPADMIN_TEXT}',"javascript:s_PopUpFull('ldap/index.php',1024,800);","{artica_events_text}");
	}	
	
	if($users->MLDONKEY_INSTALLED){
		$mldonkey=Paragraphe('64-emule.png','{APP_MLDONKEY}','{APP_MLDONKEY_TEXT}',"javascript:Loadjs('mldonkey.php')","");
	}
	
	if($users->KAV4FS_INSTALLED){
		$kav4fs=Paragraphe('bigkav-64.png','{APP_KAV4FS}','{APP_KAV4FS_TEXT}',"javascript:Loadjs('kav4fs.php')","");
		
		
	}
	
	$massmailing=Paragraphe('mass-mailing-64.png','{email_campaigns}','{APP_MASSMAILING_ENABLE_TEXT}',"javascript:Loadjs('system.enable.massmailing.php');","{APP_MASSMAILING_ENABLE_TEXT}");
	$userautofill=Paragraphe('member-add-64.png','{auto_account}','{auto_account_text}',"javascript:Loadjs('auto-account.php?script=yes')",'auto_account_text');
	$installed_applis=Paragraphe('folder-applications-64.jpg','{installed_applications}','{installed_applications_text}','system.applications.php','installed_applications_text');
	$add_remove=Paragraphe('add-remove-64.png','{application_setup}','{application_setup_txt}',"javascript:Loadjs('setup.index.php?js=yes')");
	$services=Paragraphe('folder-servicesm-64.jpg','{manage_services}','{manage_services_text}','javascript:Loadjs("admin.index.services.status.php?js=yes");','manage_services_text');

	if($users->BACKUPPC_INSTALLED){
		$backuppc=Paragraphe('backuppc-64.png','{APP_BACKUPPC}','{APP_BACKUPPC_TEXT}',"javascript:Loadjs('backup-pc.index.php');",'APP_BACKUPPC_TEXT');
	}
	if($users->OCSI_INSTALLED){
		$ocs=Paragraphe('64-ocs.png','{APP_OCSI}','{APP_OCSI_TEXT}',"javascript:Loadjs('ocs.ng.php');",'APP_OCSI_TEXT');
	}	
	
	if($users->OCS_LNX_AGENT_INSTALLED){
		$ocsAgent=Paragraphe('64-ocs.png','{APP_OCSI_LINUX_CLIENT}','{APP_OCSI_LINUX_CLIENT_TEXT}',"javascript:Loadjs('ocs.agent.php');",'APP_OCSI_LINUX_CLIENT_TEXT');
	}
	
	if($users->APP_AUDITD_INSTALLED){
		$auditd=Paragraphe('folder-watch-64.png','{APP_AUDITD}','{APP_AUDITD_TEXT}',"javascript:Loadjs('auditd.php');",'APP_AUDITD_TEXT');
		
	}
	
	if($users->DROPBOX_INSTALLED){
		$dropbox=Paragraphe('dropbox-64.png','{APP_DROPBOX}','{APP_DROPBOX_TEXT}',"javascript:Loadjs('samba.dropbox.php')",null,210,null,0,false);
	}

	if($users->APACHE_INSTALLED){
		$apache=Paragraphe('apache-groupeware-64.png','{APP_GROUPWARE_APACHE}','{APP_GROUPWARE_APACHE_TEXT}',"javascript:Loadjs('apache-groupware.php')",null,210,null,0,false);
	}
	
	if($users->CLAMD_INSTALLED){
		$clamav=Paragraphe('clamav-64.png','{clamav_protect}','{clamav_protect_disable_text}',"javascript:Loadjs('clamav.enable.php')",null,210,null,0,false);
	}	
	
	if($users->APACHE_INSTALLED){
		if($users->PUREFTP_INSTALLED){
			$free_web=Paragraphe('free-web-64.png','{free_web_servers}','{free_web_servers_text}',"javascript:Loadjs('freeweb.php')",null,210,null,0,false);
		}
	}
	$APP_SABNZBDPLUS=Paragraphe('sab2_64-grey.png','{APP_SABNZBDPLUS}','{APP_SABNZBDPLUS_TEXT}',"",null,210,null,0,false);
	if($users->APP_SABNZBDPLUS_INSTALLED){
		$APP_SABNZBDPLUS=Paragraphe('sab2_64.png','{APP_SABNZBDPLUS}','{APP_SABNZBDPLUS_TEXT}',"javascript:Loadjs('sabnzbdplus.php')",null,210,null,0,false);
		
	}
	
		
	
	
	$metaconsole=Paragraphe("artica-meta-64.png","{meta-console}","{meta-console-text}","javascript:Loadjs('artica.meta.php')",null,210,null,0,false);
	
	
	if($users->LXC_INSTALLED){
		$LXC=Paragraphe('64-computer-alias.png','{APP_LXC}','{APP_LXC_TEXT}',"javascript:Loadjs('lxc.index.php')",null,210,null,0,false);
	}
	
	
	if($users->KASPERSKY_WEB_APPLIANCE){
		
		$addressbook=null;
		$userautofill=null;
		$massmailing=null;
		$APP_SABNZBDPLUS=null;
	}
	
	//ApacheGroupware

	
	$tr[]=$add_remove;
	$tr[]=$services;
	$tr[]=$metaconsole;
	$tr[]=$backuppc;
	$tr[]=$auditd;
	$tr[]=$phpldapadmin;
	$tr[]=$apache;
	$tr[]=$free_web;
	$tr[]=$clamav;
	$tr[]=$mldonkey;
	$tr[]=$massmailing;
	$tr[]=$addressbook;
	$tr[]=$userautofill;
	$tr[]=$obm2;
	$tr[]=$dotclear;
	$tr[]=$kav4fs;
	$tr[]=$ocs;
	$tr[]=$ocsAgent;
	$tr[]=$dropbox;
	$tr[]=$LXC;
	$tr[]=$APP_SABNZBDPLUS;


	
$tables[]="<table style='width:100%'><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==3){$t=0;$tables[]="</tr><tr>";}
		
}
if($t<3){
	for($i=0;$i<=$t;$i++){
		$tables[]="<td valign='top'>&nbsp;</td>";				
	}
}
				
$tables[]="</table>";	

$html=implode("\n",$tables);	
	
	$tpl=new templates();
	$html=$tpl->_ENGINE_parse_body($html);
	SET_CACHED(__FILE__,__FUNCTION__,null,$html);
	echo $html;
}
Esempio n. 13
0
function menus()
{
    include_once 'ressources/class.templates.inc';
    $tpl = new templates();
    $restart_computer_and_defrag_warn = $tpl->javascript_parse_text("{restart_computer_and_defrag_warn}");
    $page = CurrentPageName();
    $users = new usersMenus();
    if (!$users->AsSystemAdministrator) {
        $html = "\n\t\t<input type='hidden' id='isanuser' name ='isanuser' value='1'>\n\t\t<center><H2 style='color:#d32d2d'>{logoff}</H2></center>\n\t\t";
        $tpl = new templates();
        echo $tpl->_ENGINE_parse_body($html);
        exit;
    }
    $sock = new sockets();
    $AllowShutDownByInterface = $sock->GET_INFO('AllowShutDownByInterface');
    $DisableRebootOrShutDown = $sock->GET_INFO('DisableRebootOrShutDown');
    if ($AllowShutDownByInterface == 1) {
        $AllowShutDownByInterface_tr = "\n\t\t<td align='center'>\n\t\t\t" . imgtootltip('shutdown-computer-64.png', '{shutdown}', "Loadjs('logoff.php?shutdown-js=yes')") . "\n\t\t</td>\t\t\n\t\t";
    }
    $reboot = imgtootltip('reboot-computer-64.png', '{restart_computer}', 'RestartComputer()');
    $rebootfsck = "<td align='center'>" . imgtootltip('reboot-computer-defrag-64.png', '{restart_computer_and_defrag}', 'RestartDefragComputer()') . "</td>";
    if ($DisableRebootOrShutDown == 1) {
        $reboot = imgtootltip('reboot-computer-64-grey.png', '{restart_computer}');
        $rebootfsck = "<td align='center'>" . imgtootltip('reboot-computer-defrag-64-off.png', '{restart_computer_and_defrag}', 'blur()') . "</td>";
        if ($AllowShutDownByInterface_tr != null) {
            $AllowShutDownByInterface_tr = "<td align='center'>" . imgtootltip('shutdown-computer-64-grey.png', '{shutdown}') . "</td>";
        }
    }
    $html = "\n\t<input type='hidden' id='shutdown_computer_text' value='{shutdown_computer_text}'>\n\t<input type='hidden' id='restart_computer_text' value='{restart_computer_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='center'>" . imgtootltip('64-disconnect.png', '{logoff}', "MyHref('logoff.php')") . "</td>\t\t\n\t\t<td align='center'>{$reboot}</td>\n\t\t{$rebootfsck}\n\t\t{$AllowShutDownByInterface_tr}\t\t\n\t</tr>\n\t</table>\n\t<script>\n\tvar x_RestartDefragComputer=function(obj){\n      var tempvalue=obj.responseText;\n      if(tempvalue.length>3){alert(tempvalue);}\n      window.location ='{$page}';\n      \n     }\t\n\t\n\t\n\tfunction RestartDefragComputer(){\n\t\t\tif(confirm('{$restart_computer_and_defrag_warn}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('defrag','yes');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_RestartDefragComputer);\n\t\t\t}\n\t\t}\n\t</script>\n\t";
    $tpl = new templates();
    $page = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $page);
    echo $page;
}
Esempio n. 14
0
function external()
{
    $page = CurrentPageName();
    $tpl = new template_users();
    $t = time();
    $html = "\r\n\t<div id='{$t}'></div>\r\n\t<script>\r\n\t\tLoadAjax('{$t}','{$page}?bypopup=yes');\r\n\t</script>";
    $tpl = new template_users("{events}::{APP_SQUID}", $html, 0, 1, 1);
    $tpl->_BuildPopUpNew($html, "{events}::{APP_SQUID}");
    $html = $tpl->web_page;
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
function left_menus_actions()
{
    $cachePage = dirname(__FILE__) . "/ressources/logs/web/" . basename(__FILE__) . "." . __FUNCTION__;
    if (!$GLOBALS["AS_ROOT"]) {
        if (is_file($cachePage)) {
            $users = new usersMenus();
            if ($users->AsSystemAdministrator) {
                $data = @file_get_contents($cachePage);
                if (strlen($data) > 45) {
                    $tpl = new templates();
                    echo $tpl->_ENGINE_parse_body($data) . wizards();
                    return;
                }
            }
        }
    }
    $users = new usersMenus();
    if (!$GLOBALS["AS_ROOT"]) {
        if ($GLOBALS["VERBOSE"]) {
            echo __LINE__ . " Saving {$cachePage}\n";
        }
        if (GET_CACHED(__FILE__, __FUNCTION__, null, false, 1)) {
            return;
        }
        if (internal_load() > 1.2) {
            if (GET_CACHED(__FILE__, __FUNCTION__)) {
                return;
            }
        }
    } else {
        $users->AsPostfixAdministrator = true;
        $users->AsAnAdministratorGeneric = true;
        $users->AsWebStatisticsAdministrator = true;
        $users->AsPostfixAdministrator = true;
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Saving {$cachePage}\n";
    }
    $sock = new sockets();
    $tpl = new templates();
    $f = array();
    $EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
    if (!is_numeric($EnableRemoteStatisticsAppliance)) {
        $EnableRemoteStatisticsAppliance = 0;
    }
    $EnableWebProxyStatsAppliance = $sock->GET_INFO("EnableWebProxyStatsAppliance");
    if ($EnableWebProxyStatsAppliance == 1) {
        $users->SQUID_INSTALLED = true;
    }
    $OnlySMTP = false;
    if ($users->SMTP_APPLIANCE) {
        $OnlySMTP = true;
    }
    if ($users->KASPERSKY_SMTP_APPLIANCE) {
        $OnlySMTP = true;
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Saving {$cachePage}\n";
    }
    if (!$users->PROXYTINY_APPLIANCE) {
        if ($users->SQUID_INSTALLED) {
            if ($users->AsWebStatisticsAdministrator) {
                $SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
                if (!is_numeric($SQUIDEnable)) {
                    $SQUIDEnable = 1;
                }
                if ($EnableRemoteStatisticsAppliance == 0) {
                    if ($SQUIDEnable == 1) {
                        if (!$users->SQUID_REVERSE_APPLIANCE) {
                            $f[] = left_menus_format("CATEGORIZE_A_WEBSITE", "32-categories-add.png", "Loadjs('squid.visited.php?add-www=yes')", "ADDWEBSITE_PROXY_EXPLAIN");
                            $f[] = left_menus_format("whitelist_website", "domain-whitelist-w32.png", "Loadjs('squid.urlrewriteaccessdeny.php?add-www-js=yes')", "whitelist_website_explain");
                            $f[] = left_menus_format("test_categories", "loupe-32.png", "Loadjs('squid.category.tests.php')", "squid_test_categories_explain");
                        }
                    }
                }
            }
        }
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Saving {$cachePage}\n";
    }
    if ($users->POSTFIX_INSTALLED) {
        $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
        if (!is_numeric($EnablePostfixMultiInstance)) {
            $EnablePostfixMultiInstance = 0;
        }
        if ($EnablePostfixMultiInstance == 1) {
            if ($users->AsPostfixAdministrator) {
                $f[] = left_menus_format("NEW_SMTP_INSTANCE", "32-network-server-add.png", "Loadjs('postfix.multiple.instances.wizard.php')");
            }
        }
        $EnableAmavisDaemon = trim($sock->GET_INFO("EnableAmavisDaemon", true));
        if (!is_numeric($EnableAmavisDaemon)) {
            $EnableAmavisDaemon = 0;
        }
        if ($users->AsAnAdministratorGeneric) {
            $f[] = left_menus_format("check_recipients", "check-32.png", "only:Loadjs('postfix.debug.mx.php')");
            if ($users->AMAVIS_INSTALLED) {
                if ($users->spamassassin_installed) {
                    if ($EnableAmavisDaemon == 1) {
                        $f[] = left_menus_format("SPAMASSASSIN_RULES", "script-32.png", "only:Loadjs('spamassassin.rules.php?byid=admin-start_page')");
                    }
                }
            }
        }
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Saving {$cachePage} users->POWER_DNS_INSTALLED = {$users->POWER_DNS_INSTALLED} users->AsAnAdministratorGeneric={$users->AsAnAdministratorGeneric}\n";
    }
    if ($users->AsAnAdministratorGeneric) {
        if (!$OnlySMTP) {
            $f[] = left_menus_format("explorer", "explorer-32.png", "only:Loadjs('tree.php');", 'SHARE_FOLDER_TEXT');
        }
        if (!$OnlySMTP) {
            $f[] = left_menus_format("ADD_COMPUTER", "computer-32-add.png", "only:YahooUser(1051,'domains.edit.user.php?userid=newcomputer\$&ajaxmode=yes','New computer');", "ADD_COMPUTER_TEXT");
        }
        if ($users->POWER_DNS_INSTALLED) {
            $DisablePowerDnsManagement = $sock->GET_INFO("DisablePowerDnsManagement");
            $EnablePDNS = $sock->GET_INFO("EnablePDNS");
            $PowerDNSMySQLEngine = $sock->GET_INFO("PowerDNSMySQLEngine");
            if (!is_numeric($EnablePDNS)) {
                $EnablePDNS = 0;
            }
            if (!is_numeric($PowerDNSMySQLEngine)) {
                $PowerDNSMySQLEngine = 1;
            }
            if (!is_numeric($DisablePowerDnsManagement)) {
                $DisablePowerDnsManagement = 0;
            }
            if ($DisablePowerDnsManagement == 0) {
                if ($EnablePDNS == 1) {
                    $f[] = left_menus_format("new_dns_entry", "filter-add-32.png", "only:YahooWin5('550','pdns.mysql.php?item-id=0&t={$t}','PowerDNS');", "new_dns_entry");
                }
            }
        }
    }
    if ($GLOBALS["VERBOSE"]) {
        echo __LINE__ . " Saving {$cachePage} -> " . count($f) . "\n";
    }
    if (count($f) > 0) {
        $html = "\n\t\t<hr>\n\t\t<div style='font-size:16px;color:white;margin-top:8px;text-transform:capitalize;'>{actions}:</div>\n\t\t<table style='width:99%' class=form><tbody>\n\t\t" . @implode("\n", $f) . "\n\t\t</tbody>\n\t\t</table;\n\t\t";
        if ($GLOBALS["VERBOSE"]) {
            echo __LINE__ . " AS ROOT={$GLOBALS["AS_ROOT"]}\n";
        }
        if ($GLOBALS["AS_ROOT"]) {
            if ($GLOBALS["VERBOSE"]) {
                echo __LINE__ . " Saving {$cachePage}\n";
            }
            @mkdir(dirname($cachePage), 0777, true);
            @file_put_contents($cachePage, $html);
            @chmod($cachePage, 0777);
            return;
        }
        if ($GLOBALS["VERBOSE"]) {
            echo __LINE__ . " Saving {$cachePage} ->" . count($f) . "\n";
        }
        $html = $tpl->_ENGINE_parse_body($html);
        SET_CACHED(__FILE__, __FUNCTION__, null, $html);
        echo $html;
    }
}
Esempio n. 16
0
function popup_status(){
	
	if(GET_CACHED(__FILE__, __FUNCTION__)){return;}
	
	$page=CurrentPageName();
	$tpl=new templates();	
	$sock=new sockets();
	$datas=base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
	
	$ini=new Bs_IniHandler();
	$ini->loadString($datas);
	$users=new usersMenus();
	if($users->YAFFAS_INSTALLED){
		$yaffas="<div class=text-info>{APP_YAFFAS_TEXT}</div>";
	}
	if($ini->_params["APP_ZARAFA"]["master_version"]==null){unset($ini->_params["APP_ZARAFA"]["master_version"]);}
	
	if(!isset($ini->_params["APP_ZARAFA"]["master_version"])){
		
		$datas=base64_decode($sock->getFrameWork('cmd.php?zarafa-status=yes'));
		$ini->loadString($datas);
	}
	

	
	
	$html="
	<table style='width:100%'>
	<tr>
		<td valign='top' width=1%><span id='zarafa-box'></span></td>
		<td valign='top' width=99%>
			<H3 style='font-size:22px;font-weight:bold'>{APP_ZARAFA} v{$ini->_params["APP_ZARAFA"]["master_version"]}</H3>
			<div id='zarafa-error' style='color:#FB0808;font-weight:bold;font-size:14px'></div>
			<div class=text-info style='font-size:14px'>{APP_ZARAFA_TEXT}</div>$yaffas
			<table style='width:100%'>
			<tr>
				<td width=1%><img src='img/arrow-right-24.png'></td>
				<td nowrap>
					<a href=\"javascript:blur();\" 
					OnClick=\"javascript:Loadjs('postfix.events.new.php?js-zarafa=yes');\" 
					style='font-size:13px;text-decoration:underline'>{APP_ZARAFA}:{events}</a>
				</td>
			</tr>
			<tr>
				<td width=1%><img src='img/arrow-right-24.png'></td>
				<td nowrap><a href=\"javascript:blur();\" 
				OnClick=\"javascript:Loadjs('zarafa.audit.logs.php');\" 
				style='font-size:13px;text-decoration:underline'>{APP_ZARAFA}:{audit}</a></td>
			</tr>	
			<tr>
				<td width=1%><span id='mysql-dedie-img'></span></td>
				<td nowrap><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('ZarafaDB.wizard.php')\" id='mysql-dedie-text' style='font-size:13px;text-decoration:underline'></a></td>
			</tr>				
		</table>
		</td>
	</tr>
	</table>
	<div id='zarafa-services-status' style='width:100%;'></div>
	
	
	<script>
		LoadAjax('zarafa-services-status','$page?services-status=yes');
		LoadAjaxTiny('zarafa-box','$page?zarafa-box=yes');
	</script>
	";
	$html=$tpl->_ENGINE_parse_body($html);
	SET_CACHED(__FILE__, __FUNCTION__, null, $html);
	echo $html;
}
function main_graphs()
{
    if (GET_CACHED(__FILE__, __FUNCTION__)) {
        return;
    }
    $page = CurrentPageName();
    $t = time() . rand(0, time());
    $html = "\n\t<div id='{$t}-1' style='width:990px;height:450px'></div>\n\t\n\t<div id='{$t}-2' style='width:990px;height:450px'></div>\n\t\n\t<div id='{$t}-3' style='width:990px;height:450px'></div>\n\t<script>\n\t\tAnimateDiv('{$t}-1');\n\t\tAnimateDiv('{$t}-2');\n\t\tAnimateDiv('{$t}-3');\n\t\t\n\t\tfunction F1{$t}(){\n\t\t\tLoadjs('{$page}?graph1=yes&container={$t}-1');\n\t\t}\n\t\t\n\t\tfunction F2{$t}(){\n\t\t\tLoadjs('{$page}?graph2=yes&container={$t}-2');\n\t\t}\t\t\n\n\t\t\n\t\tfunction F3{$t}(){\n\t\t\tLoadjs('{$page}?graph3=yes&container={$t}-3');\n\t\t}\t\t\n\t\tsetTimeout('F1{$t}()',500);\n\t\tsetTimeout('F2{$t}()',1000);\n\t\tsetTimeout('F3{$t}()',1500);\n\t\t\n\t</script>\n\t";
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
Esempio n. 18
0
function main_switch()
{
    cookies_main();
    //if(GET_CACHED(__FILE__,__FUNCTION__,$_GET["main"])){return;}
    $array["transport_settings"] = '{transport_settings}';
    $array["security_settings"] = '{security_settings}';
    $array["tweaks"] = '{tweaks}';
    if (isset($_GET["ajaxmenu"])) {
        echo "<div id='main_config_postfix'>";
    }
    switch ($_GET["main"]) {
        case "transport_settings":
            $html = Transport_rules_redirect();
            //SET_CACHED(__FILE__,__FUNCTION__,$_GET["main"],$html);
            echo $html;
            break;
        case "transport_settings_rules":
            $html = Transport_rules();
            //SET_CACHED(__FILE__,__FUNCTION__,$_GET["main"],$html);
            echo $html;
            break;
        case "security_settings":
            $html = security();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "security2":
            $html = security2();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "tweaks":
            $html = tweaks();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "filters":
            $html = filters_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "mailbox":
            $html = mailbox_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "status":
            $html = status_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        case "filters-connect":
            $html = filters_connect_section();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
        default:
            $html = Transport_rules();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
            echo $html;
            break;
    }
    if (isset($_GET["ajaxmenu"])) {
        echo "</div>";
    }
}
Esempio n. 19
0
function rttm_logs()
{
    if (!isset($_GET["force-refresh"])) {
        if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
            return null;
        }
    }
    $sql = __sql_domain($_GET["ou"]);
    $q = new mysql();
    $results = $q->QUERY_SQL($sql, "artica_events");
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $count = $count + 1;
        $tr = $tr . format_line($ligne);
    }
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body("\n\t<hr><div style='text-align:right;padding:4px'>" . imgtootltip("refresh-24.png", "{refresh}", "RefreshRTMMTableForce()") . "</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<th>&nbsp;</th>\n\t\t<th>{date}</th>\n\t\t<th>{from}</th>\n\t\t<th>&nbsp;</th>\n\t\t<th>{to}</th>\n\t\t<th>{status}</th>\n\t</tr>\n\t{$tr}</table>");
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
Esempio n. 20
0
function main_config(){

$page=CurrentPageName();
$sock=new sockets();
	$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)));
	
	$users=new usersMenus();
	$your_network=Paragraphe('folder-realyrules-64.png','{your_network}','{your_network_text}',"javascript:Loadjs('squid.popups.php?script=network')");
	$APP_SQUIDKERAUTH=Paragraphe('wink3_bg.png','{APP_SQUIDKERAUTH}','{APP_SQUIDKERAUTH_TEXT}',"javascript:Loadjs('squid.adker.php')");
	
	$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')");
	$applysquid=applysquid_icon();

	
	$visible_hostname=Paragraphe('64-work-station-linux.png','{visible_hostname}','{visible_hostname_intro}',"javascript:Loadjs('squid.popups.php?script=visible_hostname')");
	$your_network_loupe=Paragraphe('64-win-nic-loupe.png','{your_network_loupe}','{your_network_loupe_text}',"javascript:Loadjs('$page?squid-net-loupe-js=yes')");
	$transparent_mode=Paragraphe('relayhost.png','{transparent_mode}','{transparent_mode_text}',"javascript:Loadjs('$page?squid-transparent-js=yes')");
	$enable_squid_service=Paragraphe('shutdown-green-64.png','{enable_squid_service}','{enable_squid_service_text}',"javascript:EnableDisableSQUID()");
	
	$squid_advanced_parameters=Paragraphe('64-settings.png','{squid_advanced_parameters}','{squid_advanced_parameters_text}',"javascript:Loadjs('squid.advParameters.php')");
	
	$squid_reverse_proxy=Paragraphe('squid-reverse-64.png','{squid_reverse_proxy}','{squid_reverse_proxy_text}',"javascript:Loadjs('squid.reverse.proxy.php')");

    $proxy_pac=Paragraphe('user-script-64.png','{proxy_pac}','{proxy_pac_text}',"javascript:Loadjs('squid.proxy.pac.php')");
    $proxy_pac_rules=Paragraphe('proxy-pac-rules-64.png','{proxy_pac_rules}','{proxy_pac_text}',"javascript:Loadjs('squid.proxy.pac.rules.php')");
    
    
    
    
    
   
    $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}',"");
    }
    $performances_tuning=Paragraphe('performance-tuning-64.png','{tune_squid_performances}','{tune_squid_performances_text}',"javascript:Loadjs('squid.perfs.php')");
    $squid_conf=Paragraphe('script-view-64.png','{configuration_file}','{display_generated_configuration_file}',"javascript:Loadjs('squid.conf.php')");
    
 	$SquidEnableProxyPac=$sock->GET_INFO("SquidEnableProxyPac");	
 	
 	
 	
 	
	if($users->SARG_INSTALLED){
		$sarg=Paragraphe('sarg-logo.png','{APP_SARG}','{display_product_events}',"javascript:Loadjs('sarg.php')","{display_product_events}");
	}
	
	if(!$users->MSKTUTIL_INSTALLED){
		$APP_SQUIDKERAUTH=Paragraphe('wink3_bg-grey.png','{APP_SQUIDKERAUTH}','{APP_SQUIDKERAUTH_TEXT}',"javascript:Loadjs('squid.adker.php')");
	}
	if(strlen($users->squid_kerb_auth_path)<2){
		$APP_SQUIDKERAUTH=Paragraphe('wink3_bg-grey.png','{APP_SQUIDKERAUTH}','{APP_SQUIDKERAUTH_TEXT}',"javascript:Loadjs('squid.adker.php')");
	}
	
	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;
	}
	
	if($users->SQUID_REVERSE_APPLIANCE){
		$listen_port=null;
		$proxy_pac=null;
		$proxy_pac_rules=null;
		$SquidEnableProxyPac=0;
		$squid_accl_websites=null;
	}
	
	
if($sock->GET_INFO("SquidEnableProxyPac")<>1){$proxy_pac_rules=null;}	
	
	
	$tr=array();
	$tr[]=$applysquid;
	$tr[]=$your_network;
	$tr[]=$APP_SQUIDKERAUTH;
	$tr[]=$your_network_loupe;
	$tr[]=$listen_port;
	$tr[]=$dns_servers;
	$tr[]=$proxy_pac;
	$tr[]=$proxy_pac_rules;
	$tr[]=$visible_hostname;
	$tr[]=$transparent_mode;
	$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= $tpl->_ENGINE_parse_body($html,'squid.index.php');
SET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__,$html);
echo $html;
	
}
Esempio n. 21
0
function saveFilter()
{
    SET_CACHED("squid_filter", "filter", "settings", serialize($_GET));
}
function tabs()
{
    if (GET_CACHED(__FILE__, __FUNCTION__)) {
        return;
    }
    $squid = new squidbee();
    $tpl = new templates();
    $users = new usersMenus();
    $page = CurrentPageName();
    $sock = new sockets();
    $array["table"] = "{your_categories}";
    $fontsize = 18;
    $t = time();
    while (list($num, $ligne) = each($array)) {
        if ($num == "table") {
            $html[] = $tpl->_ENGINE_parse_body("<li style='font-size:{$fontsize}px'>\n\t\t\t<a href=\"{$page}?categories=yes\" style='font-size:{$fontsize}'><span>{$ligne}</span></a></li>\n");
            continue;
        }
        $html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}={$t}\" style='font-size:{$fontsize}'><span>{$ligne}</span></a></li>\n");
    }
    $html = build_artica_tabs($html, 'main_perso_categories', 1024);
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    echo $html;
}
Esempio n. 23
0
function status_computer()
{
    if (!$GLOBALS["AS_ROOT"]) {
        if (!$GLOBALS["VERBOSE"]) {
            if (is_file("/usr/share/artica-postfix/ressources/logs/web/admin.index.memory.html")) {
                $data = @file_get_contents("/usr/share/artica-postfix/ressources/logs/web/admin.index.memory.html");
                if (strlen($data) > 45) {
                    $tpl = new templates();
                    echo $tpl->_ENGINE_parse_body($data);
                    return;
                }
            }
        }
    }
    $page = CurrentPageName();
    $sock = new sockets();
    $newfrontend = false;
    if (isset($_GET["newfrontend"])) {
        $newfrontend = true;
    }
    if (!$GLOBALS["VERBOSE"]) {
        if (!$GLOBALS["AS_ROOT"]) {
            if (GET_CACHED(__FILE__, __FUNCTION__, "time", false, 3)) {
                return;
            }
            if (internal_load() > 1.2) {
                if (GET_CACHED(__FILE__, __FUNCTION__)) {
                    return;
                }
            }
        }
    }
    if ($newfrontend) {
        $ajaxadd = "&newfrontend=yes";
    }
    include_once dirname(__FILE__) . "/ressources/class.os.system.tools.inc";
    $html = "<div id='admin-index-status-mysql'></div>\n\t<script>LoadAjaxTiny('admin-index-status-mysql','{$page}?admin-index-status-mysql=yes');</script>";
    $os = new os_system();
    if ($GLOBALS["VERBOSE"]) {
        echo "os->html_Memory_usage()<br>\n";
    }
    $html = $html . RoundedLightGrey($os->html_Memory_usage()) . "<br>\n\t<script>\n\tif(document.getElementById('left_status')){\n\t\tvar content=document.getElementById('left_status').innerHTML;\n\t\tif(content.length<5){\n\t\t\tLoadAjax('left_status','{$page}?status=left{$ajaxadd}',true);\n\t\t}\n\t}\n\t</script>\n\t\n\t\n\t";
    if ($GLOBALS["AS_ROOT"]) {
        include_once dirname(__FILE__) . '/framework/class.unix.inc';
        include_once dirname(__FILE__) . '/framework/frame.class.inc';
        @file_put_contents("/usr/share/artica-postfix/ressources/logs/web/admin.index.memory.html", $html);
        return;
    }
    SET_CACHED(__FILE__, __FUNCTION__, $html);
    SET_CACHED(__FILE__, __FUNCTION__, "time", $html);
    echo $html;
}
Esempio n. 24
0
function popup(){
	
//if(GET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__)){return;}

	$ldap=new clladp();
	$usersnumber=$ldap->COUNT_DE_USERS();
	$ldap->ldap_close();
	$tpl=new templates();
	$users=$tpl->_ENGINE_parse_body("<i>{this_server_store}:&nbsp;<strong>$usersnumber</strong>&nbsp;{users}</i>");

$page=CurrentPageName();	
$html="<div style='background-image:url(/img/home-bg-256.png);background-repeat:no-repeat;background-position:top right'><div style='font-size:18px'>{my_organizations}</div>
<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='{add_new_organisation_text}'>
<div class=explain>
{about_organization}
<div style='font-size:14px;text-align:right;padding-top:5px;padding-right:40px'><span id='countdeusers'>$users</span></div>
</div>

<div id='orgs' style='width:720px;height:350px;overflow:auto'></div>
</div>
";	

$tpl=new templates();
$html=$tpl->_ENGINE_parse_body($html);
SET_CACHED(__FILE__,__FUNCTION__,__FUNCTION__,$html);
echo $html;
}
Esempio n. 25
0
function js_mysql_interface()
{
    if (GET_CACHED(__FILE__, __FUNCTION__, null)) {
        return;
    }
    $content = MYSQL_MAX_EVENTS();
    $tpl = new templates();
    SET_CACHED(__FILE__, __FUNCTION__, null, $content);
    echo $tpl->_ENGINE_parse_body($content);
}
Esempio n. 26
0
function AJAX_USER_TAB()
{
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $sock = new sockets();
    $SambaEnabled = $sock->GET_INFO("SambaEnabled");
    if (!is_numeric($SambaEnabled)) {
        $SambaEnabled = 1;
    }
    $sock = new sockets();
    $as_connected_user = false;
    if (isset($_GET["userid"])) {
        if (substr($_GET["userid"], strlen($_GET["userid"]) - 1, 1) == '$') {
            $html = AJAX_COMPUTER_TAB();
            SET_CACHED(__FILE__, __FUNCTION__, $_GET["userid"], $html);
            return $html;
        }
    }
    if ($_GET["userid"] == $_SESSION["uid"]) {
        $as_connected_user = true;
    }
    $page = CurrentPageName();
    if ($_GET["hostname"] == null) {
        $hostname = $users->hostname;
        $_GET["hostname"] = $hostname;
    } else {
        $hostname = $_GET["hostname"];
    }
    $arr["account"] = "{account}";
    $userid = $_GET["userid"];
    if ($users->POSTFIX_INSTALLED) {
        $arr["email"] = "{messaging}";
    }
    if ($users->cyrus_imapd_installed) {
        $arr["mailbox"] = "{mailbox}";
    }
    if ($users->POSTFIX_INSTALLED) {
        $arr["aliases"] = "{aliases}";
    }
    if ($users->ZARAFA_INSTALLED) {
        $ZarafaEnableServer = $sock->GET_INFO("ZarafaEnableServer");
        if (!is_numeric($ZarafaEnableServer)) {
            $ZarafaEnableServer = 1;
        }
        if ($ZarafaEnableServer == 1) {
            $arr["mailbox"] = "{mailbox}";
        }
    }
    $arr["groups"] = "{user_tab_groups}";
    writelogs("PUREFTP_INSTALLED={$users->PUREFTP_INSTALLED}", __FUNCTION__, __FILE__, __LINE__);
    if ($users->PUREFTP_INSTALLED) {
        if ($sock->GET_INFO("PureFtpdEnabled") == 1) {
            $arr["ftp_access"] = "{ftp_access}";
        }
    }
    if ($users->SAMBA_INSTALLED) {
        if ($SambaEnabled == 1) {
            $arr["file_share"] = "{file_share}";
            if ($users->CRYPTSETUP_INSTALLED) {
                $arr["safebox"] = "{coffrefort}";
            }
        }
    }
    if ($as_connected_user) {
        unset($arr["groups"]);
        unset($arr["file_share"]);
        unset($arr["ftp_access"]);
        unset($arr["mailbox"]);
        $arr["privs"] = "{privileges}";
    } else {
    }
    $arr["computer"] = "{computer}";
    if ($users->PROXYTINY_APPLIANCE) {
        $users->SQUID_APPLIANCE = true;
    }
    if ($users->WEBSTATS_APPLIANCE) {
        $users->SQUID_APPLIANCE = true;
    }
    if ($users->KASPERSKY_WEB_APPLIANCE) {
        $users->SQUID_APPLIANCE = true;
    }
    if ($users->SQUID_APPLIANCE) {
        unset($arr["file_share"]);
        unset($arr["safebox"]);
        unset($arr["aliases"]);
        unset($arr["computer"]);
    }
    if ($users->EnableManageUsersTroughActiveDirectory) {
        unset($arr["file_share"]);
        unset($arr["ftp_access"]);
        unset($arr["computer"]);
        unset($arr["privs"]);
        unset($arr["safebox"]);
        unset($arr["aliases"]);
    }
    $itemsnum = count($arr);
    if ($itemsnum < 7) {
        $styleText = "style='font-size:18px'";
    }
    if ($itemsnum == 7) {
        $styleText = "style='font-size:16px'";
    }
    if ($itemsnum == 8) {
        $styleText = "style='font-size:14px'";
    }
    if ($itemsnum >= 9) {
        $styleText = "style='font-size:14px'";
    }
    while (list($num, $ligne) = each($arr)) {
        if ($num == "computer") {
            $toolbox[] = "<li><a href=\"domains.user.computer.php?userid={$userid}&dn={$_GET["dn"]}\"><span {$styleText}>{$ligne}</span></a></li>";
            continue;
        }
        $useridenc = urlencode($userid);
        $dnenc = urlencode($_GET["dn"]);
        $toolbox[] = "<li><a href=\"domains.edit.user.php?userid={$useridenc}&ajaxmode=yes&section={$num}&dn={$dnenc}\"><span {$styleText}>{$ligne}</span></a></li>";
        $html = $html . "<li><a href=\"javascript:LoadUserSectionAjax('{$num}','{$_GET["dn"]}')\" {$class}><span {$styleText}>{$ligne}</span></a></li>\n";
    }
    $html = "<div id=tablist style='margin-top:3px;margin-bottom:3px;'>{$html}</div>";
    $tpl = new templates();
    $html = build_artica_tabs($toolbox, "container-users-tabs");
    $html = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, $_GET["userid"], $html);
    return $html;
}
Esempio n. 27
0
function index()
{
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return;
    }
    $page = CurrentPageName();
    $back = Paragraphe("setup-90-back.png", "{back_system}", "{back_system_text}", "javascript:YahooSetupControlHide();Loadjs('system.index.php?js=yes&load-tab=services')");
    $prefix = "SetupControlCenter";
    $synchro = Paragraphe("software-synchronize-64.png", "{sync_packages}", "{sync_packages_explain}", "javascript:SynSysPackages()");
    $refresh = Paragraphe("64-recycle.png", "{refresh_index_file}", "{refresh_index_file}", "javascript:TestConnection()");
    $additionals = Paragraphe("64-update-settings.png", "{mandatories_packages}", "{mandatories_packages_text}", "javascript:Loadjs('setup-ubuntu.php')");
    //
    $intro = "\n<div class=explain style='font-size:14px'>{setup_index_explain}</div>\t\n<center>\n<table style='width:565px' class=form>\n\t<tbody>\n\t<tr>\n\t<td width=1% valign='top'>\n\t\t<img src='img/software-install-256.png' style='margin-rigth:30px;margin-left:30px'>\n\t</td>\n\t<td valign='top'>\n\t\t\n\t\t{$synchro}\n\t\t{$refresh}\n\t\t{$additionals}\n\t</td>\n\t</tr>\n\t</tbody>\n</table>\n</center>\n<input type='hidden' id='tabnum' name='tbanum' value='{$_GET["main"]}'>\n<script>\n\tsetTimeout(\"{$prefix}Launch()\",300);\n\tvar x_SynSysPackages= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>2){alert(results);}\n\t}\n\t\nfunction SynSysPackages(app){\n    var XHR = new XHRConnection();\n\tXHR.appendData('SynSysPackages','yes');\n\tXHR.sendAndLoad('{$page}', 'GET',x_SynSysPackages);\n\t}\t\n</script>";
    $html = "{$intro}";
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
Esempio n. 28
0
function networks_tabs()
{
    if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
        return;
    }
    $page = CurrentPageName();
    $array["browse-networks"] = "{edit_networks}";
    $fontsize = "font-size:18px;";
    while (list($index, $ligne) = each($array)) {
        $eth = new system_nic($interface);
        $html[] = "<li><a href=\"{$page}?{$index}=yes\" style='{$fontsize}' ><span>{$ligne}</span></a></li>\n";
    }
    $html = build_artica_tabs($html, 'main_networks', 995) . "\n\t\t<script>LeftDesign('256-networks-white-opac20.png');</script>";
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
    echo $html;
}
Esempio n. 29
0
function admin_index()
{
    $newfrontend = false;
    $ajaxadd = null;
    if (isset($_GET["newfrontend"])) {
        $newfrontend = true;
    }
    if ($newfrontend) {
        $ajaxadd = "&newfrontend=yes";
    }
    $t = time();
    $left_status_content = "<center id='wait1'></center>";
    $page = CurrentPageName();
    $html = "\n\t<table style='width:100%;padding:0px;margin:0px'>\n\t<tbody>\n\t<tr>\n\t\t<td valign='top' width='75%'>\n\t\t\t<div id='left_status' style='margin-left:-15px'>\n\t\t\t\t<div id='status-left'></div>\n\t\t\t</div>\n\t\t</td>\n\t\t<td valign='top' width='25%'>\n\t\t\t<div id='right_status' style='margin-left:-5px;margin-top:-5px'>\n\t\t\t\t<center id='wait2'></center>\n\t\t\t</div>\n\t\t\t<script>\n\t\t\t\tAnimateDiv('wait2');\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\t\tfunction ChargeLeftMenus{$t}(){\n\t\t\t\t\tif(document.getElementById('admin-left-infos')){\n\t\t\t\t\t\tvar content=document.getElementById('admin-left-infos').innerHTML;\n\t\t\t\t\t\tif(content.length<50){\n\t\t\t\t\t\t\tLoadAjax('admin-left-infos','admin.index.status-infos.php?t={$t}{$ajaxadd}');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction ChargeLeftMenus2{$t}(){ LoadAjaxTiny('right-status-infos','admin.left.php?part1=yes'); }\n\t\t\t\tfunction ChargeStatusLeft{$t}(){ LoadAjaxTiny('status-left','admin.index.loadvg.php?t={$t}{$ajaxadd}'); }\t\n\t\t\t\tfunction ChargePubCentral{$t}(){ Loadjs('artica.pubs.php'); }\t\t\t\t\n\t\t\t\t\n\t\t\t\tsetTimeout('ChargePubCentral{$t}()',200);\n\t\t\t\tsetTimeout('ChargeStatusLeft{$t}()',800);\n\t\t\t\tsetTimeout('ChargeLeftMenus{$t}()',1300);\n\t\t\t\tsetTimeout('ChargeLeftMenus2{$t}()',5000);\t\t\t\t\n\t\t\t\tLoadAjax('right_status','admin.index.php?status=right&counter=1{$ajaxadd}');\n\t\t\t\t\t\t\n\t\t\t</script>\n\t\t\t\t\t\n\t\t</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t\n\t<div style='text-align:right'>" . imgtootltip('32-refresh.png', "{refresh}", "Loadjs('{$page}?refresh-status-js=yes&nocache=yes')") . "</div>\n\n";
    $tpl = new templates();
    $datas = $tpl->_ENGINE_parse_body($html);
    echo $datas;
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $datas);
}
Esempio n. 30
0
function startpage()
{
    $html = GET_CACHED(__FILE__, __FUNCTION__, $_GET["newinterface"], TRUE);
    if ($html != null) {
        return $html;
    }
    $page = CurrentPageName();
    $users = new usersMenus();
    if (!$users->OPENVPN_INSTALLED) {
        echo FATAL_ERROR_SHOW_128("{OPENVPN_NOT_INSTALLED}");
        return;
    }
    $array["index"] = '{index}';
    //
    $array["server-settings"] = "{service_parameters}";
    $array["clients-scripts"] = "{clients_scripts}";
    $array["additional_routes"] = "{additional_routes}";
    $array["remote-sites"] = "{REMOTE_SITES_VPN}";
    $array["events-session"] = "{sessions}";
    $array["OPENVPN_SCHEDULE_RUN"] = "{OPENVPN_SCHEDULE_RUN}";
    $array["events"] = "{events}";
    $width = 755;
    if (isset($_GET["newinterface"])) {
        $width = "100%";
        $newinterface = "&newinterface=yes";
    }
    $font = "font-size:20px";
    while (list($num, $ligne) = each($array)) {
        if ($num == "OPENVPN_SCHEDULE_RUN") {
            $tab[] = "<li><a href=\"index.openvpn.schedule.php?popup=yes\"><span style='{$font}'>{$ligne}</span></a></li>\n";
            continue;
        }
        if ($num == "clients-scripts") {
            $tab[] = "<li><a href=\"index.openvpn.clients.php\"><span style='{$font}'>{$ligne}</span></a></li>\n";
            continue;
        }
        if ($num == "additional_routes") {
            $tab[] = "<li><a href=\"index.openvpn.routes.php\"><span style='{$font}'>{$ligne}</span></a></li>\n";
            continue;
        }
        if ($num == "remote-sites") {
            $tab[] = "<li><a href=\"openvpn.remotesites.php?infront=yes{$newinterface}\"><span style='{$font}'>{$ligne}</span></a></li>\n";
            continue;
        }
        $tab[] = "<li><a href=\"{$page}?{$num}=yes{$newinterface}\"><span style='{$font}'>{$ligne}</span></a></li>\n";
    }
    $tpl = new templates();
    $html = build_artica_tabs($tab, "main_openvpn_config", 1490);
    $tpl = new templates();
    $html = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, null, $html);
    return $html;
}