function main_page() { $from = array("TO" => "{q_to}", "FROM" => "{q_from}", "" => "{dont_know}"); $dir = Field_array_Hash($from, 'direction'); $b = new backup_email($_SESSION["ou"]); $messagenumber = $b->MessageNumber(); $html = "\n\t<script language=\"JavaScript\"> \nvar timerID = null;\nvar timerID1 = null;\nvar tant=0;\nvar reste=0;\n\nfunction whatsnew(){\nif(document.getElementById('leftpanel_content')){\n\tLoadAjax('leftpanel_content','users.whatsnew-backup.php');\n}\n\n}\n\nfunction demarre(){\n tant = tant+1;\n reste=10-tant;\n\tif (tant < 10 ) { \n timerID = setTimeout(\"demarre()\",5000);\n } else {\n tant = 0;\n //document.getElementById('wait').innerHTML='<img src=img/wait.gif>';\n ChargeLogs();\n demarre(); //la boucle demarre !\n }\n}\n\n\nfunction ChargeLogs(){\n\twhatsnew();\n\t}\n\n</script>\n<script>demarre();</script>\n<script>;setTimeout(\"whatsnew()\",3000);</script>\n\t\n\t<H2>Query Manager ({$messagenumber} emails)</H2>\n\t<code>{backup_text}</code>\n\t<input type='hidden' id='ou' value='{$_SESSION["ou"]}'>\n\t\n\t" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{search_messages_that}:</strong></td>\n\t\t<td>{$dir}</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap align='right'><strong>{with_email}:</strong></td>\n\t\t<td>" . Field_text('email') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap align='right'><strong>{with_subject}:</strong></td>\n\t\t<td>" . Field_text('subject') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap align='right'><strong>{with_body}:</strong></td>\n\t\t<td>" . Field_text('body') . "</td>\n\t</tr>\t\n\t<tr>\n\t<tr>\n\t<td colspan=2 align='right'>\n\t\t<input type='button' OnClick=\"javascript:findBackuphtml();\" value='{search} »'>\n\t</td>\n\t</tr>\t\n\t</table>") . "\n\t\n\t<div id='query_list'></div>\n\t\n\t\n\t\n\t"; $cfg["JS"][] = "js/users.backup.js"; $tpl = new template_users("{backup}", $html, 0, 0, 0, 0, $cfg); echo $tpl->web_page; }
function users_message_numbers() { $users = new usersMenus(); if ($users->AsPostfixAdministrator) { $b = new backup_email(); } else { $b = new backup_email($_SESSION["ou"]); } $messagenumber = $b->MessageNumber(); echo $messagenumber; }
function delete_rule() { $ou = $_GET["ou"]; $bck = new backup_email($ou); unset($bck->ArticaBackupRules[$_GET["ArticaBackupDeleteRule"]]); $bck->SaveToLdap(); }