function popup() { $add = iconTable("64-plus.png", '{add_new_fetchmail_rule}', '{add_new_fetchmail_rule_text}', "EditRuleFetchmail('');"); $users = new usersMenus(); $AllowFetchMails = $users->AllowFetchMails; if (!$AllowFetchMails) { $add = iconTable("64-plus.png", '{add_new_fetchmail_rule}', '{ERROR_NO_PRIVILEGES_OR_PLUGIN_DISABLED}', "blur()"); } $tpl = new templates(); echo $tpl->_ENGINE_parse_body("\n\t<table class=table_form>\n\t<tr>\n\t<td valign='top'>\n\t\t<div id='fetch_rules'>" . ruleslist() . "</div>\n\t</td>\n\t<td valign='top'>{$add}\n\t</td>\n\t</tr>\n\t</table>\n\t\n\t"); }
function Xapian() { $sock = new sockets(); $users = new usersMenus(); $EnableSambaXapian = $sock->GET_INFO('EnableSambaXapian'); if ($EnableSambaXapian == null) { $EnableSambaXapian = 1; } if (!$users->XAPIAN_PHP_INSTALLED) { $EnableSambaXapian = 0; } if ($EnableSambaXapian == 0) { return null; } $uri = "https://{$_SERVER['SERVER_NAME']}/exec.OpenSearch.php"; $icon1 = iconTable('find-documents-64.png', '{find_documents}', '{find_documents_xapian_text}', "Loadjs('xapian.php')", null, 210, null, 0, true); $icon2 = iconTable('loupe-64.png', '{search_connector}', '{add_search_connector_text}', "s_PopUp('{$uri}',800,800)", null, 210, null, 0, true); return $icon1 . $icon2; }
function mailman_sites() { $users = new usersMenus(); if (is_object($GLOBALS["CLASS_USER"])) { $user = $GLOBALS["CLASS_USER"]; } else { $user = new user($_SESSION["uid"]); } $mailman = new mailman_control($user->ou); $sock = new sockets(); $ApacheGroupWarePort = $sock->GET_INFO("ApacheGroupWarePort"); if (!$users->MAILMAN_INSTALLED) { return null; } if ($sock->GET_INFO('MailManEnabled') != 1) { return null; } $array = $mailman->GetLists_array(); if (!is_array($array)) { return null; } $text = "<table>"; while (list($liste, $www) = each($array)) { $text = $text . "\n\t\t\t<tr>\n\t\t\t\t<td width=1%><img src='img/3.gif'></td>\n\t\t\t\t<td><span OnClick=\"javascript:s_PopUp('http://{$www}:{$ApacheGroupWarePort}/',1024,800);\" style='color:black;text-decoration:underline'>{$liste} ({$www})</span></td>\n\t\t\t</tr>"; } $html = iconTable("", "{your_distributions_lists}", "{$text}</table>"); $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }
header("Location: session-fermee.php"); die; } if (isset($_GET["config-js"])) { config_js(); exit; } if (isset($_GET["config-popup"])) { config_popup(); exit; } $tpl = new templates(); $page = CurrentPageName(); //users.openvpn.index.php $downloadvinvin = iconTable("download-64.png", "{DOWNLOAD_OPENVPN_CLIENT}", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}", "s_PopUp('http://www.artica.fr/download/openvpn-2.0.9-gui-1.0.3-install.exe')", "{DOWNLOAD_OPENVPN_CLIENT_TEXT}"); $build = iconTable("user-config-download-64.png", "{DOWNLOAD_CONFIG_FILES}", "{DOWNLOAD_CONFIG_FILES_TEXT}", "Loadjs('{$page}?config-js=yes')", "{DOWNLOAD_CONFIG_FILES}"); $html = "\n<H2>{WELCOME_USER_OPENVPN}</H2>\n<table class=table_form>\n<tr>\n<td valign='top'>\n\t\t<table style='width:95%'>\n\t\t\t<tr>\n\t\t\t\t<td>{$downloadvinvin}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>{$build}</td>\n\t\t\t</tr>\n\t\t</table>\n</td>\n</tr>\n</table>\n\n\n"; echo $tpl->_ENGINE_parse_body($html); function config_js() { $page = CurrentPageName(); $tpl = new templates(); $title = $tpl->_ENGINE_parse_body('{DOWNLOAD_CONFIG_FILES}'); $html = "YahooWin('600','{$page}?config-popup=yes','{$title}');"; echo $html; } function config_popup() { $vpn = new openvpn(); $config = $vpn->BuildClientconf($_SESSION["uid"]); $tbconfig = explode("\n", $config);
function page() { $ldap = new clladp(); $users = new usersMenus(); $sock = new sockets(); $page = CurrentPageName(); $allmails = table_allmails(); $block1 = iconTable("canonical-64.png", "{sender_canonical}", '{sender_canonical_text}', "Loadjs('sender.settings.php')"); if (IS_DISCLAIMER()) { $block4 = iconTable("64-templates.png", "{disclaimer_tiny}", '{user_disclaimer_explain}', "s_PopUp('{$page}?disclaimer=yes',800,800)"); } if (IS_ARTICA_FILTER()) { $block5 = iconTable("64-templates.png", "{vacation_message}", '{menu_OUT_OF_OFFICE_text}', "s_PopUp('vacation.php',800,600)"); } if ($users->AllowFetchMails) { $block2 = iconTable("fetchmail-rule-64.png", "{APP_FETCHMAIL}", '{user_fetchmail_explain}', "Loadjs('user.fetchmail.php')"); if ($users->imapsync_installed) { $block6 = Paragraphe("sync-64.png", "{import_mailbox}", "{export_mailbox_text}", "javascript:Loadjs('mailsync.php?uid={$_SESSION["uid"]}')"); } } if ($users->MAILMAN_INSTALLED) { if ($sock->GET_INFO('MailManEnabled') == 1) { if ($users->AsMailManAdministrator) { $block3 = iconTable("mailman-64.png", "{APP_MAILMAN}", '{user_mailman_explain}', "Loadjs('mailman.lists.php')"); } } } if ($users->cyrus_imapd_installed) { if (!$users->ZARAFA_INSTALLED) { if ($users->spamassassin_installed) { $block7 = iconTable("anti-spam-learning.png", '{EnableUserSpamLearning}', '{EnableUserSpamLearning_text}', "Loadjs('domains.edit.user.sa.learn.php?uid={$_SESSION["uid"]}');"); } $block8 = iconTable("poubelle-64.png", '{empty_your_mailbox}', '{empty_this_mailbox_text}', "Loadjs('domains.edit.user.empty.mailbox.php?userid={$_SESSION["uid"]}');"); } } //$block2=iconTable("canonical-64.png","{sender_canonical}",'{sender_canonical_text}'); $html = "\n\t<h1>{messaging}</H1>\n\t<table class=form style='width:99%'>\n\t<tr>\n\t\t<td widh=50% valign='top'>\n\t\t<div id='table_all_mails'>\n\t\t\t{$allmails}\n\t\t</div>\n\t\t</td>\n\t\t<td valign='top' style=''>\n\t\t\t{$block1}\n\t\t\t{$block2}\n\t\t\t{$block3}\n\t\t\t{$block8}\n\t\t</td>\n\t\t<td valign='top' style=''>\n\t\t{$block4}\n\t\t{$block5}\n\t\t{$block6}\n\t\t{$block7}\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function mldonkey_status() { $users = new usersMenus(); $tpl = new templates(); $sock = new sockets(); if (!$users->MLDONKEY_INSTALLED) { return false; } $EnableMLDonKey = $sock->GET_INFO("EnableMLDonKey"); if ($EnableMLDonKey == null) { $EnableMLDonKey = 1; } if ($EnableMLDonKey == 0) { return null; } include_once dirname(__FILE__) . "/ressources/class.donkey.inc"; $ml = new EmuleTelnet(); if (!$ml->UserIsActivated($_SESSION["uid"])) { return; } $array = $ml->download_queue($_SESSION["uid"]); if (!is_array($array["INFOS"]["LIST"])) { return; } $count = 0; while (list($num, $array_2) = each($array["INFOS"]["LIST"])) { $count = $count + 1; $js = "Loadjs('donkey.php');"; $color = "black"; $unit_rate = " Ko/s"; if ($array_2["RATE"] == "Paused") { $color = "red"; $unit_rate = null; } $array_2["FILE"] = wordwrap($array_2["FILE"], 30, " ", true); $html = $html . "\n\t<tr " . CellRollOver($js, $textToolTip) . ">\n\t\t<td width=1%><img src='img/forwd_18.gif'></td>\n\t\t<td><strong style='color:{$color}'>{$array_2["FILE"]}</td>\n\t\t<td width=1% style='color:{$color}'>{$array_2["POURC_ACCOMPLISH"]}%</td>\n\t\t\n\t</tr>\n\t\t\n\t\t\n\t"; } if ($count == 0) { return; } $title = "{download_list}"; $html = iconTable("", "{$title}", "{$html}"); echo $tpl->_ENGINE_parse_body($html); }
function panel_blacklists() { $ID = $_GET["RuleID"]; $categories = iconTable("64-categories.png", "{categories}", "{dansguardian_blacklist_users_categories}", "Loadjs('dansguardian.categories.php?rule_main={$ID}&rule-name={$rulename_encrypted}')", null, $psize); $weightedphraselist = iconTable("64-weight-phrases.png", "{weightedphraselist}", '{weightedphraselist_text}', "Loadjs('dansguardian.weight-phrases.php?rule_main={$ID}')", '{weightedphraselist}', $psize); $bannedphraselist = iconTable("64-banned-phrases.png", "{bannedphraselist}", '{bannedphraselist_explain}', "Loadjs('dansguardian.banned-phrases.php?rule_main={$ID}')", '{bannedphraselist}', $psize); $banned_regex = iconTable("64-banned-regex.png", "{bannedregexpurllist}", '{bannedregexpurllist_explain}', "Loadjs('dansguardian.banned-regex-purlist.php?rule_main={$ID}')", '{bannedregexpurllist}', $psize); $personal_categories = iconTable("64-categories-personnal.png", "{personal_categories}", '{personal_categories_text}', "Loadjs('dansguardian.categories.personnal.php?rule_main={$ID}','{personal_categories}')", '{personal_categories}', $psize); $html = "\n<table style='width:100%'>\n<tr>\n\t<td valign='top'>{$categories}</td>\n\t<td valign='top'>{$personal_categories} </td>\n</tr>\n<tr>\n\t<td valign='top'>{$bannedphraselist}</td>\n\t<td valign='top'>{$weightedphraselist} </td>\n</tr>\n<tr>\n\t<td valign='top'>{$banned_regex}</td>\n\t<td valign='top'> </td>\n</tr>\n\n\n</table>\n\n"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html, "dansguardian.index.php"); }