function INDEX() { $ldap = new clladp(); $ou = $_GET["ou"]; $Hash_datas = $ldap->OUDatas($ou); $h_type = array("spam" => "spam", "ham" => "ham"); $domains1 = $ldap->hash_get_domains_ou($ou); $domainsF1 = Field_array_Hash($domains1, 'bogo_spam_domain', null, null, null, 0, 'width:150px'); $type = Field_array_Hash($h_type, 'bogo_type', null, null, null, 0, 'width:100px'); $hash_action = array("delete" => "{bogo_delete}", "quarantine" => "{bogo_quarantine}", "prepend" => "{bogo_prepend}"); $form_email = "\n\t<input type='hidden' id='ou' value='{$ou}'>\n\t<H5>{bogo_robots}</H5>\n\t<table style='width:100%'>\n\t<tr>\n\t<td align='right' nowrap><strong>{add_bogo_spam}:</strong></td>\n\t<td>" . Field_text('bogo_spam') . "</td>\n\t<td>{$domainsF1}</td>\n\t<td>{$type}</td>\n\t<td><input type='button' value='{add} »' OnClick=\"javascript:bogoAddSpamUser();\"></td>\n\t</tr>\n\t</table>\n\t\n\t"; for ($i = 1; $i < 10; $i++) { $h_level[$i . '0'] = $i . '0 %'; } $actions_datas = explode(';', $Hash_datas["BogoFilterAction"]); $action = "\n\t<H5>{spam_action}</H5>\n\t{spam_action_text} " . Field_array_Hash($h_level, 'exceed', $actions_datas[0], null, null, 0, 'width:60px') . " {then} " . Field_array_Hash($hash_action, 'action', $actions_datas[1], null, null, 0, 'width:160px') . "<br><br>\n\t{if_bogo_prepend} " . Field_text('bogo_prepend', $actions_datas[2], 'width:150px') . "\n\t<div style='width:100%;text-align:right'><input type='button' value='{edit} »»' OnClick=\"javascript:BogoFilterAction();\"></div>\n\t\n\t"; $area_robots = "<div id='robots'></div><script>LoadAjax('robots','{$page}?GetRobots={$ou}')</script>"; $area_robots = RoundedLightGrey($area_robots); $action = RoundedLightGrey($action); $form_email = RoundedLightGrey($form_email); $page = CurrentPageName(); $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=1%><img src='img/bg_bogofilter.jpg'></td>\n\t<td valign='top' width=99%>" . RoundedLightGreen("{bogo_intro}") . "</td>\n\t</tr>\n\t</table>\n\t{$form_email}\n\t<br>\n\t{$action}\n\t<br>\n\t{$area_robots}\n\t"; $cfg["JS"][] = "js/bogofilter.js"; $tpl = new template_users('{APP_BOGOFILTER}', $html, 0, 0, 0, 0, $cfg); echo $tpl->web_page; }
function page() { $page = CurrentPageName(); $tpl = new templates(); $title1 = $tpl->_ENGINE_parse_body('{add_email}'); $html = "\n<br><br>\n<table style='width:100%'>\n<tr>\n<td width=1% valign='top'><img src='img/bg_chess.jpg'></td>\n<td valign='top'>" . RoundedLightGreen("\n\t<H3 style='margin-bottom:0px'>{white list}</H2>\n\t<p>{white_list_text}</p>\n\t<H3 style='margin-bottom:0px'>{black list}</H2>\n\t<p>{black_list_text}</p>") . "\n</td>\n</tr>\n<td colspan=2 width=100% valign='top'>\n<div id='mailist'></div>\n</td>\n</tr>\n</table>\n<script>\nLoadAjax('mailist','{$page}?list=yes');\n\nfunction wbladd(){YahooWin(400,'{$page}?Addwbl=yes','{$title1}');}\n\nvar X_ActionWbladdForm= function (obj) {\n\tvar results=trim(obj.responseText);\n\tif(results.length>0){alert(results);}\n\tLoadAjax('mailist','{$page}?list=yes');\n\t}\n\nfunction ActionWbladdForm(){\n\tvar blw_email=document.getElementById('blw_email').value;\n\tvar blw_type=document.getElementById('blw_type').value;\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('blw_email',blw_email);\t\n\tXHR.appendData('blw_type',blw_type);\t\t\n\tXHR.sendAndLoad('{$page}', 'GET',X_ActionWbladdForm);\t\n\t}\n\t\n\t\nfunction delete_aswbl(email,type){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('delete_email',email);\t\n\tXHR.appendData('blw_type',type);\t\t\n\tXHR.sendAndLoad('{$page}', 'GET',X_ActionWbladdForm);\t\n\t}\n\n</script>\n"; $tpl = new template_users("{white list} & {black list}", $html); echo $tpl->web_page; }
function Page() { $main = new main_cf(); $page = CurrentPageName(); $intro = RoundedLightGreen('<img src="img/infowarn-64.png" align=left style="margin:3px">{send_isp_relay_text3}'); $form = "" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td>\n\t\t<H5>{servername}</H5>\n\t\t<br>\n\t\t{send_isp_relay_text2}\n\t</td>\n\t</tr>\n\t<tr>\n\t\t\t<td colspan=2>" . Field_text('isp_server_ip', $main->main_array["relayhost"]) . "</td>\n\t\t</tr>\t\n\t<tr>\n\t\t<td align='right' colspan=2><input type='button' OnClick=\"javascript:EditRelayhost();\" value='{edit} »'></td>\n\t</tr>\n\t</table>") . "\n\t<br>"; $html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' style='width:50%'>\n\n\t{$form}</td>\n\t<td valign='top'>\n\t\t" . RoundedLightGreen("<table style='width:100%'>\n\t<tr><td width=1%>" . imgtootltip('restore-on.png', '{go_back}', "MyHref('artica.wizard.php')") . "</td>\n\t<td><H5>{return_to} {artica_wizard}</H5></td>\n\t</tr></table>") . "<br>" . applysettings("postfix") . "<br>{$intro}</td>\n\t</tr>\n\t</table>"; $cfg["LANG_FILE"] = "artica.wizard.php"; $cfg["JS"][] = "js/postfix-sasl.js"; $tpl = new template_users('{send_isp_relay}', $html, 0, 0, 0, 0, $cfg); echo $tpl->web_page; }
function postfix_sasl() { $conf = new main_cf(); $enable_sasl = Field_yesno_checkbox_img('smtpd_sasl_auth_enable', $conf->main_array["smtpd_sasl_auth_enable"], '{enable_disable}'); $smtpd_sasl_authenticated_header = Field_yesno_checkbox_img('smtpd_sasl_authenticated_header', $conf->main_array["smtpd_sasl_authenticated_header"], '{enable_disable}'); $smtp_sender_dependent_authentication = Field_yesno_checkbox_img('smtp_sender_dependent_authentication', $conf->main_array["smtp_sender_dependent_authentication"], '{enable_disable}'); $html = "\n\t\t<form name='sasl'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td width=40% valign='top'>" . RoundedLightBlue("\n\t\t<div style='padding:5px;font-size:11px;'>\n\t\t<img src=\"img/infowarn-64.png\" align=left style=\"margin:3px\">{sasl_intro}</div>") . "\n\t\t</td>\n\t\t<td width='60%' valign='top'>\n\t" . RoundedLightGreen("\n\t\t<table style='width:100%;padding:5px'>\n\t\t\t<tr>\n\t\t\t<td width=1% align='center'>{$enable_sasl}</td>\n\t\t\t<td><strong>{smtpd_sasl_auth_enable}</strong>\n\t\t\t</tr>\n\t\t\t<td width=1% align='center'>{$smtpd_sasl_authenticated_header}</td>\n\t\t\t<td><strong>{smtpd_sasl_authenticated_header}</strong>\n\t\t\t</tr>\n\t\t\t</tr>\n\t\t\t<td width=1% align='center' valign='top'>{$smtp_sender_dependent_authentication}</td>\n\t\t\t<td><strong>{smtp_sender_dependent_authentication}</strong><div class=caption>{smtp_sender_dependent_authentication_text}</div>\n\t\t\t</tr>\t\t\t\n\t\t\t<tr>\n\t\t\t<td colspan=2 align='right'><input type='button' value='{apply} »' OnClick=\"javascript:SaveEnableSasl();\"></td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\t<br><br><br>") . "</td></tr></table></form>"; $page = otherinfo(); $js["JS"][] = 'js/postfix-sasl.js'; $tplusr = new template_users('{sasl_title}', "{$html}<br><div id='infos'>{$page}</div>", 0, 0, 0, 0, $js); echo $tplusr->web_page; }
function Page() { $main = new main_cf(); $smtp_sasl_auth_enable = $main->main_array["smtp_sasl_auth_enable"]; $page = CurrentPageName(); $intro = applysettings("postfix") . RoundedLightBlue('<p style="text-align:justify;"><img src="img/infowarn-64.png" align=left style="margin:3px">{smtp_sasl_auth_enable_text}</p>'); $intro = $intro . "<br>" . "" . "<script>LoadAjax('sasllist','{$page}?loadsaslList=yes');</script>"; $form = "" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>" . Field_yesno_checkbox_img('smtp_sasl_auth_enable', $smtp_sasl_auth_enable, '{enable_disable}') . "</td>\n\t<td>\n\t\t<H5>{smtp_sasl_auth_enable}</H5>\n\t\t<br>\n\t\t{smtp_sasl_auth_enable_text2}\n\t</td>\n\t</tr>\n\t<tr>\n\t\t<td align='right' colspan=2><input type='button' OnClick=\"javascript:EditSasl();\" value='{apply} »'></td>\n\t</tr>\n\t</table>") . "\n\t<br>\n\t" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'><img src='img/klakcon_285.png'></td>\n\t<td>\n\t\t<H5>{add_credentials}</H5>\n\t<br>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td colspan=2><strong>{isp_server_name}:</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td colspan=2>" . Field_text('isp_server_name', null) . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td width=1% nowrap align='right'><strong>{username}:</strong></td>\n\t\t\t<td>" . Field_text('username', null) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t<td align='right'><strong>{password}:</strong></td>\n\t\t\t<td>" . Field_text('password', null) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=2 align='right'><input type='button' value='{add} »' OnClick=\"javascript:sasl_add_isp_relay();\">\n\t\t</tr>\t\t\t\n\t\t</table>\n\t</td>\n\t</tr>\n\t</table>") . "<br>" . RoundedLightGrey("<H5>{table}</H5><div id='sasllist'></div>"); $html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=50%>\t\n\t{$form}</td>\n\t<td valign='top' width=50%>" . RoundedLightGreen("<table style='width:100%'>\n\t<tr><td width=1%>" . imgtootltip('restore-on.png', '{go_back}', "MyHref('artica.wizard.php')") . "</td>\n\t<td><H5>{return_to} {artica_wizard}</H5></td>\n\t</tr></table>") . "<br>{$intro}</td>\n\t</tr>\n\t</table>"; $cfg["LANG_FILE"] = "artica.wizard.php"; $cfg["JS"][] = "js/postfix-sasl.js"; $tpl = new template_users('{send_to_isp}', $html, 0, 0, 0, 0, $cfg); echo $tpl->web_page; }
function Status() { $kav = new kav4mailservers(); $linkPattern = texttooltip($kav->pattern_date, '{time_date_com_text_moscow}', 'http://www.timeanddate.com/worldclock/city.html?n=166'); $page = CurrentPageName(); if ($kav->pid == null) { $img1 = "status_critical.gif"; } else { $img1 = "status_ok.gif"; } $status = RoundedLightGreen("\n<H4>Status</H4>\n<table style='width:100%'>\n<tr>\n\t<td valign='top'align='center'><img src='img/{$img1}'></td>\n\t<td align=right valign='top' ><strong>{use_pid}:</strong></td>\n\t<td valign='top'>{$kav->pid}</td>\n</tr>\n<tr>\n\t<td valign='top' align='center'><img src='img/{$img1}'></td>\n\t<td align=right valign='top'><strong>{memory}:</strong></td>\n\t<td valign='top'>{$kav->memory} mb</td>\n</tr>\n\n<tr>\n\t<td valign='top' align='center'><img src='img/icon_info.gif'></td>\n\t<td align=right valign='top'><strong>{version}:</strong></td>\n\t<td valign='top'>{$kav->version}</td>\n</tr>\n<tr>\n<td valign='top' align='center'><img src='img/icon_info.gif'></td>\n<td nowrap align=right valign='top'><strong>{pattern_ver}:</strong></td>\n<td><strong>{$linkPattern}</strong></td>\n\n</tr>\n<tr><td colspan=3 align='right'>" . imgtootltip('icon_refresh-20.gif', '{refresh}', "LoadAjax('servinfos','{$page}?Status=yes');") . "</td></tr>\n</table>"); $tpl = new templates(); echo $tpl->_ENGINE_parse_body($status); }
function PageAveServerUpdateConfig() { $yum = new usersMenus(); $tpl = new templates(); if ($yum->AsPostfixAdministrator == false) { return $tpl->_ENGINE_parse_body("<h3>{not allowed}</H3>"); } include_once dirname(__FILE__) . '/ressources/kav4mailservers.inc'; $kav = new kav4mailservers(1); $array_conf = $kav->array_conf["updater.options"]; $cron = $kav->CronTask(); $UseUpdateServerUrl = Field_yesno_checkbox_img('UseUpdateServerUrl', $array_conf["UseUpdateServerUrl"]); $UseUpdateServerUrlOnly = Field_yesno_checkbox_img('UseUpdateServerUrlOnly', $array_conf["UseUpdateServerUrlOnly"]); $PassiveFtp = Field_yesno_checkbox_img('PassiveFtp', $array_conf["PassiveFtp"]); $html = "\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td valign='top'><img src='img/bg_download.jpg'></td>\n\t\t<td valign='top'>\n\t\t" . RoundedLightGreen("<strong>{schedule}:« {$cron} »</strong>") . "<br>" . RoundedLightGrey("<form name=ffmupdate>\n\t\t<input type='hidden' value='{$array_conf["PostUpdateCmd"]}' name='PostUpdateCmd'>\n\t\t<H4>{keepup2date settings}</H4>\n\t\t<table>\n\t\t<tr>\n\t\t<td>{$UseUpdateServerUrl}</td>\n\t\t<td align='left' nowrap>{UseUpdateServerUrl}</td>\n\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t<td>{$UseUpdateServerUrlOnly}</td>\n\t\t<td align='left'>{UseUpdateServerUrlOnly}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td>{$PassiveFtp}</td>\n\t\t<td align='left'>{PassiveFtp}</td>\n\t\t</tr>\t\t\t\n\t\t</table>\n\t\t<table>\n\t\t<tr>\n\t\t<td align='right' nowrap>{UpdateServerUrl}:</td>\n\t\t<td align='left'>" . Field_text('UpdateServerUrl', $array_conf["UpdateServerUrl"]) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right'>{ProxyAddress}:</td>\n\t\t<td align='left'>" . Field_text('ProxyAddress', $array_conf["ProxyAddress"]) . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right'>{ConnectTimeout}:</td>\n\t\t<td align='left'>" . Field_text('ConnectTimeout', $array_conf["ConnectTimeout"], '') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:ParseForm('ffmupdate','users.kav.php',true);\" value='{submit} »'></td>\n\t\t</tr>\n\t\t</table>\n\t\t</form>") . "<br>\n\n\t\t\n\t\t\t\n\t\t<br>\n\t\t</td>\n\t\t</tr>\n\t\t<tr><td align='center' colspan=2><input type='button' OnClick=\"javascript:KavUpdates()\" value='« {update_now} »'></td></tr>\n\t\t<tr><td colspan=2>" . UpdatesError() . UpdatesSuccess() . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t"; return $tpl->_ENGINE_parse_body($html); }
function squid_booster_smp($encoded) { $sock = new sockets(); $array = unserialize(base64_decode($encoded)); if (!is_array($array)) { return; } if (count($array) == 0) { return; } $html[] = "\n\t\t\t<div style='min-height:115px'>\n\t\t\t<table>\n\t\t\t<tr><td colspan=2 style='font-size:14px;font-weight:bold'>Cache(s) Booster</td></tr>\n\t\t\t"; while (list($proc, $pourc) = each($array)) { $html[] = "<tr>\n\t\t<td width=1% nowrap style='font-size:13px;font-weight:bold'>Proc #{$proc}</td><td width=1% nowrap>" . pourcentage($pourc) . "</td></tr>"; } $html[] = "</table></div>"; return RoundedLightGreen(@implode("\n", $html)); }
function INDEX() { if (!isset($_GET["ou"])) { header('location:domains.index.php'); exit; } $page = CurrentPageName(); $ou = $_GET["ou"]; $ldap = new clladp(); $country = CountriesList(); $array = array("delete" => "{delete_mail}", "quarantine" => "{quarantine}"); $action = Field_array_Hash($array, 'action', null); $form = "<table style='width:60%'>\n\t\n\t<tr>\n\t<td align='right'><strong>{countries}:</strong></td>\n\t<td>{$country}</td>\n\t</tr>\n\t<td align='right'><strong>{action}:</strong>\n\t<td>{$action}</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><input type='button' value='{add} »' OnClick=\"javascript:AddDenyCountry();\"></td>\n\t</tr>\n\t</table>\n\t\n\t"; $form = RoundedLightGreen($form); $html = "\n\t<input type='hidden' name='ou' value='{$ou}' id='ou'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1%><img src='img/bg_deny-country.jpg'></td>\n\t<td width=99% valign='top'><p class='caption'>{deny_country_explain}</caption></td>\n\t</tr>\n\t</table>\n{$form}\n\t<div id='CountryList'></div>\n\t\n\t\n\t<script>LoadAjax('CountryList','{$page}?LoadDenyCountries={$ou}');</script>\n\t"; $cfg["JS"][] = "js/denycountries.ou.js"; $tpl = new template_users('{deny_countries}', $html, 0, 0, 0, 0, $cfg); echo $tpl->web_page; }
function PageSystem_interfaces() { $tpl = new templates(); $sys = new systeminfos(); if (!is_array($sys->array_ip)) { return $tpl->_ENGINE_parse_body('{system error} line' . __LINE__); } while (list($num, $val) = each($sys->array_ip)) { $ip = $ip . "<tr>\n\t\t<td width=1%><img src='img/nic-table.jpg'></td>\n\t\t<td width=1%>{$num}</td>\n\t\t<td>{$val["MAC"]}</td>\n\t\t<td >{$val["IP"]}</td>\n\t\t</tr>"; } if (is_array($sys->array_dns_servers)) { while (list($num, $val) = each($sys->array_dns_servers)) { $count = $count + 1; $dns = $dns . "<tr>\n\t\t<td width=1%><img src='img/nic-table.jpg'></td>\n\t\t<td width=50%>{dns_server} {$count}</td>\n\t\t<td width=49%>{$val}</td>\n\t\t</tr>"; } } $html = "<table style='width:600px' align=center>\n<tr>\n<td valign='top'>\n\t<img src='img/150-nic.jpg'>\n\t<table style='width:100%;margin-top:5px'>\n\t<tr>\n\t<td valign='top' >" . Paragraphe('folder-equerre-64.jpg', '{nic_static_dns}', '{nic_static_dns_text}', 'system.nic.staticdns.php') . "</td>\n\t</tr>\n\t<tr>\n\t<td valign='top' >" . Paragraphe('64-ip-settings.png', '{net_settings}', '{net_settings_text}', 'system.nic.config.php') . "</td>\n\t</tr>\t\n\t\n\t\n\t\n\t</table>\n\t\n</td>\n<td valign='top'>\t\n" . RoundedLightGrey("\n\t<h5>{nic_interfaces}</H5>\n\t\t<table style='width:70%' align='center'>\n\t\t{$ip}\n\t\t</table>\n\t") . "<br>" . RoundedLightGreen("\n\t<h5>{dns_servers}</H5>\n\t\t<table style='width:70%' align='center'>\n\t\t{$dns}\n\t\t</table>\t\t\n\t\t") . "\n\t</td>\n\t</tr>\n\t</table>"; return $tpl->_ENGINE_parse_body($html); }
function INDEX() { if (!isset($_GET["ou"])) { header('location:domains.index.php'); exit; } $page = CurrentPageName(); $ou = $_GET["ou"]; $ldap = new clladp(); $hash = $ldap->OUDatas($_GET["ou"]); $rbl = RblForm(); $array = array("delete" => "{delete_mail}", "quarantine" => "{quarantine}", "pass" => "{pass}"); $action = Field_array_Hash($array, 'action', $hash["SURBLServersAction"]); $form = "<table style='width:60%'>\n\t<td align='right' nowrap><strong>{action_100_pourc}:</strong>\n\t<td>{$action}</td>\n\t<td align='right'><input type='button' value='{apply} »' OnClick=\"javascript:EditActionSURbl();\"></td>\n\t</tr>\n\t<tr>\n\t<td align='right'><strong>{rbl_servers}:</strong></td>\n\t<td>{$rbl}</td>\n\t<td align='right'><input type='button' value='{add} »' OnClick=\"javascript:AddSurblServer();\"></td>\n\t</tr>\n\t</table>\n\t\n\t"; $form = RoundedLightGreen($form); $html = "\n\t<input type='hidden' name='ou' value='{$ou}' id='ou'>\n\t<p class='caption'>{surbl_explain}</p>\n\t{$form}\n\t<div id='rbl-list'></div>\n\t\n\t\n\t<script>LoadAjax('rbl-list','{$page}?rbl-list={$ou}');</script>\n\t"; $cfg["JS"][] = "js/denycountries.ou.js"; $tpl = new template_users('{surbl_rules}', $html, 0, 0, 0, 0, $cfg); echo $tpl->web_page; }
function main_status() { $users = new usersMenus(); $tpl = new templates(); $ini = new Bs_IniHandler(); $sock = new sockets(); $key_service = "DKIM_FILTER"; $ini->loadString($sock->getfile('dkimstatus', $_GET["hostname"])); if ($ini->_params["{$key_service}"]["running"] == 0) { $img = "okdanger32.png"; $rouage = 'rouage_on.png'; $status = "{stopped}"; } else { $img = "ok32.png"; $status = "running"; } $status1 = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<img src='img/{$img}'>\n\t</td>\n\t<td valign='top'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td align='right' nowrap><strong>{{$ini->_params["{$key_service}"]["service_name"]}}:</strong></td>\n\t\t<td><strong>{$status}</strong></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td align='right'><strong>{pid}:</strong></td>\n\t\t<td><strong>{$ini->_params["{$key_service}"]["master_pid"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{memory}:</strong></td>\n\t\t<td nowrap><strong>{$ini->_params["{$key_service}"]["master_memory"]} kb</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{version}:</strong></td>\n\t\t<td><strong>{$ini->_params["{$key_service}"]["master_version"]}</strong></td>\n\t\t</tr>\t\t\t\t\n\t\t<tr><td colspan=2>{$error}</td></tr>\t\n\t\t<tr><td colspan=2> </td></tr>\t\n\t\t\n\t\t</table>\t\t\n\t</td>\n\t</tr>\n\t</table>"; $status1 = RoundedLightGreen($status1); return $tpl->_ENGINE_parse_body($status1); }
function INDEX() { if (!isset($_GET["ou"])) { header('location:domains.index.php'); exit; } $page = CurrentPageName(); $ou = $_GET["ou"]; $ldap = new clladp(); $hash = $ldap->OUDatas($ou); $ArticaFakedMailFrom_table = array("pass" => '{pass}', "quarantine" => "{quarantine}", "delete" => "{delete}"); $ArticaFakedMailFrom_field = Field_array_Hash($ArticaFakedMailFrom_table, "ArticaFakedMailFrom", $hash["ArticaFakedMailFrom"], null, null, null, 'width:100px'); $ArticaDenyNoMXRecords_table = array('pass' => '{pass}', "reject" => "{reject}"); $ArticaDenyNoMXRecords_field = Field_array_Hash($ArticaDenyNoMXRecords_table, "ArticaDenyNoMXRecords", $hash["ArticaDenyNoMXRecords"], null, null, null, 'width:100px'); $ArticaOuTrustMyUSers_field = Field_yesno_checkbox_img('OuTrustMyUSers', $hash["OuTrustMyUSers"], '{enable_disable}'); $ArticaOuTrustMyUSers = "<H5>{trust_users}</H5>\n\t<div class=caption>{trust_users_text}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='right' valign='top' nowrap><strong>{trust_users}</strong></td>\n\t\t<td align='left' valign='top'>{$ArticaOuTrustMyUSers_field}</td>\n\t\t\n\t</tr>\t\n\t</table>\n\t\n\t"; $ArticaOuTrustMyUSers = RoundedLightGreen($ArticaOuTrustMyUSers); $html = "\n\t<form name='FFMQ'>\n\t<table style='width:100%;'>\n\t<tr>\n\t\t<td width=50% valign='top' style='margin:4px;padding:4px'>\n\t<input type='hidden' name='ou' value='{$ou}'>\n\t" . RoundedLightGrey("<H5>{ArticaFakedMailFrom}</H5>\n\t<div class=caption>{ArticaFakedMailFrom_text}</div>\n\t<table style='width:90%;border:1px solid #CCCCCC;padding:5px;margin:5px'>\n\t<tr>\n\t\t<td align='right' valign='top' nowrap><strong>{ArticaFakedMailFrom}</strong></td>\n\t\t<td align='left' valign='top'>{$ArticaFakedMailFrom_field}</td>\n\t\t\n\t</tr>\n\t</table>") . "</td>\n\t\n\t\n\t<td width=50% valign='top' style='margin:4px;padding:4px'>" . RoundedLightGrey("\n\t<H5>{ArticaDenyNoMXRecords}</H5>\n\t<div class=caption>{ArticaDenyNoMXRecords_text}</div>\n\t<table style='width:90%;border:1px solid #CCCCCC;padding:5px;margin:5px'>\n\t<tr>\n\t\t<td align='right' valign='top' nowrap><strong>{ArticaDenyNoMXRecords}</strong></td>\n\t\t<td align='left' valign='top'>{$ArticaDenyNoMXRecords_field}</td>\n\t\t\n\t</tr>\t\n\t</table>\n\t") . "\n\t<br>\n\t{$ArticaOuTrustMyUSers}\n\t</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right' style='border-top:1px solid #CCCCCC'><input type='submit' value='{apply} »' style='width:150px'></td>\n\t</tr>\n\t</table>\n\t</form>"; $cfg["JS"][] = "js/quarantine.ou.js"; $tpl = new template_users('{artica_filters_rules}', $html, 0, 0, 0, 0, $cfg); echo $tpl->web_page; }
function warn_dnsmasq() { $users = new usersMenus(); if ($users->dnsmasq_installed == false) { $warn_dnsmasq = "\n\t\n\t<table style='width:90%;margin:5px;padding:5px'>\n\t\t<tr>\n\t\t\t\n\t\t\t<td align='left'>\n\t\t\t<img src='img/idee-64.png' align='left' style='margin:4px'><H5>{UseDNSMasq}</H5>\n\t\t\t<div class=caption colspan=2>{UseDNSMasq_text}</div>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>"; return RoundedLightGreen($warn_dnsmasq); } }
function main_status() { $users = new usersMenus(); if ($_GET["hostname"] == null) { $hostname = $users->hostname; $_GET["hostname"] = $hostname; } else { $hostname = $_GET["hostname"]; } $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?cyrus-imap-status=yes'))); if ($ini->_params["CYRUSIMAP"]["running"] == 0) { $img = "okdanger32.png"; $status = "{stopped}"; } else { $img = "ok32.png"; $status = "running"; } $v = 'Mb'; $size = round($ini->_params["CYRUSIMAP"]["partition_size"] / 1000, 2); if ($size > 1000) { $size = round($size / 1000, 2); $v = 'Go'; } $status = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<img src='img/{$img}'>\n\t</td>\n\t<td valign='top'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td align='right' nowrap><strong>{APP_CYRUS_IMAP}:</strong></td>\n\t\t<td><strong>{$status}</strong></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td align='right'><strong>{pid}:</strong></td>\n\t\t<td><strong>{$ini->_params["CYRUSIMAP"]["master_pid"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{memory}:</strong></td>\n\t\t<td nowrap><strong>{$ini->_params["CYRUSIMAP"]["master_memory"]} mb</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{version}:</strong></td>\n\t\t<td><strong>{$ini->_params["CYRUSIMAP"]["master_version"]}</strong></td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right'><strong>{mailbox_size}:</strong></td>\n\t\t<td><strong>{$size} {$v}</td>\n\t\t</tr>\t\t\t\t\t\n\t\t<tr><td colspan=2>{$error}</td></tr>\t\n\t\t<tr><td colspan=2> </td></tr>\t\n\t\t\n\t\t</table>\t\t\n\t</td>\n\t</tr>\n\t</table>"; $status = RoundedLightGreen($status); $status_serv = RoundedLightGrey(Paragraphe($rouage, $rouage_title . " (squid)", $rouage_text, "javascript:{$js}")); $tpl = new templates(); return $tpl->_ENGINE_parse_body($status); }
function FillSenderForm_table(){ $sasl=new smtp_sasl_password_maps(); $html="<table style='width:100%'>"; while (list ($num, $val) = each ($sasl->smtp_sasl_password_hash) ){ preg_match('#(.+?):(.+)#',$val,$ath); $html=$html . "<tr> <td width=1%><img src='img/fw_bold.gif'></td> <td><strong>$num</strong></td> <td><strong>{$ath[1]}</td> </tr> "; } $html=$html . "</table>"; return RoundedLightGreen($html); }
function postfix_relay_clientcerts() { $page = CurrentPageName(); $table2 = postfix_relay_clientcerts_table(); $table1 = "\n\t<form name='postfixrelayclientcerts'>\n\t<table style='width:100%'>\n\t<tr>\n\t<td align='right'><strong style='font-size:12px'>{fingerprint}:</strong></td>\n\t<td>" . Field_text('fingerprint', null, 'width:100%') . "</td>\n\t</tr>\n\t<tr>\n\t<td align='right'><strong style='font-size:12px'>{host}</strong>:</td>\n\t<td>" . Field_text('host', null, 'width:100%') . "</td>\n\t</tr>\n\t<tr>\n\t<td colspan=2 align='right'><input type='button' value='{add} »' OnClick=\"postfix_relay_clientcerts_add();\"></td>\n\t</table>\n\t</form>"; $table1 = RoundedLightGreen($table1); $html = "\n\t<H5>{client_certificate_fingerprints}</H5>\n\t<div style='float:right;width:290px;'>{$table1}</div><p class=caption>{client_certificate_fingerprints_text}</p>\n\t<div id='postfix_relay_clientcerts'>" . postfix_relay_clientcerts_table() . "</div>\n\t"; $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }
function InstallFetchmail() { $sock = new sockets(); $logs = $sock->getfile('AUTOINSTALL:APP_FETCHMAIL'); $table = explode("\n", $logs); if (is_array($table)) { $html = "<table style='width:100%'>"; while (list($num, $ligne) = each($table)) { if ($ligne != null) { $ligne = htmlentities($ligne); $html = $html . "<tr><td style='padding:3px'><code>{$ligne}</code></td></tr>"; } } $html = $html . "</table>"; } $html = "<H5>{results}</h5>{$html}"; $tpl = new templates(); $html = RoundedLightGreen($tpl->_ENGINE_parse_body($html)); echo $html; }
function main_license() { $sock = new sockets(); $license_data = $sock->getfile('kav4proxy_license'); $license_data = htmlentities($license_data); $license_data = nl2br($license_data); $license_data = str_replace("<br />\n<br />", "<br />", $license_data); $license_data = str_replace("License info:", "<strong style='font-size:12px'>License info:</strong>", $license_data); $license_data = str_replace("Active key info:", "<strong style='font-size:12px'>Active key info:</strong>", $license_data); $license_data = str_replace("Expiration date", "<strong style='color:red'>Expiration date</strong>", $license_data); $license_data = str_replace("Kaspersky license manager for Linux", "<H6 style='margin-top:0px'>Kaspersky license manager for Linux</H6>", $license_data); $license_data = RoundedLightGreen($license_data); $add_key = $html = main_tabs() . "<br>\n\t<form name='ffm1'>\n\t<H5>{licenseproxy}</H5>\n\t<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t<div id='license_data'>\t\n\t{$license_data}\n\t</div>\n\t</td>\n\t<td valign='top'>\n\t" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td>" . Paragraphe('add-key-64.png', '{add_a_license}', '{add_a_license_text}', "javascript:kav4proxy_add_key()") . "</td>\n\t</tr>\n\t</table>") . "<br>\n\t\n\t" . RoundedLightGrey("\n\t<table style='width:100%'>\n\t<tr>\n\t<td>" . Paragraphe('shopping-cart-64.png', '{by_a_license}', '{by_a_license_text}', "javascript:MyHref(\"http://www.kaspersky.com/buy_kaspersky_security_internet_gateway\")") . "</td>\n\t</tr>\n\t</table>") . "<br>\n\t\n\t</td>\n\t</tr>\n\t</table>\n\t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html, 'milter.index.php'); }
function main_acls_add_rule_type($acl_type = null) { $page = CurrentPageName(); if (isset($_GET["SquidSelectAcl"])) { $acl_type = $_GET["SquidSelectAcl"]; } $html = "<br>" . RoundedLightGrey("<table style='width:100%'>\n\t<tr>\n\t\t<td nowrap><strong>{give_value}:</strong></td>\n\t\t<td>" . Field_text('acl_value') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:SquidAddAcl();\" value=' {add} »'></td>\n\t</tr>\n\t\n\t</table>"); $html = $html . "<br>" . RoundedLightGreen("\n\t\n\t<strong style='font-size:11px'>{acl_{$acl_type}_title}</strong><br>\n\t<div>{acl_{$acl_type}_text}</div>"); $tpl = new templates(); return $tpl->_ENGINE_parse_body($html); }
function squid_info_status(){ $sock=new sockets(); $tpl=new templates(); $page=CurrentPageName(); $cachefile="/usr/share/artica-postfix/ressources/logs/web/SQUID_MGR_INFO.DB"; if(!is_file($cachefile)){return;} $array=unserialize(@file_get_contents($cachefile)); if(count($array)<3){return;} $TOTAL_REQUESTS=FormatNumber($array["TOTAL_REQUESTS"]); $AVERAGE_REQUESTS=FormatNumber(round($array["AVERAGE_REQUESTS"]/60))."/s"; $ALL_CACHES=FormatBytes($array["ALL_CACHES"]); $ALL_CACHES_PERC=$array["ALL_CACHES_PERC"]; $MEM_POURC=$array["MEM_POURC"]; $CPU_PERC=$array["CPU_PERC"]; $html=" <div style='min-height:191px'> <table style='width:100%'> <tr> <td style='font-weight:bold;font-size:12px' align='right'>{running}:</td> <td style='font-weight:bold;font-size:12px'>{since} {$array["D"]}</td> </tr> <tr> <td style='font-weight:bold;font-size:12px' align='right'>{total_requests}:</td> <td style='font-weight:bold;font-size:12px'>$TOTAL_REQUESTS ($AVERAGE_REQUESTS)</td> </tr> <tr> <td style='font-weight:bold;font-size:12px' align='right' nowrap>{caches}:</td> <td style='font-weight:bold;font-size:12px'>$ALL_CACHES</td> </tr> <tr> <td> </td> <td>". pourcentage($ALL_CACHES_PERC)."</td> </tr> <tr> <td style='font-weight:bold;font-size:12px' align='right' nowrap>{memory_cache}:</td> <td style='font-weight:bold;font-size:12px'>$MEM_POURC%</td> </tr> <tr> <td> </td> <td>". pourcentage($MEM_POURC)."</td> </tr> <tr> <td style='font-weight:bold;font-size:12px' align='right' nowrap>{cpu}:</td> <td style='font-weight:bold;font-size:12px'>$CPU_PERC</td> </tr> <tr> <td> </td> <td>". pourcentage($CPU_PERC)."</td> </tr> </table> <div style='text-align:right'><i style='text-align:right;font-size:11px'>{report}: {since} ". distanceOfTimeInWords($array["F"],time())."</i></div> <div style='text-align:right'>". imgtootltip("20-refresh.png","{refresh}","LoadAjaxTiny('squid-info-status','$page?squid-info-status=yes');")."</div> </div>"; echo RoundedLightGreen($tpl->_ENGINE_parse_body($html)); }
function page_status() { $p = new usersMenus(); $users = new usersMenus(); $socks = new sockets(); $ini = new Bs_IniHandler(); $ini->loadString($socks->getfile('mailfromd_status')); if (!is_array($ini->_params)) { return null; } if ($ini->_params["MAILFROMD"]["running"] == 0) { $img = "okdanger32.png"; $rouage = 'rouage_on.png'; $rouage_title = '{start_service}'; $rouage_text = '{start_service_text}'; $error = ""; $status = "{stopped}"; } else { $img = "ok32.png"; $status = "running"; $rouage = 'rouage_off.png'; $rouage_title = '{stop_service}'; $rouage_text = '{stop_service_text}'; } $status = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<img src='img/{$img}'>\n\t</td>\n\t<td valign='top'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td align='right' nowrap><strong>{APP_MAILFROMD}:</strong></td>\n\t\t<td><strong>{$status}</strong></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td align='right'><strong>{pid}:</strong></td>\n\t\t<td><strong>{$ini->_params["MAILFROMD"]["master_pid"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{memory}:</strong></td>\n\t\t<td><strong>{$ini->_params["MAILFROMD"]["master_memory"]} kb</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{version}:</strong></td>\n\t\t<td><strong>{$ini->_params["MAILFROMD"]["master_version"]}</strong></td>\n\t\t</tr>\t\n\t\t<tr><td colspan=2>{$error}</td></tr>\t\n\t\t<tr><td colspan=2> </td></tr>\t\n\t\t\n\t\t</table>\t\t\n\t</td>\n\t</tr>\n\t</table>"; $ini->loadString($socks->getfile('clamav_status')); if ($ini->_params["CLAMAV"]["running"] == 0) { $img = "okdanger32.png"; $rouage = 'rouage_on.png'; $rouage_title = '{start_service}'; $rouage_text = '{start_service_text}'; $error = ""; $serv_status = "{stopped}"; } else { $img = "ok32.png"; $serv_status = "running"; $rouage = 'rouage_off.png'; $rouage_title = '{stop_service}'; $rouage_text = '{stop_service_text}'; } $statusclam = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<img src='img/{$img}'>\n\t</td>\n\t<td valign='top'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td align='right' nowrap><strong>{APP_CLAMAV}:</strong></td>\n\t\t<td><strong>{$serv_status}</strong></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td align='right'><strong>{pid}:</strong></td>\n\t\t<td><strong>{$ini->_params["CLAMAV"]["master_pid"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{memory}:</strong></td>\n\t\t<td><strong>{$ini->_params["CLAMAV"]["master_memory"]} mb</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{version}:</strong></td>\n\t\t<td><strong>{$ini->_params["CLAMAV"]["master_version"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{pattern_version}:</strong></td>\n\t\t<td><strong>{$ini->_params["CLAMAV"]["pattern_version"]}</strong></td>\n\t\t</tr>\t\t\t\t\n\t\t<tr><td colspan=2>{$error}</td></tr>\t\n\t\t<tr><td colspan=2> </td></tr>\t\n\t\t\n\t\t</table>\t\t\n\t</td>\n\t</tr>\n\t</table>"; $ini = new Bs_IniHandler(); $ini->loadString($socks->getfile('spamassassin_status')); if ($ini->_params["SPAMASSASSIN"]["running"] == 0) { $img = "okdanger32.png"; $rouage = 'rouage_on.png'; $rouage_title = '{start_service}'; $rouage_text = '{start_service_text}'; $error = ""; $serv_status = "{stopped}"; } else { $img = "ok32.png"; $serv_status = "running"; $rouage = 'rouage_off.png'; $rouage_title = '{stop_service}'; $rouage_text = '{stop_service_text}'; } $statusspam = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<img src='img/{$img}'>\n\t</td>\n\t<td valign='top'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td align='right' nowrap><strong>{APP_SPAMASSASSIN}:</strong></td>\n\t\t<td><strong>{$serv_status}</strong></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td align='right'><strong>{pid}:</strong></td>\n\t\t<td><strong>{$ini->_params["SPAMASSASSIN"]["master_pid"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{memory}:</strong></td>\n\t\t<td><strong>{$ini->_params["SPAMASSASSIN"]["master_memory"]} mb</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{version}:</strong></td>\n\t\t<td><strong>{$ini->_params["SPAMASSASSIN"]["master_version"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{pattern_version}:</strong></td>\n\t\t<td><strong>{$ini->_params["SPAMASSASSIN"]["pattern_version"]}</strong></td>\n\t\t</tr>\t\t\t\t\n\t\t<tr><td colspan=2>{$error}</td></tr>\t\n\t\t<tr><td colspan=2> </td></tr>\t\n\t\t\n\t\t</table>\t\t\n\t</td>\n\t</tr>\n\t</table>"; $status = RoundedLightGreen($status); $statusclam = RoundedLightGreen($statusclam); $statusspam = RoundedLightGreen($statusspam); $tpl = new templates(); $html = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top' width=50% align='center'><img src='img/bg_mailfromd.png'><br>{$status}\n\t<p class=caption style='text-align:left'><br>{about}</p>\n\t</td>\n\t<td valign='top' width=50%>{$statusclam}<br>{$statusspam}</td>\n\t</tr>\n\t</table>"; echo $tpl->_ENGINE_parse_body($html); }
function AJAX_COMPTER_ALIASES_LIST($userid = null) { $computer = new computers($_GET["userid"]); $html = "<table style='width:100%'>"; while (list($num, $ligne) = each($computer->DNSCname)) { $html = $html . "\n\t\t<tr " . CellRollOver() . ">\n\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td><strong style='font-size:11px'>{$ligne}</td>\n\t\t<td width=1%>" . imgtootltip('ed_delete.gif', '{delete}', "DeletComputerAliases('{$ligne}');") . "</td>\n\t\t</tr>"; } $html = $html . "</table>"; $tpl = new templates(); return RoundedLightGreen($tpl->_ENGINE_parse_body($html)); }
function services_status(){ $page=CurrentPageName(); $tpl=new templates(); $sock=new sockets(); $users=new usersMenus(); $timefile="/usr/share/artica-postfix/ressources/databases/ZARAFA_DB_STATUS.db"; $ARRAY=unserialize(@file_get_contents($timefile)); $ttr=array(); if(isset($ARRAY["ZARAFA_INDEX"])){ if($ARRAY["ZARAFA_INDEX"]>0){ $ttr[]="<tr><td style='font-size:14px;height:42px'>{indexes_size}:</td><td style='font-size:14px;font-weight:bold'>". FormatBytes($ARRAY["ZARAFA_INDEX"]/1024)."</td></tr>"; } } if(isset($ARRAY["ZARAFA_DB"])){ if($ARRAY["ZARAFA_DB"]>0){ $ttr[]="<tr><td style='font-size:14px;height:42px'>{database_size}:</td><td style='font-size:14px;font-weight:bold'>". FormatBytes($ARRAY["ZARAFA_DB"]/1024)."</td></tr>"; } } if(isset($ARRAY["ATTACHS"])){ if($ARRAY["ATTACHS"]>0){ $ttr[]="<tr><td style='font-size:14px;height:48px'>{attachments_path}:</td><td style='font-size:14px;font-weight:bold'>". FormatBytes($ARRAY["ATTACHS"]/1024)."</td></tr>"; } } if(count($ttr)>0){ $tr[]=RoundedLightGreen("<table style='width:100%;background-color:#D5EED9;font-size:11px;line-height:auto' class='TableRemove TableMarged'>".@implode("", $ttr)."</table>"); } $array[]="APP_ZARAFA"; $array[]="APP_ZARAFA_SERVER2"; $array[]="APP_ZARAFA_DB"; $array[]="APP_ZARAFA_GATEWAY"; $array[]="APP_ZARAFA_SPOOLER"; $array[]="APP_ZARAFA_WEB"; $array[]="APP_ZARAFA_MONITOR"; $array[]="APP_ZARAFA_DAGENT"; $array[]="APP_ZARAFA_ICAL"; if($users->ZARAFA_INDEXER_INSTALLED){ $APP_ZARAFA_INDEXER=$sock->GET_INFO("EnableZarafaIndexer"); if(!is_numeric($APP_ZARAFA_INDEXER)){$APP_ZARAFA_INDEXER=0;} if($APP_ZARAFA_INDEXER==1){$array[]="APP_ZARAFA_INDEXER";} } $array[]="APP_ZARAFA_LICENSED"; if($users->ZARAFA_SEARCH_INSTALLED){ $APP_ZARAFA_SEARCH=$sock->GET_INFO("EnableZarafaSearch"); if(!is_numeric($APP_ZARAFA_SEARCH)){$APP_ZARAFA_SEARCH=0;} if($APP_ZARAFA_SEARCH==1){$array[]="APP_ZARAFA_SEARCH";} } $array[]="APP_YAFFAS"; $ini=new Bs_IniHandler(); $datas=base64_decode($sock->getFrameWork('cmd.php?zarafa-status=yes')); $ini->loadString($datas); while (list ($num, $ligne) = each ($array) ){ $tr[]=DAEMON_STATUS_ROUND($ligne,$ini,null,1); } $tables[]="<div style='width:98%' class=form>"; if(isset($_GET["miniadm"])){ $tables[]=CompileTr4($tr,true); $et="&miniadm=yes"; }else{ $tables[]=CompileTr3($tr,true); } $tables[]=" <div style='width:100%;text-align:right'>". imgtootltip("32-refresh.png","{refresh}","LoadAjax('zarafa-services-status','$page?services-status=yes$et');")."</div>"; $html=implode("\n",$tables); echo $tpl->_ENGINE_parse_body($html); }
function main_status() { include_once "ressources/class.os.system.tools.inc"; $os = new os_system(); $arraycpu = $os->cpu_info(); $cpuspeed = round($arraycpu["cpuspeed"] / 1000 * 100) / 100; $html = "\n\t<table style='width:100%'>\n\t<tr>\n\t<td width=1% valign='top'><img src='img/64-computer.png'></td>\n\t<td valign='top'>\n\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t<td width=1% nowrap align='right' valign='top'>cpu:</td>\n\t\t\t<td width=99%><strong>{$arraycpu["model"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td width=1% nowrap align='right' valign='top'>Cache:</td>\n\t\t\t<td width=99%><strong>{$arraycpu["cache"]}</strong></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td width=1% nowrap align='right'>{cpu_number}:</td>\n\t\t\t<td width=99%>{$arraycpu["cpus"]}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td width=1% nowrap align='right'>{status}:</td>\n\t\t\t<td width=99%>{$cpuspeed}GHz</td>\n\t\t</tr>\t\t\t\t\t\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t"; $mem = $os->html_Memory_usage(); $mem = RoundedLightGreen($mem); $html = RoundedLightGreen($html) . "<br>{$mem}"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function main_denyext(){ $users=new usersMenus(); if($_GET["hostname"]==null){$hostname=$users->hostname;$_GET["hostname"]=$hostname;}else{$hostname=$_GET["hostname"];} $squid=new squid($hostname); $local_list=$squid->acls_rules_array["Deny_ext"]["datas"]; $form="<br> " . RoundedLightGreen(" <table style='width:100%'> <tr> <td align='right' nowrap valign='top'><strong>{deny_ext_add}:</strong></td> <td valign='top'>" . Field_text('deny_ext',null,'width:100px')."</td> <td valign='top'><input type='button' value='{add} »' OnClick=\"javascript:SquidSimpleAddDenyExt('$hostname');\"></td> </tr> </table> "); $html=main_tabs() . "<br> <h5>{deny_ext}</H5> <p class=caption>{deny_ext_add_text}</p> $form<br><div id='_table_deny_ext'>" . main_denyext_list() . "</div>"; $tpl=new templates(); echo $tpl->_ENGINE_parse_body($html,'squid.index.php'); }
function GROUP_DANSGUARDIAN($gid) { include_once 'ressources/class.dansguardian.inc'; $users = new usersMenus(); $ldap = new clladp(); $hashG = $ldap->GroupDatas($gid); $ou = $hash["ou"]; $dans = new dansguardian($users->hostname); $hash = $dans->Master_rules_index; if (is_array($hash)) { while (list($num, $line) = each($hash)) { if (preg_match('#(.+?);(.+)#', $line, $re)) { $rulename = $re[1]; } else { $rulename = $line; } $rules[$num] = $rulename; } } $rules[0] = "{no_rules}"; $field = Field_array_Hash($rules, 'dansguardian_rule', $hashG["ArticaDansGuardianGroupRuleEnabled"], null, null, 0, "width:300px;font-size:13px;padding:5px"); $form = "\n \t<table style='width:100%'>\n \t<tr>\n \t<td align='right' nowrap><strong style='font-size:13.5px'>{selected_rule}: </strong></td>\n \t<td width=70%>{$field}</td>\n \t<td align=left><input type=button value='{apply} »' OnClick=\"javascript:EditGroupDansGuardianRule('{$gid}','{$ou}');\" style='width:200px'></td>\n \t</tr>\n \t</table>\n \t"; $form = RoundedLightGreen($form); $html = "<br>\n \t<H5>{dansguardian_rules}</H5>\n \t<p class=caption>{dansguardian_rules_text}</p>\n \t<br>\n \t{$form}\n \t<br>\n \t"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html); }
function LocalParagraphe($title, $text, $js, $img) { $js = str_replace("javascript:", "", $js); $id = md5($js); $img_id = "{$id}_img"; if (strpos($text, "}") == 0) { $text = "{{$text}}"; } $html = "\n\t<table style='width:95%;'>\n\t<tr>\n\t<td width=1% valign='top'>" . imgtootltip($img, $text, "{$js}", null, $img_id) . "</td>\n\t<td><a href=\"javascript:blur();\" OnClick=\"javascript:{$js}\" style='font-size:16px;text-decoration:underline;font-weight:bold'>{{$title}}</a><div style='font-size:12px;'>{$text}</div></td>\n\t</tr>\n\t</table>"; return RoundedLightGreen($html) . "<p> </p>"; }
function main_status() { $users = new usersMenus(); if ($_GET["hostname"] == null) { $hostname = $users->hostname; $_GET["hostname"] = $hostname; } else { $hostname = $_GET["hostname"]; } $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString($sock->getfile('pureftd_status', $_GET["hostname"])); if ($ini->_params["SQLGREY"]["running"] == 0) { $img = "okdanger32.png"; $rouage = 'rouage-64.png'; $rouage_title = '{start_service}'; $rouage_text = '{start_service_text}'; $error = ""; $js = "SQlgreyActionService(\"{$_GET["hostname"]}\",\"start\")"; $status = "{stopped}"; } else { $img = "ok32.png"; $status = "running"; $rouage = 'rouage_off.png'; $rouage_title = '{stop_service}'; $rouage_text = '{stop_service_text}'; $js = "SQlgreyActionService(\"{$_GET["hostname"]}\",\"stop\")"; } $status = "<table style='width:100%'>\n\t<tr>\n\t<td valign='top'>\n\t\t<img src='img/{$img}'>\n\t</td>\n\t<td valign='top'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t<td align='right' nowrap><strong>{APP_SQLGREY}:</strong></td>\n\t\t<td><strong>{$status}</strong></td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t<td align='right'><strong>{pid}:</strong></td>\n\t\t<td><strong>{$ini->_params["SQLGREY"]["master_pid"]}</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{memory}:</strong></td>\n\t\t<td><strong>{$ini->_params["SQLGREY"]["master_memory"]} mb</strong></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td align='right'><strong>{version}:</strong></td>\n\t\t<td><strong>{$ini->_params["SQLGREY"]["master_version"]}</strong></td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t<td align='right' nowrap><strong>white list {last_update}:</strong></td>\n\t\t<td><strong>{$ini->_params["SQLGREY"]["fqdn_wl_date"]}</strong></td>\n\t\t</tr>\t\t\t\n\t\t<tr><td colspan=2>{$error}</td></tr>\t\n\t\t<tr><td colspan=2> </td></tr>\t\n\t\t\n\t\t</table>\t\t\n\t</td>\n\t</tr>\n\t</table>"; $status = RoundedLightGreen($status); $status_serv = RoundedLightGrey(Paragraphe($rouage, $rouage_title . " (squid)", $rouage_text, "javascript:{$js}")); return $status; }
function dns_popup() { $squid = new squidbee(); while (list($num, $ligne) = each($squid->dns_array)) { $list = $list . "\n\t\t\t<tr " . CellRollOver() . ">\n\t\t\t\t<td width=1%><img src='img/network-1.gif'></td>\n\t\t\t\t<td><strong style='font-size:13px'>{$ligne}</strong></td>\n\t\t\t\t<td width=1%>" . imgtootltip('ed_delete.gif', '{delete}', "DnsDelete({$num})") . "</td>\n\t\t\t</tr>\n\t\t\t\n\t\t\t"; } $list = RoundedLightGreen("<table style='width:100%'>{$list}</table>"); $form = "\n\t\t<table style='width:100%'>\n\t\t\t<tr>\n\t\t\t<td class=legend nowrap>{server}:</td>\n\t\t\t<td>" . Field_text('nameserver', null, 'width:195px') . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td colspan=2 align='right'><input type='button' OnClick=\"javascript:dnsadd();\" value='{add} »'></td>\n\t\t\t</tr>\n\t\t</table>"; $form = RoundedLightWhite($form); $html = "<H1>{dns_nameservers}</H1>\n\t\t\t<p class=caption>{dns_nameservers_text}</p>\n\t\t\t\t{$form}\n\t\t\t<br>\n\t\t\t{$list}"; $tpl = new templates(); echo $tpl->_ENGINE_parse_body($html, 'squid.index.php'); }