Esempio n. 1
0
function fetch_popup()
{
    $users = new usersMenus();
    $tpl = new templates();
    $page = CurrentPageName();
    $fetchmail_rules_text = $tpl->_ENGINE_parse_body("{fetchmail_rules}");
    $users->LoadModulesEnabled();
    if ($users->EnableFetchmail == 0) {
        echo fetch_popup_enable();
        exit;
    }
    $add_fetchmail = Paragraphe('add-fetchmail-64.png', '{add_new_fetchmail_rule}', '{fetchmail_explain}', "javascript:add_fetchmail_rules()", null);
    $daemon_settings = Paragraphe('folder-tools2-64.png', '{daemon_settings}', '{daemon_settings_text}', "javascript:YahooWin('550','fetchmail.daemon.settings.php?ajax=yes','{fetchmail_daemon_settings}')");
    $rules = Paragraphe('fetchmail-rule-64.png', '{fetchmail_rules}', '{fetchmail_rules_text}', "javascript:YahooWin('600','fetchmail.daemon.rules.php?ajax=yes','{$fetchmail_rules_text}')");
    $logs = Paragraphe('64-logs.png', '{events}', '{events_text}', "javascript:s_PopUpScroll('fetchmail.index.php?events=true',800,600);");
    $update = Paragraphe('64-recycle.png', '{update_now}', '{update_fetchmail_now}', "javascript:ReloadFetchMail();");
    $html = "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'><div id='{$_GET["md"]}'></div></td>\n\t<td valign='top'>\n\n\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>{$rules}</td>\n\t\t<td valign='top'>{$daemon_settings}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top'>{$add_fetchmail}</td>\t\n\t\t<td valign='top'>{$logs}</td>\n\t</tr>\n\t</table>\n\t</td>\n</tr>\n</table>\n<script>\n\t LoadAjax('{$_GET["md"]}','{$page}?fetch_status=yes');\n</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 2
0
function fetch_index()
{
    $users = new usersMenus();
    $tpl = new templates();
    $page = CurrentPageName();
    $fetchmail_rules_text = $tpl->_ENGINE_parse_body("{fetchmail_rules}");
    $users->LoadModulesEnabled();
    if ($users->EnableFetchmail == 0) {
        echo fetch_popup_enable();
        exit;
    }
    if ($_GET["md"] == null) {
        $_GET["md"] = time();
    }
    $add_fetchmail = Paragraphe('add-fetchmail-64.png', '{add_new_fetchmail_rule}', '{fetchmail_explain}', "javascript:add_fetchmail_rules()", null);
    $daemon_settings = Paragraphe('folder-tools2-64.png', '{daemon_settings}', '{daemon_settings_text}', "javascript:YahooWin('550','fetchmail.daemon.settings.php?ajax=yes','{fetchmail_daemon_settings}')");
    //$rules=Paragraphe('fetchmail-rule-64.png','{fetchmail_rules}','{fetchmail_rules_text}',"javascript:YahooWin('600','fetchmail.daemon.rules.php?ajax=yes','$fetchmail_rules_text')");
    //$logs=Paragraphe('64-logs.png','{events}','{events_text}',"javascript:s_PopUpScroll('fetchmail.index.php?events=true',800,600);");
    $update = Paragraphe('64-recycle.png', '{update_now}', '{update_fetchmail_now}', "javascript:ReloadFetchMail();");
    $apply = Paragraphe('user-config-download-64.png', '{apply_parameters}', '{compile_rules}', "javascript:Loadjs('fetchmail.compile.progress.php');");
    $help = Paragraphe("help-64.png", "{help}", "{online_help}", "javascript:s_PopUpFull('http://www.mail-appliance.org/index.php?cID=126','1024','900');");
    $fetchmailrc = Paragraphe('script-view-64.png', '{configuration_file}', '{display_generated_configuration_file}', "javascript:Loadjs('fetchmailrc.php')");
    $html = "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'>\n\t\t<div id='{$_GET["md"]}'></div>\n\t\t<div style='width:100%;text-align:right'>" . imgtootltip("refresh-24.png", "{refresh}", "LoadAjax('{$_GET["md"]}','{$page}?fetch_status=yes');") . "</div>\t\n\t</td>\n\t<td valign='top'>\n\n\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$update}</td>\n\t\t<td valign='top'>{$add_fetchmail}</td>\t\n\t\t\n\t</tr>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$apply}</td>\n\t\t<td valign='top'>{$fetchmailrc}</td>\t\n\t\t\n\t</tr>\n\t<tr>\n\t\t\n\t\t<td valign='top'>{$help}</td>\n\t\t<td valign='top'>&nbsp;</td>\t\n\t\t\n\t</tr>\t\n\t\n\t\n\t<tr>\n\t\t<td colspan=2><div class=text-info style='text-align:left;font-size:16px'>{fetchmail_about}</div></td>\n\t</tr>\n\t</table>\n\t\n\t</td>\n</tr>\n</table>\n\n<script>\n\t LoadAjax('{$_GET["md"]}','{$page}?fetch_status=yes');\n\t \nvar x_ReloadFetchMail= function (obj) {\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue)}\n\t}\n\nfunction ReloadFetchMail(){\n  \t\tvar XHR = new XHRConnection();\n        XHR.appendData('reload-fetchmail',1);\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_ReloadFetchMail);\n}\t \n\t \n</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
Esempio n. 3
0
function fetch_popup()
{
    $users = new usersMenus();
    $users->LoadModulesEnabled();
    if ($users->EnableFetchmail == 0) {
        echo fetch_popup_enable();
        exit;
    }
    $add_fetchmail = Paragraphe('add-fetchmail-64.png', '{add_new_fetchmail_rule}', '{fetchmail_explain}', "javascript:add_fetchmail_rules()", null);
    $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t" . Paragraphe('folder-tools2-64.png', '{daemon_settings}', '{daemon_settings_text}', "javascript:YahooWin('550','fetchmail.daemon.settings.php?ajax=yes','{fetchmail_daemon_settings}')") . "\n\t\t</td>\n\n\t\t<td valign='top'>\n\t\t" . Paragraphe('fetchmail-rule-64.png', '{fetchmail_rules}', '{fetchmail_rules_text}', "javascript:YahooWin('550','fetchmail.daemon.rules.php?ajax=yes')") . "\n\t\t</td>\n\t\t<td valign='top'>\n\t\t{$add_fetchmail}\n\t\t</td>\t\n\t\t</tr>\n\t\t<tr>\n\t\t<td valign='top'>" . Paragraphe('64-logs.png', '{events}', '{events_text}', "javascript:s_PopUpScroll('fetchmail.index.php?events=true',450,400);") . "\n\t\t</td>\n\t\t<td valign='top'>" . Paragraphe('64-recycle.png', '{update_now}', '{update_fetchmail_now}', "javascript:ReloadFetchMail();") . "\n\t\t</td>\t\t\n\t\t<td>&nbsp;</td>\n\t\t</tr>\n\t\t\n\t</table>\n\t<br>\n\t<div id='{$_GET["md"]}'></div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html, 'artica.wizard.fetchmail.php');
}