Esempio n. 1
0
function popup()
{
    $sock = new sockets();
    $EnableCyrusMasterCluster = $sock->GET_INFO("EnableCyrusMasterCluster");
    $CyrusClusterID = $sock->GET_INFO("CyrusClusterID");
    $EnableCyrusReplicaCluster = $sock->GET_INFO("EnableCyrusReplicaCluster");
    $CyrusClusterPort = $sock->GET_INFO("CyrusClusterPort");
    if ($CyrusClusterPort == null) {
        $CyrusClusterPort = 2005;
    }
    if ($CyrusClusterID == null) {
        $CyrusClusterID = 1;
    }
    if ($EnableCyrusReplicaCluster == 1) {
        echo popup_as_replica();
        exit;
    }
    if ($EnableCyrusMasterCluster) {
        $addreplica = Paragraphe("64-net-server-add.png", "{SET_REPLICA_SERVER}", "{SET_REPLICA_SERVER_TEXT}", "javascript:AddCyrusReplica()");
        $sync = Paragraphe("64-syncmbx.png", "{REPLICATE_YOUR_MAILBOXES}", "{REPLICATE_YOUR_MAILBOXES_TEXT}", "javascript:Loadjs('cyrus.sync.client.php')");
    }
    $rebuild = Buildicon64("DEF_ICO_CYR_REBUILD");
    $help_me = Paragraphe("wizard-mail-64.png", "{HELP_ME_RETRANSLATOR}", "{CYRUS_REPLICA_WIZARD_HELP}", "javascript:Loadjs('wizard.cyrus.cluster.php')");
    $enable = Paragraphe_switch_img('{ENABLE_CYRUS_CLUSTER_MASTER}', '{ENABLE_CYRUS_CLUSTER_MASTER_TEXT}', 'EnableCyrusMasterCluster', $EnableCyrusMasterCluster, "ENABLE_CYRUS_CLUSTER_MASTER_TEXT", 300);
    $form1 = "<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' class=legend>{listen_cluster_port}:</td>\n\t\t<td valign='top'>" . Field_text('CyrusClusterPort', $CyrusClusterPort, 'width:60px') . "</td>\n\t\t<td>&nbsp;</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' class=legend>{uid}:</td>\n\t\t<td valign='top'>" . Field_text('CyrusClusterID', $CyrusClusterID, 'width:20px') . "</td>\n\t\t<td valign='top'>" . help_icon('{CyrusClusterID_TEXT}') . "</td>\n\t</tr>\t\n\t</table>";
    $form = "<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$enable}</td>\n\t</tr>\n\t<tr>\n\t<td valign='top'>{$form1}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' align='right'><hr>\n\t\t" . button("{edit}", "EnableCyrusMasterCluster()") . "\n\t\t\t\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $html = "<H1>{CYRUS_CLUSTER}</H1>\n\t<div id='wizard_zone'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'><img src='img/128-cluster.png'></td>\n\t<td valign='top'>\n\t<p class=caption>{CYRUS_CLUSTER_EXPLAIN}</p>\n\t{$form}\n\t</td>\n\t<td valign='top'>{$addreplica}<br>{$rebuild}<br>{$sync}<br>{$help_me}</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<br>\n\t\n\t\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
    //http://madole.net/pushmail/
}
Esempio n. 2
0
function popup()
{
    $dev = Buildicon64('DEF_ICO_DEVCONTROL');
    $html = "\n\t<H1>{SAMBA_USB_SHARE}</H1>\n\t\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td valign='top' width=1% align='right'>\n\t\t\t\t{$dev}<hr><img src='img/usb-share-128.png'>\n\t\t\t</td>\n\t\t\t<td valign='top' width=99%>\n\t\t\t<p class=caption>{usb_share_explain}</p>\n\t\t\t" . RoundedLightWhite("<div id='usb-list' style='height:200px;width:99%;overflow:auto'></div>") . "\n\t\t</tr>\n\t\t</table>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'fileshares.index.php');
}
function popup()
{
    $list = SHARED_FOLDERS_LIST($_GET["popup"]);
    $gp = new groups($_GET["popup"]);
    $html = "<H1>{shared_folders} {$gp->groupName}</H1>\n\t<p class=caption>{add_shared_folder_text}</p>\n\t<table style='width:100%' class=table_form>\n\t<tr>\n\t\t<td valign='top' class=legend>{path}:</td>\n\t\t<td valign='top'>" . Field_text('SharedPath', null) . "</td>\n\t\t<td valign='top'><input type='button' style='margin:0px' OnClick=\"javascript:Loadjs('SambaBrowse.php?t=&homeDirectory=&no-shares=yes&field=SharedPath&without-start=no')\" value='{browse}...'></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=3 align='right'><input type='button' OnClick=\"javascript:SharedPathAdd();\" value='{add_shared_folder}&nbsp;&raquo;'>\n\t</tr>\n\t</table>\n\t<br>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top' width=1%>" . Paragraphe('64-refresh.png', '{rebuild_shared}', '{rebuild_shared_text}', "javascript:SharedFolderRebuild()") . "\n\t\t<br>\n\t\t" . Buildicon64('DEF_ICO_AUTOFS_RESTART') . "\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t" . RoundedLightWhite("<div style='width:100%;height:200px;overflow:auto' id='SharedDiv'>{$list}</div>") . "\n\t\t</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "domains.edit.group.php");
}
Esempio n. 4
0
function popup()
{
    $page = CurrentPageName();
    $icon = Buildicon64('DEF_ICO_NTPOL_HOWTO');
    $html = "<H1>{NTconfig}</H1>\n<p class=caption>{NTconfig_text}</p>\n<p class=caption>{NTconfig_howto}</p>\n<table style='width:100%'>\n<tr>\n<td valign='top'>\n" . RoundedLightWhite("\n<iframe src='{$page}?iframe=yes' style='width:100%;height:120px;border:0px'></iframe>\n\n") . "</td>\n<td valign='top'>{$icon}</td>\n</tr>\n</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, "fileshares.index.php");
}
Esempio n. 5
0
function MYSQL_NO_CONNECTIONS($q)
{
    $a = Paragraphe("warning64.png", "{ERROR_MYSQL_CONNECTION}", $q->mysql_error);
    $i = Buildicon64('DEF_ICO_MYSQL_PWD');
    $s = Buildicon64("DEF_ICO_MYSQL_USER");
    $html = "<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$a}</td>\n\t\t<td valign='top'>{$i}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'>{$s}</td>\n\t\t<td valign='top'>&nbsp;</td>\n\t</tr>\n\t</table>";
    return $html;
}
Esempio n. 6
0
function external_storage_usb()
{
    $list = external_storage_usb_list();
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "\n\t<input type='hidden' id='browser-computers-list' value='{$_GET["set-field"]}'>\n\t<h1>{use_network_storage}</H1>\n\t<table style='width:99%'>\n\t<tr>\n\t<td valign='top' with=70%>\n\t<p class=caption>{use_network_storage_text}</p>\n\t</td>\n\t<td valign='top'>" . Buildicon64("DEF_ICO_ADDCOMP") . "</td>\n\t</tr>\n\t</table>\n\t<hr>\n\t<div style='width:100%;height:300px;overflow:auto;padding:3px;' id='smblistp'>\n\t\t{$list}\n\t</div>\n\t";
    echo $tpl->_ENGINE_parse_body($html, "dar.index.php");
}
Esempio n. 7
0
function popup()
{
    $page = CurrentPageName();
    $prefix = str_replace('.', '_', $page);
    if ($_GET["computer"] != null) {
        $form = form_connection();
    }
    $browse = Buildicon64('DEF_ICO_BROWSE_COMP');
    $usbbrowse = Buildicon64("DEF_ICO_DEVCONTROL");
    $mount_list = mount_list();
    $html = "<H1>{automount_center}</H1>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>{$usbbrowse}<br>{$browse}</td>\n\t<td valign='top'>\n\t\t<div id='form_add'>{$form}</div>\n\t\t<BR>\n\t\t<div style='text-align:right;margin-top:-25px;margin-bottom:5px'>" . imgtootltip("20-refresh.png", '{refresh}', "{$prefix}Reload()") . "</div>\n\t\t\t" . RoundedLightWhite("<div id='mount-list' style='width:100%;height:200px;overflow:auto'>{$mount_list}</div>") . "\n\t</td>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 8
0
function popup()
{
    $users = new usersMenus();
    if (!$users->winexe_installed) {
        $warn = Paragraphe("64-infos.png", "{APP_WINEXE_NOT_INSTALLED}", "{APP_WINEXE_NOT_INSTALLED_TEXT}", "javascript:Loadjs('setup.index.progress.php?product=APP_WINEXE&start-install=yes');") . "<br>";
    }
    $DEF_ICO_REMOTE_STORAGE = Buildicon64("DEF_ICO_REMOTE_STORAGE");
    $add = Paragraphe("software-task-64.png", "{ADD_NEW_DEPLOY_TASK}", "{ADD_NEW_DEPLOY_TASK_TEXT}", "javascript:AddRemoteTask()");
    $refresh = Paragraphe("64-refresh.png", "{refresh}", "{resfresh_tasks_list}", "javascript:RefreshTaskList()");
    $list = task_list($_GET["uid"]);
    $html = "<H1>{remote_install}::{$_GET["uid"]}</H1>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%>{$warn}{$refresh}<br>{$add}<br>{$DEF_ICO_REMOTE_STORAGE}</td>\n\t<td valign='top'>\n\t\t<p class=caption>{remote_install_text}</p>\n\t\t" . RoundedLightWhite("<div id='tk_list' style='width:100%;height:250px;overflow:auto'>{$list}</div>") . "\n\t</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'storage.center.php');
}
Esempio n. 9
0
function popup_index()
{
    $sock = new sockets();
    $EnablePolicydWeight = $sock->GET_INFO('EnablePolicydWeight');
    $EnablePolicydWeight_field = Paragraphe_switch_img('{EnablePolicydWeight}', '{APP_POLICYD_WEIGHT_EXPLAIN}', 'EnablePolicydWeight', $EnablePolicydWeight, "{enable_disable}", 300);
    //64-cop-acls.png
    //64-cop-rules.png
    $demons_settings = Paragraphe("64-cop-rules.png", "{daemon_settings}", "{daemon_settings_text}", "javascript:PolicydDaemonSettings()");
    $notif = Paragraphe("64-cop-acls-infos.png", "{APP_POLICYD_WEIGHT} {notifications}", "{PolicydDaemonNotifs}", "javascript:PolicydDaemonNotifs()");
    $dnsbl = Paragraphe("64-cop-acls-dnsbl.png", "{DNSBL_settings}", "{DNSBL_settings_text}", "javascript:PolicydDaemonDNSBL()");
    $instant = Buildicon64("DEF_ICO_MAIL_IPABLES");
    $panel = "\t\t\t<table style='width:100%'>\n\t\t\t\t<tr>\n\t\t\t\t<td valign='top'>{$demons_settings}{$notif}{$dnsbl}</td>\n\t\t\t\t<td valign='top'>{$instant}</td>\n\t\t\t\t</tr>\n\t\t\t</table>";
    $panel = RoundedLightWhite($panel);
    $html = "<H1>{APP_POLICYD_WEIGHT}</H1>\n\t<p class=caption>{APP_POLICYD_WEIGHT_TEXT}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<div id='enableplicyweightdiv'>\n\t\t\t{$EnablePolicydWeight_field}\n\t\t\t</div>\n\t\t\t<hr>\n\t\t\t<div style='text-align:right'><input type='button' OnClick=\"javascript:EnablePolicydWeight();\" value='{apply}&nbsp;&raquo;'></div>\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t{$panel}\n\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 10
0
function index_page()
{
    $page = CurrentPageName();
    $sock = new sockets();
    $enable_button = null;
    $wizard = Paragraphe('64-wizard.png', '{OPENVPN_WIZARD}', '{OPENVPN_WIZARD_TEXT}', "javascript:YahooWin3('500','{$page}?wizard=yes','{OPENVPN_WIZARD}')", null, 210, null, 0, false);
    $clients_settings = Paragraphe('global-settings.png', '{OPENVPN_CLIENT_SETTINGS}', '{OPENVPN_CLIENT_SETTINGS_TEXT}', "javascript:OpenVPNClientsSettings()", null, 210, null, 0, false);
    $ncc = Paragraphe('64-win-nic-loupe.png', '{NETWORK_CONTROL_CENTER}', '{NETWORK_CONTROL_CENTER_TEXT}', "javascript:OpenVPNNCC()", null, 210, null, 0, false);
    $server_connect = Paragraphe('server-connect-64.png', '{OPENVPN_SERVER_CONNECT}', '{OPENVPN_SERVER_CONNECT_TEXT}', "javascript:Loadjs('openvpn.servers-connect.php')", null, 210, null, 0, false);
    $artica = Buildicon64("DEF_ICO_OPENVPN_ARTICA_CLIENTS");
    $f[] = $server_connect;
    $f[] = $ncc;
    //$f[]=$artica;
    $q = new mysql();
    $sql = "SELECT ID,enabled,servername,serverport,connexion_name,connexion_type,routes FROM vpnclient WHERE connexion_type=2 and enabled=1 ORDER BY ID DESC";
    $results = $q->QUERY_SQL($sql, "artica_backup");
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $running = $sock->getFrameWork("openvpn.php?is-client-running={$ligne["ID"]}");
        if ($running == "TRUE") {
            $img_running = "folder-network-64.png";
        } else {
            $img_running = "folder-network-64-grey.png";
        }
        if (preg_match("#(.+?):#", $ligne["connexion_name"], $re)) {
            $ligne["connexion_name"] = $re[1];
        }
        $f[] = Paragraphe($img_running, $ligne["connexion_name"], "{manage_your_vpn_client_connection_text}", "javascript:Loadjs('index.openvpn.client.php?ID={$ligne["ID"]}&cname={$ligne["connexion_name"]}')", null, 210, null, 0, false);
    }
    $vpn = new openvpn();
    if (intval($vpn->main_array["GLOBAL"]["ENABLE_SERVER"]) == 0) {
        $enable_button = "<center style='margin:30px'>" . button("{enable_service}", "Loadjs('index.openvpn.enable.progress.php')", 42) . "</center>";
    }
    $status = status(1);
    $html = "\n\t<div style='font-size:30px;margin-bottom:20px'>{APP_OPENVPN_TEXT}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=280px><div id='openvpn-status'></div></td>\n\t<td valign='top'>\n\t<div class=explain style='font-size:22px'>{openvpn_whatis}</div>\n\t<br>\n\t{$enable_button}\n\t</td>\n\t</tr>\n\t</table>\n\t<script>\n\t\tfunction RefreshOpenVPNStatus(){\n\t\t\tLoadAjax('openvpn-status','{$page}?openvpn-status=yes');\n\t\t}\n\t\tRefreshOpenVPNStatus();\n\t</script>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 11
0
function main_config_artica()
{
    //ArticaPerformancesSettings
    $sock = new sockets();
    $users = new usersMenus();
    $page = CurrentPageName();
    $MaxtimeBackupMailSizeCalculate = trim($sock->GET_INFO("MaxtimeBackupMailSizeCalculate"));
    $systemForkProcessesNumber = intval($sock->GET_INFO("systemForkProcessesNumber"));
    if ($systemForkProcessesNumber == 0) {
        $systemForkProcessesNumber = 4;
    }
    $cpulimit = trim($sock->GET_INFO("cpulimit"));
    $cpuLimitEnabled = trim($sock->GET_INFO("cpuLimitEnabled"));
    $SystemV5CacheEnabled = trim($sock->GET_INFO("SystemV5CacheEnabled"));
    $systemMaxOverloaded = trim($sock->GET_INFO("systemMaxOverloaded"));
    $SystemLoadNotif = trim($sock->GET_INFO("SystemLoadNotif"));
    $DisableLoadAVGQueue = $sock->GET_INFO('DisableLoadAVGQueue');
    $oom_kill_allocating_task = $sock->GET_INFO("oom_kill_allocating_task");
    $SysTmpDir = $sock->GET_INFO("SysTmpDir");
    if ($SysTmpDir == null) {
        $SysTmpDir = "/home/artica/tmp";
    }
    $cgroupsEnabled = $sock->GET_INFO("cgroupsEnabled");
    $CGROUPS_INSTALLED = 0;
    if ($users->CGROUPS_INSTALLED) {
        $CGROUPS_INSTALLED = 1;
    }
    if (strlen(trim($SystemV5CacheEnabled)) == 0) {
        $SystemV5CacheEnabled = 0;
    }
    if (!is_numeric($cpuLimitEnabled)) {
        $sock->SET_INFO("cpuLimitEnabled", 0);
        $cpuLimitEnabled = 0;
    }
    if (!is_numeric($MaxtimeBackupMailSizeCalculate)) {
        $MaxtimeBackupMailSizeCalculate = 300;
    }
    if (!is_numeric($cpulimit)) {
        $cpulimit = 0;
    }
    if (!is_numeric($cgroupsEnabled)) {
        $cgroupsEnabled = 0;
    }
    if (!is_numeric($SystemLoadNotif)) {
        $SystemLoadNotif = 0;
    }
    if (!is_numeric($oom_kill_allocating_task)) {
        $oom_kill_allocating_task = 1;
    }
    if (!is_numeric($DisableLoadAVGQueue)) {
        $DisableLoadAVGQueue = 0;
    }
    if ($users->POSTFIX_INSTALLED) {
        $backupmailsize = "<tr>\n\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{MaxtimeBackupMailSizeCalculate}:</td>\n\t<td nowrap>" . Field_text("MaxtimeBackupMailSizeCalculate", $MaxtimeBackupMailSizeCalculate, "width:110px;font-size:22px;padding:3px") . "&nbsp;{minutes}</td>\n\t<td>" . help_icon("{MaxtimeBackupMailSizeCalculate_explain}") . "</td>\n</tr>";
    }
    $ini = new Bs_IniHandler();
    $ini->loadString($sock->GET_INFO("ArticaPerformancesSettings"));
    $page = CurrentPageName();
    $arrp = array(10 => "{default}", -15 => "{high}", 10 => "{medium}", 12 => "{low}", 19 => '{very_low}');
    $cpulimit_array = array(0 => "{no_limit}", 10 => "10%", 20 => "20%", 30 => "30%", 35 => "35%", 40 => "40%", 45 => "45%", 50 => "50%", 55 => "55%", 60 => "60%", 65 => "65%", 70 => "70%", 75 => "75%", 80 => "80%", 85 => "85%", 90 => "90%", 95 => "95%");
    $SystemLoadNotif_array = array(0 => "{disabled}", 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 10 => 10, 20 => 20, 30 => 30, 100 => 100);
    $arrp = Field_array_Hash($arrp, 'ProcessNice', $ini->_params["PERFORMANCES"]["ProcessNice"], null, null, 0, "font-size:22px");
    $cpulimit_f = Field_array_Hash($cpulimit_array, 'cpulimit', $cpulimit, null, null, 0, "font-size:22px");
    $arrp_mysql = array(null => "{default}", 0 => "{ISP_MODE}", 1 => "{high}", 2 => "{medium}", 3 => "{low}", 4 => '{very_low}');
    $mysql_nice = Field_array_Hash($arrp_mysql, 'MysqlNice', $ini->_params["PERFORMANCES"]["MysqlNice"], null, null, 0, "font-size:22px");
    $mysql_nice = "\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{mysql_server_consumption}:</td>\n\t\t\t<td>{$mysql_nice}</td>\n\t\t\t<td>" . help_icon("{mysql_server_text}") . "</td>\n\t\t</tr>";
    $mysql_nice = "<input type='hidden' id='MysqlNice' name='MysqlNice' value=''>";
    if ($ini->_params["PERFORMANCES"]["NoBootWithoutIP"] == null) {
        $ini->_params["PERFORMANCES"]["NoBootWithoutIP"] = 0;
    }
    if ($ini->_params["PERFORMANCES"]["useIonice"] == null) {
        $ini->_params["PERFORMANCES"]["useIonice"] = 1;
    }
    $icon_schedule = Buildicon64("DEF_ICO_ARTICA_CRON_SCHEDULE");
    $icon_phlisight = Paragraphe("philesight-64.png", "{APP_PHILESIGHT}", "{APP_PHILESIGHT_PARAMETERS}", "javascript:Loadjs('philesight.php?js-settings=yes')");
    $MaxMailEventsLogs = $sock->GET_INFO("MaxMailEventsLogs");
    if ($MaxMailEventsLogs == null) {
        $MaxMailEventsLogs = 400000;
    }
    if ($MaxMailEventsLogs < 100) {
        $MaxMailEventsLogs = 4000;
    }
    $t = time();
    $html = "\n<div id=ffm1 style='width:98%' class=form>\n<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{artica_process}:</td>\n\t\t\t<td>{$arrp}</td>\n\t\t\t<td>" . help_icon("{artica_process_explain}") . "</td>\n\t\t</tr>\n\n\t\t\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{cpuLimitEnabled}:</td>\n\t\t\t<td>" . Field_checkbox_design("cpuLimitEnabled", 1, $cpuLimitEnabled, "CheckCPULimit()") . "</td>\n\t\t\t<td>" . help_icon("{cpuLimitEnabled_explain}") . "</td>\n\t\t</tr>\t\t\t\n\t\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{cpulimit}:</td>\n\t\t\t<td>{$cpulimit_f}</td>\n\t\t\t<td>" . help_icon("{artica_cpulimit_explain}") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{SystemLoadNotif}:</td>\n\t\t\t<td>" . Field_array_Hash($SystemLoadNotif_array, "SystemLoadNotif", $SystemLoadNotif, null, null, 0, "font-size:22px") . "</td>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>\t\t\t\n\t\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{systemMaxOverloaded}:</td>\n\t\t\t<td nowrap style='font-size:22px'>" . Field_text("systemMaxOverloaded", $systemMaxOverloaded, "width:110px;font-size:22px;padding:3px") . "&nbsp;{load}</td>\n\t\t\t<td>" . help_icon("{systemMaxOverloaded_explain}") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{systemForkProcessesNumber}:</td>\n\t\t\t<td nowrap style='font-size:22px'>" . Field_text("systemForkProcessesNumber", $systemForkProcessesNumber, "width:110px;font-size:22px;padding:3px") . "&nbsp;{processes}</td>\n\t\t\t<td>" . help_icon("{systemForkProcessesNumber_explain}") . "</td>\n\t\t</tr>\t\t\n\t\t{$mysql_nice}\n\n\t\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{SystemV5CacheEnabled}:</td>\n\t\t\t<td>" . Field_checkbox_design("SystemV5CacheEnabled", 1, $SystemV5CacheEnabled) . "</td>\n\t\t\t<td>" . help_icon("{SystemV5CacheEnabled_explain}") . "</td>\n\t\t</tr>\t\n\t\t\n\t\t\t\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{useIonice}:</td>\n\t\t\t<td>" . Field_checkbox_design("useIonice", 1, $ini->_params["PERFORMANCES"]["useIonice"]) . "</td>\n\t\t\t<td>" . help_icon("{useIonice_explain}") . "</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{NoBootWithoutIP}:</td>\n\t\t\t<td>" . Field_checkbox_design("NoBootWithoutIP", 1, $ini->_params["PERFORMANCES"]["NoBootWithoutIP"]) . "</td>\n\t\t\t<td>" . help_icon("{NoBootWithoutIP_explain}") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{DisableFollowServiceHigerThan1G}:</td>\n\t\t\t<td>" . Field_checkbox_design("DisableFollowServiceHigerThan1G", 1, $ini->_params["PERFORMANCES"]["DisableFollowServiceHigerThan1G"]) . "</td>\n\t\t\t<td>" . help_icon("{DisableFollowServiceHigerThan1G_explain}") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{EnableArticaWatchDog}:</td>\n\t\t\t<td>" . Field_checkbox_design("EnableArticaWatchDog", 1, $sock->GET_INFO('EnableArticaWatchDog')) . "</td>\n\t\t\t<td>" . help_icon("{EnableArticaWatchDog_explain}") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{DisableLoadAVGQueue}:</td>\n\t\t\t<td>" . Field_checkbox_design("DisableLoadAVGQueue", 1, $DisableLoadAVGQueue) . "</td>\n\t\t\t<td>" . help_icon("{DisableLoadAVGQueue_explain}") . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{oom_kill_allocating_task}:</td>\n\t\t\t<td>" . Field_checkbox_design("oom_kill_allocating_task", 1, $oom_kill_allocating_task) . "</td>\n\t\t\t<td>\n\t\t</tr>\n\n\t\t\t\n\t\t{$backupmailsize}\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{MaxEventsInDatabase} (mail):</td>\n\t\t\t<td nowrap>" . Field_text("MaxMailEventsLogs", $MaxMailEventsLogs, "width:150px;font-size:22px;padding:3px") . "</td>\n\t\t\t<td></td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td nowrap width=1% align='right' class=legend style='font-size:22px'>{temp_dir}:</td>\n\t\t\t<td nowrap>" . Field_text("SysTmpDir", $SysTmpDir, "width:320px;font-size:22px;padding:3px") . "</td>\n\t\t\t<td></td>\n\t\t</tr>\t\n\t\t\t<td colspan=3 align='right'><hr>" . button("{apply}", "SavePerformancesMasterForm()", 34) . "</td>\n\t\t</tr>\n\t\t</tbody>\n\t\t</table>\n\t\t</form>\n</div>\n\t\t<div id='{$t}-reboot'></div>\t\n\n\t\t\n\n\n\n<script>\n\tvar x_SavePerformancesMasterForm= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tif(results.length>3){alert(results);}\n\t\tRefreshTab('main_config_articaproc');\n\t}\n\n\n\tfunction SavePerformancesMasterForm(){\n\t\tvar XHR=XHRParseElements('ffm1');\n\t\tXHR.sendAndLoad('{$page}', 'POST',x_SavePerformancesMasterForm);\n\t\n\t}\n\n\n\n\n\t\n\t\n\tfunction CheckCPULimit(){\n\t\tdocument.getElementById('cpulimit').disabled=true;\n\t\tif(document.getElementById('cpuLimitEnabled').disabled){return;}\n\t\tif(document.getElementById('cpuLimitEnabled').checked){\n\t\t\tdocument.getElementById('cpulimit').disabled=false;\n\t\t}\n\t}\n\t\n\tfunction LoadRebootSection(){\n\t\tLoadAjax('{$t}-reboot','artica.performances.reboot.php?t={$t}');\n\t\n\t}\n\t\n\n\t\t\n\t\n\n\nCheckCPULimit();\nLoadRebootSection();\n\n</script>\n\n";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
Esempio n. 12
0
function main_settings($noecho = 0)
{
    $amavis = new amavis();
    $page = CurrentPageName();
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $array = array("D_PASS" => "{D_PASS}", "D_DISCARD" => "{D_DISCARD}", "D_BOUNCE" => "{D_BOUNCE}");
    $kas3 = Paragraphe('folder-caterpillar.png', '{APP_KAS3}', '{KAS3_TEXT}', 'javascript:Loadjs("kas.group.rules.php?ajax=yes")', null, 210, null, 0, true);
    $kas3_bad = Paragraphe('folder-caterpillar-grey.png', '{APP_KAS3}', '{feature_disabled}', null, null, 210, null, 0, true);
    if ($users->kas_installed) {
        if ($users->KasxFilterEnabled) {
            $kas = $kas3;
        } else {
            $kas = $kas3_bad;
        }
    }
    $trustlocal = Paragraphe("network-connection2.png", '{trust_local}', '{trust_local_text}', "javascript:Loadjs('{$page}?script=trustlocal')", null, 210, 100);
    $localNetwork = Paragraphe("64-ip-settings.png", '{local_network}', '{local_network_text}', "javascript:Loadjs('{$page}?script=localnetwork')", null, 210, 100);
    $filterbhavior = Paragraphe("64-milter-behavior.png", '{filter_behavior}', '{filter_behavior_text}', "javascript:Loadjs('{$page}?script=filterbehavior')", null, 210, 100);
    $notification = Paragraphe("mail4-64.png", '{smtp_notification}', '{notification_text}', "javascript:Loadjs('{$page}?script=notification')", null, 210, 100);
    $spamassassin = Paragraphe("folder-64-spamassassin-grey.png", '{spamassassin}', '{feature_not_installed}', null, null, 210, 100);
    $whitelist = Paragraphe("folder-64-spamassassin-grey.png", '{spamassassin}', '{feature_not_installed}', null, null, 210, 100);
    $pieces_jointes = Paragraphe("pieces-jointes.png", '{filter_extension}', '{filter_extension_text}', "javascript:Loadjs('{$page}?script=filterextension')", null, 210, 100);
    if ($users->spamassassin_installed) {
        $spamassassin = Paragraphe("folder-64-spamassassin.png", '{spamassassin}', '{spamassassin_text}', "javascript:Loadjs('{$page}?script=spamassassin')", null, 210, 100);
    }
    //$apply=Paragraphe('system-64.png','{apply config}','{APPLY_SETTINGS_AMAVIS}',"javascript:Loadjs('$page?script=apply')",'APPLY_SETTINGS_AMAVIS',210,100);
    $apply = Buildicon64("DEF_ICO_AMAVIS_RESTART", 210, 100);
    $prepost = Paragraphe("folder-equerre-64.png", '{postfix_hooking}', '{postfix_hooking_text}', "javascript:Loadjs('{$page}?hooking-js=yes')", 'postfix_hooking_text', 210, 100);
    $spf = Paragraphe("spf-logo-64.png", '{APP_SPF}', '{APP_SPF_TINY_TEXT}', "javascript:Loadjs('spamassassin.spf.php')", 'APP_SPF_TINY_TEXT', 210, 100);
    $users = new usersMenus();
    if ($users->CLAMD_INSTALLED) {
        $sanesecurity = Paragraphe('folder-64-denywebistes.png', 'SaneSecurity signatures', '{sanesecurity_text}', "javascript:Loadjs('{$page}?sanesecurity-js=yes')", 'sanesecurity_text', 210, 100);
    }
    $html = "\n\t<H5>{global_settings}</H5>\n\t<table>\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$trustlocal}</td>\n\t\t\t<td valign='top' >{$filterbhavior}</td>\n\t\t\t<td valign='top' >{$apply}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td valign='top' >{$pieces_jointes}</td>\n\t\t\t<td valign='top'>{$spf}</td>\n\t\t\t<td valign='top' >{$spamassassin}</td>\n\t\t\t</tr>\t\t\t\n\t\t\t<td valign='top'>{$prepost}</td>\n\t\t\t<td valign='top' >{$notification}</td>\n\t\t\t<td valign='top'>{$sanesecurity}</td>\t\t\t\n\t\t\t</tr>\n\t\t\t\n\t</table>\n\t\n\t\n\t";
    $tpl = new templates();
    if ($noecho == 0) {
        echo $tpl->_ENGINE_parse_body($html);
    } else {
        return $tpl->_ENGINE_parse_body($html, 'postfix.index.php');
    }
}
Esempio n. 13
0
function admin_system()
{
    $users = new usersMenus();
    $browse = Buildicon64("DEF_ICO_BROWSE_COMP");
    $disks = Paragraphe("64-hd.png", '{internal_hard_drives}', '{internal_hard_drives_text}', "javascript:Loadjs('system.internal.disks.php');", "{internal_hard_drives_text}");
    //$frontend_settings=Paragraphe("64-settings.png",'{design_and_tweaks}','{designs_and_tweaks_text}',"javascript:Loadjs('artica.performances.php?cron-js=yes');","{internal_hard_drives_text}");
    $memdump = Paragraphe("stats-64.png", '{processes_memory}', '{processes_memory_text}', "javascript:LoadMemDump();", "{processes_memory_text}");
    $artica_events = Paragraphe('events-64.png', '{artica_events}', '{artica_events_text}', "javascript:Loadjs('artica.events.php');", "{artica_events_text}");
    $phpldapadmin = Paragraphe('phpldap-admin-64.png', '{APP_PHPLDAPADMIN}', '{APP_PHPLDAPADMIN_TEXT}', "javascript:s_PopUpFull('ldap/index.php',1024,800);", "{APP_PHPLDAPADMIN_TEXT}");
    $phpmyadmin = Paragraphe('phpmyadmin-64.png', '{APP_PHPMYADMIN}', '{APP_PHPMYADMIN_TEXT}', "javascript:s_PopUpFull('mysql/index.php',1024,800);", "{APP_PHPMYADMIN_TEXT}");
    //$artica_settings=Paragraphe('folder-interface-64.png',"{advanced_options}","{advanced_artica_options_text}","javascript:Loadjs('artica.settings.php?js=yes&ByPopup=yes');","{advanced_artica_options_text}");
    $ActiveDirectoryConnection = Paragraphe('wink3_bg.png', '{APP_AD_CONNECT}', '{APP_AD_CONNECT_TEXT}', "javascript:Loadjs('ad.connect.php');", "{APP_AD_CONNECT_TEXT}");
    //phpmyadmin-64.png
    //
    $backup = Paragraphe('64-backup.png', '{manage_backups}', '{manage_backups_text}', "javascript:Loadjs('backup.tasks.php');", "{manage_backups_text}");
    $users = new usersMenus();
    if (!$users->phpldapadmin_installed) {
        $phpldapadmin = Paragraphe('phpldap-admin-64-grey.png', '{APP_PHPLDAPADMIN}', '{error_app_not_installed_disabled}', "", "{APP_PHPLDAPADMIN_TEXT}");
    }
    if (!$users->phpmyadmin_installed) {
        $phpmyadmin = Paragraphe('phpmyadmin-grey-64.png', '{APP_PHPMYADMIN}', '{error_app_not_installed_disabled}', "", "{APP_PHPMYADMIN_TEXT}");
    }
    if ($users->SQUID_INSTALLED) {
        $sock = new sockets();
        $SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
        if (!is_numeric($SQUIDEnable)) {
            $SQUIDEnable = 1;
        }
        if ($SQUIDEnable == 0) {
            $reactivate_squid = Paragraphe('warning64.png', '{SQUID_DISABLED}', '{SQUID_DISABLED_TEXT}', "javascript:Loadjs('squid.newbee.php?reactivate-squid=yes')", "{SQUID_DISABLED_TEXT}");
        }
    }
    if ($users->FROM_ISO) {
        $FROMISO = Paragraphe('64-CD.png', '{MENU_CONSOLE}', '{MENU_CONSOLE_TEXT}', "javascript:Loadjs('artica.iso.php')", "{MENU_CONSOLE_TEXT}");
    }
    $tpl = new templates();
    $massmailing = Paragraphe('mass-mailing-64.png', '{email_campaigns}', '{APP_MASSMAILING_ENABLE_TEXT}', "javascript:Loadjs('system.enable.massmailing.php');", "{APP_MASSMAILING_ENABLE_TEXT}");
    $mysql_settings = $tpl->_ENGINE_parse_body("{mysql_settings}");
    $web_interface_settings = Paragraphe("folder-performances-64.png", "{web_interface_settings}", "{web_interface_settings_text}", "javascript:Loadjs('artica.settings.php?js=yes&func-webinterface=yes');");
    $SMTP_NOTIFICATIONS_PAGE = Paragraphe("notifications-64.png", "{smtp_notifications}", "{smtp_notifications_text}", "javascript:Loadjs('artica.settings.php?js=yes&func-NotificationsInterface=yes');");
    $proxy = Paragraphe("proxy-64.png", "{http_proxy}", "{http_proxy_text}", "javascript:Loadjs('artica.settings.php?js=yes&func-ProxyInterface=yes');");
    $logs = Paragraphe("scan-64.png", "{logs_cleaning}", "{logs_cleaning_text}", "javascript:Loadjs('artica.settings.php?js=yes&func-LogsInterface=yes');");
    //$mysql=Paragraphe("folder-64-backup.png","{mysql_settings}","{mysql_settings_text}","javascript:MysqlInterface();","$mysql_settings");
    $perfs = Paragraphe("perfs-64.png", "{artica_performances}", "{artica_performances_text}", "javascript:Loadjs('artica.performances.php');");
    $tr[] = $web_interface_settings;
    $tr[] = $SMTP_NOTIFICATIONS_PAGE;
    $tr[] = $FROMISO;
    $tr[] = $memdump;
    $tr[] = $perfs;
    $tr[] = $artica_events;
    $tr[] = $logs;
    $tr[] = $disks;
    $tr[] = $browse;
    $tr[] = $backup;
    $tr[] = $reactivate_squid;
    $tr[] = $phpldapadmin;
    $tr[] = $phpmyadmin;
    $tr[] = $proxy;
    //$tr[]=$massmailing;
    $html = CompileTr4($tr);
    $results = $tpl->_ENGINE_parse_body($html);
    writelogs("SET CACHED " . strlen($results) . " bytes", __FILE__, __FUNCTION__, __LINE__);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $results);
    echo $results;
}
Esempio n. 14
0
function dhcp_index()
{
    $page = CurrentPageName();
    $config = Paragraphe("64-settings.png", "{APP_DHCP_MAIN_CONF}", "{APP_DHCP_MAIN_CONF_TEXT}", "javascript:YahooWin3(850,'index.gateway.php?show-script=yes','{APP_DHCP_MAIN_CONF}');");
    $pxe = Paragraphe("pxe-64.png", "{PXE}", "{PXE_DHCP_MINI_TEXT}", "javascript:PxeConfig();");
    $pcs = Buildicon64('DEF_ICO_BROWSE_COMP');
    $enable = Paragraphe("check-64.png", "{EnableDHCPServer}", "{EnableDHCPServer_text}", "javascript:Loadjs('{$page}?dhcp-enable-js=yes');", "{EnableDHCPServer_text}");
    $title = "<div style='font-size:42px;'>{APP_DHCP}</div>";
    $class_from = "form";
    if (isset($_GET["miniadm"])) {
        $title = null;
        $class_from = "TableRemove";
        $statuswidth = "width=410px";
    }
    $html = "\n<div class='BodyContent'>\n\t<table style='width:99%' class={$class_from}>\n\t\t<tr>\n\t\t\t<td valign='top' {$statuswidth}>\n\t\t\t\t{$title}\n\t\t\t\t<div id='dhcp-status'></div>\n\t\t\t</td>\n\t\t\t<td valign='top' style='padding:30px'>\n\t\t\t\t\t<div id='dhcp-enabled' style='margin-bottom:20px'></div>\n\t\t\t\n\t\t\t\t\t<table style='width:100%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t<td valign='top'>{$config}</td>\n\t\t\t\t\t\t\t<td valign='top'>{$pxe}</td>\n\t\t\t\t\t\t\t<td valign='top'>{$pcs}</td>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</div>\n\n<script>\n\tLoadAjax('dhcp-status','{$page}?dhcp-status=yes');\n\tLoadAjax('dhcp-enabled','{$page}?dhcp_enable_popup=yes');\n</script>\n\n\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 15
0
function index()
{
    $DEF_ICO_SSL_KEY = Buildicon64('DEF_ICO_SSL_KEY');
    $html = "\n\t\t<H1>{tls_title}</H1>\n\t\t" . RoundedLightWhite("\n\t\t<table style='width:100%'>\n\t\t<td valign='top' width=1%'>{$DEF_ICO_SSL_KEY}</td>\n\t\t<td valign='top'><p style='font-size:12px'>{TLS_EXPLAIN}</p></td>\n\t\t</tr>\n\t\t</table>") . "\n\t\t<br>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 16
0
function index()
{
    $DEF_ICO_SSL_KEY = Buildicon64('DEF_ICO_SSL_KEY');
    $html = "\n\t\t<div style='font-size:26px'>{tls_title}</div>\n\t\t<div style='width:98%' class=form>\n\t\t<table style='width:100%'>\n\t\t<td valign='top' width=1%'>{$DEF_ICO_SSL_KEY}</td>\n\t\t<td valign='top'><div style='font-size:18px' class=text-info>{TLS_EXPLAIN}</div></td>\n\t\t</tr>\n\t\t</table></div>\n\t\t<br>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 17
0
function admin_system()
{
    $browse = Buildicon64("DEF_ICO_BROWSE_COMP");
    $disks = Paragraphe("64-hd.png", '{internal_hard_drives}', '{internal_hard_drives_text}', "javascript:Loadjs('system.internal.disks.php');", "{internal_hard_drives_text}");
    $net = Paragraphe('network-connection2.png', '{net_settings}', '{net_settings_text}', "javascript:Loadjs('system.nic.config.php?js=yes')", 'net_settings_text');
    $frontend_settings = Paragraphe("64-settings.png", '{index_page_settings}', '{index_page_settings_text}', "javascript:Loadjs('artica.performances.php?cron-js=yes');", "{internal_hard_drives_text}");
    $memdump = Paragraphe("stats-64.png", '{processes_memory}', '{processes_memory_text}', "javascript:LoadMemDump();", "{processes_memory_text}");
    $artica_events = Paragraphe('events-64.png', '{artica_events}', '{artica_events_text}', "javascript:Loadjs('artica.events.php');", "{artica_events_text}");
    $phpldapadmin = Paragraphe('phpldap-admin-64.png', '{APP_PHPLDAPADMIN}', '{APP_PHPLDAPADMIN_TEXT}', "javascript:s_PopUpFull('ldap/index.php',1024,800);", "{APP_PHPLDAPADMIN_TEXT}");
    $phpmyadmin = Paragraphe('phpmyadmin-64.png', '{APP_PHPMYADMIN}', '{APP_PHPMYADMIN_TEXT}', "javascript:s_PopUpFull('mysql/index.php',1024,800);", "{APP_PHPMYADMIN_TEXT}");
    //phpmyadmin-64.png
    //
    $backup = Paragraphe('64-backup.png', '{manage_backups}', '{manage_backups_text}', "javascript:Loadjs('backup.tasks.php');", "{manage_backups_text}");
    $users = new usersMenus();
    if (!$users->phpldapadmin_installed) {
        $phpldapadmin = Paragraphe('phpldap-admin-64-grey.png', '{APP_PHPLDAPADMIN}', '{error_app_not_installed_disabled}', "", "{APP_PHPLDAPADMIN_TEXT}");
    }
    if (!$users->phpmyadmin_installed) {
        $phpmyadmin = Paragraphe('phpmyadmin-grey-64.png', '{APP_PHPMYADMIN}', '{error_app_not_installed_disabled}', "", "{APP_PHPMYADMIN_TEXT}");
    }
    if ($users->SQUID_INSTALLED) {
        $sock = new sockets();
        $SQUIDEnable = trim($sock->GET_INFO("SQUIDEnable"));
        if ($SQUIDEnable == null) {
            $SQUIDEnable = 1;
        }
        if ($SQUIDEnable == 0) {
            $reactivate_squid = Paragraphe('warning64.png', '{SQUID_DISABLED}', '{SQUID_DISABLED_TEXT}', "javascript:Loadjs('squid.newbee.php?reactivate-squid=yes')", "{SQUID_DISABLED_TEXT}");
        }
    }
    $massmailing = Paragraphe('mass-mailing-64.png', '{email_campaigns}', '{APP_MASSMAILING_ENABLE_TEXT}', "javascript:Loadjs('system.enable.massmailing.php');", "{APP_MASSMAILING_ENABLE_TEXT}");
    $tr[] = $frontend_settings;
    $tr[] = $memdump;
    $tr[] = $artica_events;
    $tr[] = $oneone;
    $tr[] = $disks;
    $tr[] = $net;
    $tr[] = $browse;
    $tr[] = $backup;
    $tr[] = $reactivate_squid;
    $tr[] = $phpldapadmin;
    $tr[] = $phpmyadmin;
    $tr[] = $massmailing;
    $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();
    $results = $tpl->_ENGINE_parse_body($html);
    writelogs("SET CACHED " . strlen($results) . " bytes", __FILE__, __FUNCTION__, __LINE__);
    SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $results);
    echo $results;
}
Esempio n. 18
0
function main_samba()
{
    cookies_main();
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $samba = Paragraphe('64-samba-grey.png', '{APP_SAMBA}', '{feature_not_installed}', '', null, 210, null, 0, false);
    $share = Paragraphe('64-share-grey.png', '{SHARE_FOLDER}', '{feature_not_installed}', '', null, 210, null, 0, false);
    $audit = Paragraphe('folder-64-spamassassin-grey.png', '{samba_audit}', '{feature_not_installed}', "", null, 210, null, 0, false);
    $usb = Paragraphe('usb-share-64.png', '{usb_share}', '{feature_not_installed}', "", null, 210, null, 0, false);
    if ($users->SAMBA_INSTALLED) {
        $cups = Paragraphe('64-printer-grey.png', "{APP_CUPS}", '{feature_not_installed}');
        $samba = Paragraphe('64-samba.png', '{APP_SAMBA}', '{APP_SAMBA_TEXT}', "javascript:Loadjs('samba.index.php?script=smbpop')", null, 210, null, 0, false);
        $share = Paragraphe('64-share.png', '{SHARE_FOLDER}', '{SHARE_FOLDER_TEXT}', "javascript:Loadjs('SambaBrowse.php');", null, 210, null, 0, false);
        $audit = Paragraphe('folder-64-spamassassin.png', '{samba_audit}', '{samba_audit_text}', "new:smb-audit/index.php", null, 210, null, 0, false);
        $usb = Paragraphe('usb-share-64.png', '{usb_share}', '{usb_share_text}', "javascript:Loadjs('samba.usb.php')", null, 210, null, 0, false);
        $NTconfig = Buildicon64("DEF_ICO_NTPOL");
        $sync = Buildicon64('DEF_ICO_SAMBA_SYNCHRO');
        $roaming = Buildicon64('DEF_ICO_ROAMINGP');
        if ($users->CUPS_INSTALLED) {
            $cups = Paragraphe('64-printer.png', "{APP_CUPS}", '{APP_CUPS_TEXT}', "javascript:Loadjs('cups.index.php')", null, 210, null, 0, false);
        }
        $plugins = Paragraphe("folder-lego.png", "{plugins}", "{enable_plugins_text}", "javascript:Loadjs('samba.plugins.php')");
        $activedirectory = Paragraphe("folder-import-ad-64.png", "{ad_samba_member}", "{ad_samba_member_text}", "javascript:Loadjs('samba.ad.php')");
    }
    $body = "<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top'>{$share}</td>\n\t\t<td valign='top'>{$usb}</td>\n\t\t<td valign='top'>{$plugins}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td valign='top'>{$samba}</td>\n\t\t<td valign='top'>{$roaming}</td>\n\t\t<td valign='top'>{$activedirectory}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td valign='top'>{$NTconfig}</td>\n\t\t\t<td valign='top'>{$cups}</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td valign='top'>{$sync}</td>\t\t\n\t\t\t<td valign='top'>{$audit}</td>\n\t\t</tr>\n\t\t</table>";
    $sock = new sockets();
    $SambaEnabled = $sock->GET_INFO("SambaEnabled");
    if ($SambaEnabled == null) {
        $SambaEnabled = 1;
    }
    $disable_samba = Paragraphe("server-disable-64.png", '{enable_disable_samba}', '{enable_disable_samba_text}', "javascript:Loadjs('samba.disable.php');", '{enable_disable_samba_text}', 210, null, 1);
    if ($SambaEnabled == 0) {
        $body = "<center style='margin:10px'>{$disable_samba}</center>";
    }
    $status = "<div id='smb-status' style='width:290px;height:350px;overflow:auto'></div>\n\t\t\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "refresh_services()") . "</div>";
    $html = "{$tab}\n\n\t\t<div style='width:720px'>\n\t\t\n\t\t</div>\t{$body}\n\t\t";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}
Esempio n. 19
0
function troubleshoot_start()
{
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t\n\t<td valign='top'>\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>" . Paragraphe("64-troubleshoot-rebuild.png", "{rebuild_ldap_databases}", "{rebuild_ldap_databases_text}", "javascript:troubleshoot_rebuildldap()") . "</td>\n\t\t<td valign='top'>" . Paragraphe("64-troubleshoot-index.png", "{index_ldap_databases}", "{index_ldap_databases_text}", "javascript:troubleshoot_index()") . "</td>\n\t\t<td valign='top'>" . Buildicon64("DEF_ICO_LDAP") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'>" . Paragraphe("64-troubleshoot-restore.png", "{restore_ldap_database}", "{restore_ldap_database_text}", "javascript:troubleshoot_restoreldap()") . "</td>\n\t\t<td valign='top'>" . Paragraphe("64-export.png", "{export_artica_settings}", "{export_artica_settings_text}", "javascript:Loadjs('index.export.php')") . "</td>\n\t\t<td valign='top'>&nbsp;</<td valign='top'>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'>" . Paragraphe("64-import.png", "{import_artica_settings}", "{import_artica_settings_text}", "javascript:Loadjs('index.import.php')") . "</td>\n\t\t<td>" . Buildicon64("DEF_ICO_RESTOREMBX") . "</td>\n\t\t<td valign='top'>&nbsp;</<td valign='top'>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 20
0
function popup()
{
    $user = new usersMenus();
    if (!$user->POWER_DNS_INSTALLED) {
        not_installed();
        return null;
    }
    $add = Paragraphe("dns-cp-add-64.png", "{ADD_DNS_ENTRY}", "{ADD_DNS_ENTRY_TEXT}", "javascript:AddPDNSEntry()");
    $nic = Buildicon64('DEF_ICO_IFCFG');
    $list = dnslist();
    $html = "<H1>{APP_PDNS}</H1>\n\t<p class=caption>{pdns_explain}</p>\n\t<table style='width:100%'>\n\t<tr>\n\t\t\n\t\t<td valign='top'>\n\t\t\t\t" . RoundedLightWhite("<div id='dns_list' style='width:400px;height:320px;overflow:auto'>{$list}</div>") . "\n\t\t</td>\n\t\t<td valign='top'>{$add}<br>{$nic}<br>" . PDNSStatus() . "</td>\n\t</tr>\n\t</table>\n\t\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
function organization_management()
{
    $ou = $_GET["ou"];
    $ou_encoded = base64_encode($ou);
    $ldap = new clladp();
    $sock = new sockets();
    if (trim($ou == null)) {
        if (isset($_COOKIE["SwitchOrgTabsOu"])) {
            $_GET["ou"] = $_COOKIE["SwitchOrgTabsOu"];
        }
    }
    $usersmenus = new usersMenus();
    $usersmenus->LoadModulesEnabled();
    if ($usersmenus->AllowAddUsers or $usersmenus->AsOrgAdmin or $usersmenus->AsMessagingOrg) {
        $add_user = Paragraphe('folder-useradd-64.png', '{create_user}', '{create_user_text}', "javascript:Loadjs('domains.add.user.php?ou={$ou}')", null, 210, null, 0, true);
        $groups = Paragraphe('folder-group-64.png', "{manage_groups} ({$ou})", '{manage_groups_text}', "javascript:Loadjs('domains.edit.group.php?ou={$ou_encoded}&js=yes&popup=yes')", null, 210, 100, 0, true);
    }
    $find_members = Paragraphe('find-members-64.png', '{find_members}', '{find_members_text}', "javascript:Loadjs('domains.find.user.php?ou={$ou}')", null, 210, null, 0, true);
    if ($usersmenus->AsArticaAdministrator) {
        $delete = Paragraphe('64-cancel.png', "{delete_ou} {$ou}", '{delete_ou_text}', "javascript:Loadjs('domains.delete.org.php?ou={$ou}');", null, 210, 100, 0, true);
    }
    if ($usersmenus->AsOrgAdmin) {
        $img = $ldap->get_organization_picture($ou, 64);
        $ad_import = Paragraphe('folder-import-ad-64.png', '{ad_import}', '{ad_import_text}', "javascript:Loadjs('domains.ad.import.php?ou={$ou}')", null, 210, 0, 0, true);
        $ldap_import = Paragraphe('database-restore-64.png', '{ldap_importation}', '{ldap_importation_text}', "javascript:Loadjs('domains.ldap.import.php?ou={$ou}')", null, 210, 0, 0, true);
        $orgsettings = Paragraphe($img, '{ORG_SETTINGS}', '{ORG_SETTINGS_TEXT}', "javascript:Loadjs('domains.organization-settings.php?ou={$ou}')", null, 210, 0, 0, true);
        $orgsduplicate = Paragraphe('org-duplicate-64.png', '{EXPORT_ORG}', '{duplicate_to_remote_server}', "javascript:Loadjs('domains.organization-settings.php?ou={$ou}&js-export=yes')", null, 210, 0, 0, true);
    }
    if (!isset($_GET["miniadm"])) {
        if ($usersmenus->AsOrgAdmin 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->POSTFIX_INSTALLED) {
                $sendmail = "<div style='float:left'>" . Buildicon64('DEF_ICO_SENDTOALL', 210, 100, "?ou={$ou}") . "</div>";
            }
        }
    }
    if ($usersmenus->ARTICA_META_ENABLED) {
        if ($sock->GET_INFO("AllowArticaMetaAddUsers") != 1) {
            $add_user = null;
        }
    }
    if ($usersmenus->POSTFIX_INSTALLED) {
        $transport = null;
    }
    if ($usersmenus->EnableManageUsersTroughActiveDirectory or $ldap->IsOUUnderActiveDirectory($ou)) {
        $ad_import = Paragraphe('folder-import-ad-64-grey.png', '{ad_import}', '{ad_import_text}');
        $orgsduplicate = Paragraphe('org-duplicate-64-grey.png', '{EXPORT_ORG}', '{duplicate_to_remote_server}');
        $delete = Paragraphe('64-cancel-grey.png', '{delete_ou}', '{delete_ou_text}');
        $add_user = Paragraphe('folder-useradd-64-grey.png', '{create_user}', '{create_user_text}');
        $orgsettings = Paragraphe('64-org-settings-grey.png', '{ORG_SETTINGS}', '{ORG_SETTINGS_TEXT}');
        $ldap_import = Paragraphe('database-restore-64-grey.png', '{ldap_importation}', '{ldap_importation_text}');
    }
    $tr[] = $add_user;
    $tr[] = $groups;
    $tr[] = $find_members;
    $tr[] = $transport;
    $tr[] = $ad_import;
    $tr[] = $ldap_import;
    $tr[] = $orgsettings;
    $tr[] = $orgsduplicate;
    $tr[] = $sendmail;
    $tr[] = $delete;
    $tables[] = "<table style='width:99%' class=form><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>";
        }
    }
    $html = "<center><div style='width:700px'>" . implode("\n", $tables) . "</div></center>";
    return $html;
}
Esempio n. 22
0
function filters_section_kaspersky()
{
    if (posix_getuid() == 0) {
        return null;
    }
    $page = CurrentPageName();
    $sock = new sockets();
    $EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $kas3 = Paragraphe('folder-caterpillar.png', '{APP_KAS3}', '{KAS3_TEXT}', 'javascript:Loadjs("kas.group.rules.php?ajax=yes")', null, 210, null, 0, true);
    $kasper = Paragraphe('icon-antivirus-64.png', '{APP_KAVMILTER}', '{APP_KAVMILTER_TEXT}', "javascript:Loadjs('milter.index.php?ajax=yes')", null, 210, null, 0, true);
    $activate = Paragraphe('64-folder-install.png', '{AS_ACTIVATE}', '{AS_ACTIVATE_TEXT}', "javascript:Loadjs('{$page}?script=antispam')", null, 210, null, 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('{$page}?script=milterbehavior')", 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_admin = Paragraphe("biohazard-64.png", "{all_quarantines}", "{all_quarantines_text}", "javascript:Loadjs('domains.quarantine.php?js=yes&Master=yes')", null, 210, 100, 0, true);
    $quarantine_report = Paragraphe("64-administrative-tools.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", "{quanrantine_policies}", "{quanrantine_policies_text}", "javascript:Loadjs('quarantine.policies.php')", null, 210, null, 0, true);
    if ($users->KasxFilterEnabled != 1) {
        $kas3 = null;
    }
    if ($users->kas_installed != 1) {
        $kas3 = null;
    }
    if (!$users->KAV_MILTER_INSTALLED) {
        $kasper = null;
    }
    if ($users->KAVMILTER_ENABLED != 1) {
        $kasper = null;
    }
    if ($users->KasxFilterEnabled != 1) {
        $kas3 = null;
    }
    if ($users->kas_installed != 1) {
        $kas3 = null;
    }
    if ($users->KAVMILTER_ENABLED != 1) {
        $kav = null;
    }
    if (!$users->KAV_MILTER_INSTALLED) {
        $kav = null;
    }
    if ($users->MilterGreyListEnabled != 1) {
        $mg = nul;
    }
    if (!$users->MILTERGREYLIST_INSTALLED) {
        $mg = null;
    }
    if ($EnablePostfixMultiInstance == 1) {
        $mg = null;
    }
    if ($users->EnableMilterSpyDaemon != 1) {
        $mailspy = null;
    }
    if (!$users->MILTER_SPY_INSTALLED) {
        $mailspy = null;
    }
    $tr[] = $apply;
    $tr[] = $activate;
    $tr[] = $milter_script;
    $tr[] = $kas3;
    $tr[] = $assp;
    $tr[] = $kasper;
    $tr[] = $quarantine_policies;
    $tr[] = $quarantine;
    $tr[] = $quarantine_admin;
    $tr[] = $quarantine_report;
    $tr[] = $wbl;
    $tr[] = $mailspy;
    $tables[] = "<table style='width:70%' class=form><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();
    $datas = $tpl->_ENGINE_parse_body($html, "postfix.plugins.php,domain.manage.org.index.php,domains.quarantine.php");
    return $datas;
}
Esempio n. 23
0
function main_update(){
	$users=new usersMenus();
	if($users->APT_MIRROR_INSTALLED){
		$img=$users->LinuxDistriCode."_mirror-64.png";
		$apt_mirror=Paragraphe($img,'{REPOSITORY_DEB_MIRROR}','{REPOSITORY_DEB_MIRROR_TEXT}',"javascript:Loadjs('apt-mirror.php')",null,210,null,0,false);
	}

		$UpdateUtility=Paragraphe('64-retranslator-grey.png',
		'{APP_KASPERSKY_UPDATE_UTILITY}',
		'{APP_KASPERSKY_UPDATE_UTILITY_TEXT}',
		"",'APP_KASPERSKY_UPDATE_UTILITY_TEXT');	
	
	if($users->KASPERSKY_UPDATE_UTILITY_INSTALLED){
		$UpdateUtility=Paragraphe('64-retranslator.png',
		'{APP_KASPERSKY_UPDATE_UTILITY}',
		'{APP_KASPERSKY_UPDATE_UTILITY_TEXT}',
		"javascript:Loadjs('KasperskyUpdateUtility.php')",'APP_KASPERSKY_UPDATE_UTILITY_TEXT');
		
	}
	
			
	$html="<table style='width:100%'>
	<tr>
	<td valign='top' >".Paragraphe('64-dar-index.png','{incremental_backup}','{incremental_backup_text}',"javascript:Loadjs('dar.index.php?js=yes');",'repository_manager_text') ."</td>
	<td valign='top' >".Paragraphe('folder-64-artica-update.png','{artica_autoupdate}','{artica_autoupdate_text}',"javascript:Loadjs('artica.update.php?js=yes')",'artica_autoupdate_text') ."</td>
	<td valign='top' >".Buildicon64("DEF_ICO_APT") ."</td>
	</tr>
	<td valign='top' >".Paragraphe('64-retranslator.png','{APP_KRETRANSLATOR}','{APP_KRETRANSLATOR_TEXT}',"javascript:Loadjs('index.retranslator.php')",'APP_KRETRANSLATOR_TEXT') ."</td>
	<td valign='top' >$UpdateUtility</td>
	<td valign='top' >$apt_mirror</td>
	</tr>
	
	
	</table>";
	$tpl=new templates();
	echo $tpl->_ENGINE_parse_body($html);			
	
}
Esempio n. 24
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;
}
Esempio n. 25
0
function page()
{
    $usersmenus = new usersMenus();
    if ($usersmenus->AsArticaAdministrator == true) {
    } else {
        die;
        exit;
    }
    $sock = new sockets();
    $datas = $sock->getfile('clamav_status');
    $ini = new Bs_IniHandler();
    $ini->loadString($datas);
    $page = CurrentPageName();
    //print_r($ini->_params);
    if ($ini->_params["CLAMAV"]["application_installed"] != 1) {
        $clamd_img = "status_critical.gif";
    } else {
        $clamd_img = "status_ok.gif";
    }
    if ($ini->_params["CLAMSCAN"]["application_installed"] != 1) {
        $clamds_img = "status_critical.gif";
    } else {
        $clamds_img = "status_ok.gif";
    }
    if ($ini->_params["CLAMAV_MILTER"]["application_installed"] != 1) {
        $clamdm_img = "status_critical.gif";
    } else {
        $clamdm_img = "status_ok.gif";
    }
    if ($ini->_params["FRESHCLAM"]["application_installed"] != 1) {
        $clamdf_img = "status_critical.gif";
    } else {
        $clamdf_img = "status_ok.gif";
        $freshclam_settings = Paragraphe("folder-update.png", "{APP_FRESHCLAM}", '{product_update_settings_text}');
        $freshclam_settings = "<div style='float:left'>{$freshclam_settings}</div>";
    }
    if ($ini->_params["CLAMSCAN"]["master_version"] != null) {
        $master_version = $ini->_params["CLAMSCAN"]["master_version"];
    }
    if ($ini->_params["CLAMSCAN"]["master_version"] != null) {
        $master_version = $ini->_params["CLAMSCAN"]["master_version"];
    }
    if ($ini->_params["FRESHCLAM"]["master_version"] != null) {
        $master_version = $ini->_params["FRESHCLAM"]["master_version"];
    }
    if ($ini->_params["CLAMSCAN"]["pattern_version"] != null) {
        $pattern_version = $ini->_params["CLAMSCAN"]["pattern_version"];
    }
    if ($ini->_params["CLAMSCAN"]["pattern_version"] != null) {
        $pattern_version = $ini->_params["CLAMSCAN"]["pattern_version"];
    }
    if ($ini->_params["FRESHCLAM"]["pattern_version"] != null) {
        $pattern_version = $ini->_params["FRESHCLAM"]["pattern_version"];
    }
    $table_version = "\n<span style='font-size:14px;font-weight:bold'>Version {$master_version} / Pattern {$pattern_version}</span>\n<table style=width:95%>\n<tr style='background-color:#CCCCCC'> \n\t<th>{product}</th>\n\t<th>{installed}</th>\n\t<th>{explain}</th>\n</tr>\n\n<tr>\n\t<td valign='top' class=legend nowrap><strong>{APP_CLAMAV}</strong></td>\n\t<td valign='top' align='center' width=1%><img src='img/{$clamd_img}'></td>\n\t<td valign='top' style='font-size:11px'>{APP_CLAMAV_TEXT}</td>\n</tr>\n<tr><td colspan=3 style='border-bottom:1px solid #CCCCCC'>&nbsp;</td></tr>\n<tr>\n\t<td valign='top' nowrap class=legend nowrap><strong>{APP_FRESHCLAM}</strong></td>\n\t<td valign='top' align='center' width=1%>\n\t\t<img src='img/{$clamdf_img}'>\n\t</td>\n\t<td valign='top' style='font-size:11px'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top'>{APP_FRESHCLAM_TEXT}</td>\t\n\t\t<td valign='top' width=1%>" . imgtootltip("folder-update-32.png", "{product_update_settings_text}", "Loadjs('{$page}?freshclam-js=yes')") . "</td>\n\t\t\t\n\t\t</tr>\n\t\t</table>\n\t</td>\n</tr>\t\n<tr><td colspan=3 style='border-bottom:1px solid #CCCCCC'>&nbsp;</td></tr>\n<tr>\n\t<td valign='top' class=legend nowrap><strong>{APP_CLAMSCAN}</strong></td>\n\t<td valign='top' align='center' width=1%><img src='img/{$clamds_img}'></td>\n\t<td valign='top' style='font-size:11px'>{APP_CLAMSCAN_TEXT}</td>\n</tr>\n<tr><td colspan=3 style='border-bottom:1px solid #CCCCCC'>&nbsp;</td></tr>\n<tr>\n\t<td valign='top' class=legend nowrap> <strong>{APP_CLAMAV_MILTER}</strong></td>\n\t<td valign='top' align='center' width=1%><img src='img/{$clamdm_img}'></td>\n\t<td valign='top' style='font-size:11px'>{APP_CLAMAV_MILTER_TEXT}</td>\n</tr>\t\n\t\n\n</table>\n\n";
    $recompile = Paragraphe("64-install-soft.png", "{INSTALL_UPGRADE_RECOMPILE}", "{RECOMPILE_CLAMAV_TEXT}", "javascript:ClamavRecompile();");
    $freshclam = Buildicon64('DEF_ICO_FRESHCLAM_SETTINGS');
    $table_version = "<div style='height:350px;overflow:auto'>{$table_version}" . Patterns() . "</div>";
    $table_version = RoundedLightWhite($table_version);
    $html = "\n<center>\n<div style='border: 1px solid rgb(59, 136, 118); width: 598px; margin-top: -10px; background-color: rgb(59, 136, 118); margin-left: -10px;'>\n\t<img src='img/clamav_bg.png'></div>\n</center>\n<div style='background-color: rgb(59, 136, 118);width:595px;margin-left:-10px;padding-left:5px;margin-bottom:-10px;text-align:center'>\n<center>\n<div style='width:583px;margin-top:5px;margin-left:10px;background-color: rgb(59, 136, 118);margin-top:0px;'>\n<table style='width:100%' class=table_form>\n<tr>\n<td>{$recompile}</td>\n<td>{$freshclam}</td>\n</tr>\n</table>\n<center>\n\n\t\t{$table_version}\n\t\n</center>\n</div>\n</center>\n<br>\n</div>\n\n\n";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 26
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;
}
Esempio n. 27
0
function ORGANISATIONS_LIST(){
	$ldap=new clladp();
	$page=CurrentPageName();
	$hash=$ldap->hash_get_ou(true);
	$users=new usersMenus();
	$sock=new sockets();
	$AllowInternetUsersCreateOrg=$sock->GET_INFO("AllowInternetUsersCreateOrg");
	if(!is_array($hash)){return null;}
	ksort($hash);
	
	if(!$ldap->BuildOrganizationBranch()){
		$error="<div style='float:left'>".Paragraphe("danger64.png","{GENERIC_LDAP_ERROR}",$ldap->ldap_last_error)."</div>";
	}

	
$page=CurrentPageName();
		


if(isset($_GET["ajaxmenu"])){$header="
	<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='{add_new_organisation_text}'>
	<input type='hidden' name='ajaxmenu' id='ajaxmenu' value='yes'>";
	}

	
	$html="
	$header
	<div style='width:700px;height:550px'>$error";

	if(isset($_GET["ajaxmenu"])){$ajax=true;}
	
	$html=$html."<div style='float:left'>".butadm()."</div>";
	
	while (list ($num, $ligne) = each ($hash) ){
		$md=md5($ligne);
		$uri="javascript:Loadjs('domains.manage.org.index.php?js=yes&ou=$ligne');";
		if($ajax){
			$uri="javascript:Loadjs('$page?LoadOrgPopup=$ligne');";
		}
		
		$img=$ldap->get_organization_picture($ligne,64);
		

		$html=$html . "<div style='float:left'>" . Paragraphe($img,"{manage} $ligne","
		<strong>$ligne:<br></strong>{manage_organisations_text}",$uri,null,220,100) . "</div>
		";
		
	}
	
	if($AllowInternetUsersCreateOrg==1){
		$sql="SELECT * FROM register_orgs WHERE sended=0 ORDER BY ou";
		$q=new mysql();
		$results=$q->QUERY_SQL($sql,"artica_backup");
		if(!$q->ok){echo "<H2>$q->mysql_error</H2>";}
		
		while($ligne=mysql_fetch_array($results,MYSQL_ASSOC)){
			$uri="javascript:Loadjs('domains.organizations.parameters.php?ou-sql-js={$ligne["zmd5"]}')";
			$name=$ligne["ou"];
			$time=$ligne["register_date"];
			$html=$html . "<div style='float:left'>" . Paragraphe("img/org-warning-64.png","$name","
			<strong>$time:<br></strong>{waiting}",$uri,null,220,100) . "</div>
			";
			
		}
	}
	
	
	
	
	if($users->POSTFIX_INSTALLED){
		$sendmail="<div style='float:left'>".Buildicon64('DEF_ICO_SENDTOALL',220,100)."</div>";
		
	}
	
	if(isset($_GET["ajaxmenu"])){
		$html=$html."
		<div style='float:left'>" .butadm()."</div>";
		
		
	}
	
	if($users->AsArticaAdministrator){
		$parameters="<div style='float:left'>".Paragraphe("parameters2-64.png","{organizations_parameters}","
		{organizations_parameters_text}","javascript:Loadjs('domains.organizations.parameters.php')",null,220,100)."</div>";
	
	}
	
	$ldap->ldap_close();
	return "$parameters".$html."$sendmail</div>";
}
Esempio n. 28
0
function security()
{
    $datas = GET_CACHED(__FILE__, __FUNCTION__, null, TRUE);
    if ($datas != null) {
        return $datas;
    }
    $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);
    $apply = applysettings_postfix(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);
    $sasl = Paragraphe('64-smtp-auth.png', '{SASL_TITLE}', '{SASL_TEXT}', "javascript:Loadjs('postfix.index.php?script=auth');", 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);
    $global_smtp_rules = Buildicon64('DEF_ICO_POSTFIX_REGEX');
    $smtpd_client_restrictions = Paragraphe('64-sender-check.png', '{smtpd_client_restrictions_icon}', '{smtpd_client_restrictions_icon_text}', "javascript:Loadjs('postfix.smtpd_client_restrictions.php')", 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();
    $html = "\n<div style='width:700px'>\n<table style='width:100%'>\n<tr>\n<td valign='top'>{$backup}</td>\n<td valign='top'>{$tls}</td>\n<td valign='top'>{$security_rules}</td>\n</tr>\n<tr>\n<td valign='top'>{$apply}</td>\n<td valign='top'>{$messages_restriction}</td>\n<td valign='top'>{$smtpd_client_restrictions}</td>\n</tr>\n<tr>\n<td valign='top'>{$sasl}</td>\n<td valign='top'>{$ssl}</td>\n<td valign='top'>{$internet_deny}</td>\n</tr>\n<tr>\n<td valign='top'>{$global_smtp_rules}</td>\n<td valign='top'>{$postfixInstantIptables}</td>\n<td valign='top'>{$extensions_block}</td>\n</td>\n</table>\n</div>\n";
    $tpl = new templates();
    $datas = $tpl->_ENGINE_parse_body($html);
    SET_CACHED(__FILE__, __FUNCTION__, null, $datas);
    return $datas;
}
Esempio n. 29
0
function index_dar(){
$page=CurrentPageName();	
$tab=index_tab();	

$when=Paragraphe("64-planning.png","{WHEN_TO_BACKUP}","{WHEN_TO_BACKUP_TEXT}","javascript:YahooWin3(500,'$page?schedule=yes','{schedule}')");
$where=Paragraphe("64-dar-index.png","{WHERE_TO_BACKUP}","{WHERE_TO_BACKUP_TEXT}","javascript:YahooWin3(500,'$page?external-storage=yes','{WHERE_TO_BACKUP}')");
$global_settings=Paragraphe('64-parameters.png','{global_settings}','{global_settings_text}',"javascript:YahooWin2(650,'$page?dar-settings=yes','{global_settings}')");
$what=Paragraphe('64-download.png','{what_to_backup}','{what_to_backup_text}',"javascript:YahooWin2(500,'$page?dar-target=yes','{what_to_backup}')");
$run=Buildicon64('DEF_ICO_RUNBACKUP');



$display=Buildicon64('DEF_ICO_DARLIST');
$html="	
$tab

	<table style='width:100%'>
	<tr>
		<td valign='top'>$what</td>
		<td valign='top'>$when</td>
	</tr>
	<tr>
	<td valign='top'>$where</td>
	<td valign='top'>$display</td>
	</tr>
	<tr>
	<td valign='top'>$global_settings</td>
	<td valign='top'>$run</td>
	</tr>	
	
	</table>";

$tpl=new templates();
return  $tpl->_ENGINE_parse_body($html);
	
}
Esempio n. 30
0
function main_samba_content()
{
    cookies_main();
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    $samba = Paragraphe('64-samba-grey.png', '{APP_SAMBA}', '{feature_not_installed}', '', null, 210, null, 0, false);
    $share = Paragraphe('64-share-grey.png', '{SHARE_FOLDER}', '{feature_not_installed}', '', null, 210, null, 0, false);
    $audit = Paragraphe('64-spam-grey.png', '{samba_audit}', '{feature_not_installed}', "", null, 210, null, 0, false);
    $usb = Paragraphe('usb-share-64.png', '{usb_share}', '{feature_not_installed}', "", null, 210, null, 0, false);
    $usb = Paragraphe('usb-share-64.png', '{usb_share}', '{feature_not_installed}', "", null, 210, null, 0, false);
    $dropbox = Paragraphe('dropbox-64-grey.png', '{APP_DROPBOX}', '{APP_DROPBOX_TEXT}', "", null, 210, null, 0, false);
    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->SAMBA_INSTALLED) {
        $cups = Paragraphe('64-printer-grey.png', "{APP_CUPS}", '{feature_not_installed}');
        $greyhole = Paragraphe('folder-64-artica-backup-grey.png', "{APP_GREYHOLE}", '{feature_not_installed}');
        $samba = Paragraphe('64-samba.png', '{APP_SAMBA}', '{APP_SAMBA_TEXT}', "javascript:Loadjs('samba.index.php?script=smbpop')", null, 210, null, 0, false);
        $share = Paragraphe('64-share.png', '{SHARE_FOLDER}', '{SHARE_FOLDER_TEXT}', "javascript:Loadjs('SambaBrowse.php');", null, 210, null, 0, false);
        $audit = Paragraphe('64-spam.png', '{samba_audit}', '{samba_audit_text}', "new:smb-audit/index.php", null, 210, null, 0, false);
        $usb = Paragraphe('usb-share-64.png', '{usb_share}', '{usb_share_text}', "javascript:Loadjs('usb.browse.php')", null, 210, null, 0, false);
        $NTconfig = Buildicon64("DEF_ICO_NTPOL");
        $sync = Buildicon64('DEF_ICO_SAMBA_SYNCHRO');
        $roaming = Buildicon64('DEF_ICO_ROAMINGP');
        if ($users->CUPS_INSTALLED) {
            $cups = Paragraphe('64-printer.png', "{APP_CUPS}", '{APP_CUPS_TEXT}', "javascript:Loadjs('cups.index.php')", null, 210, null, 0, false);
        }
        $plugins = Paragraphe("folder-lego.png", "{samba_plugins}", "{enable_plugins_text}", "javascript:Loadjs('samba.plugins.php')");
        $activedirectory = Paragraphe("folder-import-ad-64.png", "{ad_samba_member}", "{ad_samba_member_text}", "javascript:Loadjs('ad.connect.php')");
        if ($users->GREYHOLE_INSTALLED) {
            $greyhole = Paragraphe('folder-64-artica-backup.png', "{APP_GREYHOLE}", '{enable_grehole_text}', "javascript:Loadjs('greyhole.php')");
        }
        $q = new mysql();
        $count = $q->COUNT_ROWS("smbstatus_users", "artica_events");
        if ($count > 0) {
            $members_connected = Paragraphe("user-group-64.png", "{$count} {members_connected}", "{members_connected_samba_text}", "javascript:Loadjs('samba.smbstatus.php')", null, 210, null, 0, false);
        }
    }
    $tr[] = $members_connected;
    $tr[] = $share;
    $tr[] = $greyhole;
    $tr[] = $usb;
    $tr[] = $dropbox;
    $tr[] = $plugins;
    $tr[] = $samba;
    $tr[] = $roaming;
    $tr[] = $activedirectory;
    $tr[] = $NTconfig;
    $tr[] = $cups;
    $tr[] = $sync;
    $tr[] = $audit;
    $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);
    $body = "<div style='width:700px'>{$html}</div>";
    $sock = new sockets();
    $SambaEnabled = $sock->GET_INFO("SambaEnabled");
    if ($SambaEnabled == null) {
        $SambaEnabled = 1;
    }
    $disable_samba = Paragraphe("server-disable-64.png", '{enable_disable_samba}', '{enable_disable_samba_text}', "javascript:Loadjs('samba.disable.php');", '{enable_disable_samba_text}', 210, null, 1);
    if ($SambaEnabled == 0) {
        $body = "<center style='margin:10px'>{$disable_samba}</center>";
    }
    $status = "<div id='smb-status' style='width:290px;height:350px;overflow:auto'></div>\n\t\t\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "refresh_services()") . "</div>";
    $html = "{$body}";
    $tpl = new templates();
    return $tpl->_ENGINE_parse_body($html);
}