function js(){ $page=CurrentPageName(); $tpl=new templates(); $title=$tpl->_parse_body("{APP_FETCHMAIL}::{$_GET["hostname"]}"); $html=" function postfix_multi_fetchmail_load(){ YahooWin3(665,'$page?popup=yes&hostname={$_GET["hostname"]}&ou={$_GET["ou"]}','$title'); } var x_postfix_multi_fetchmail_save= function (obj) { var tempvalue=obj.responseText; if(tempvalue.length>0){alert(tempvalue)} postfix_multi_fetchmail_load(); } function postfix_multi_fetchmail_save(){ var XHR = new XHRConnection(); XHR.appendData('hostname','{$_GET["hostname"]}'); XHR.appendData('ou','{$_GET["ou"]}'); XHR.appendData('schedule',document.getElementById('schedule').value); XHR.appendData('enable_fetchmail',document.getElementById('enable_fetchmail').value); document.getElementById('img_enable_fetchmail').src='img/wait_verybig.gif'; XHR.sendAndLoad('$page', 'GET',x_postfix_multi_fetchmail_save); } postfix_multi_fetchmail_load();"; echo $html; }
function popup() { $users = new usersMenus(); $rule_main = $_GET["rule_main"]; $dans = new dansguardian_rules($_GET["hostname"], $rule_main); $dansg = new dansguardian($_GET["hostname"]); $rulename = $dansg->Master_rules_index[$rule_main]; writelogs("Loading default rule {$rule_main}...", __FUNCTION__, __FILE__); $rules = main_rules_exceptionsitelist_list($rule_main, 1); $apply = applysettings_dansguardian(); $html = "\n\t<input type='hidden' name='rule_main' value='{$rule_main}'>\n\t<div class=explain>{ExceptionSiteList_explain}</div>\n\t\t\t<center>\n\t\t\t<table style='width:80%' class=form>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td>" . Field_text('except_uri', null, 'font-size:13px;padding:3px', null, null, null, false, "exceptionsitelist_enter(event)") . "</td>\n\t\t\t\t\t<td>\n\t\t\t\t\t<td width=1%>" . imgtootltip("plus-24.png", "{add}", "exceptionsitelist_add()") . "\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t</center>\n\t\t\n\t<br>\n\t<div id='main_rules_exceptionsitelist_list' style='width:100%;height:300px;overflow:auto'>\n\t{$rules}\n\t</div>\n\t"; $tpl = new templates(); echo $tpl->_parse_body("{$html}<br>{$categ}<br>"); }
function Mynetworks() { $main = new main_cf(); $html = "\n\n\t<table>\n\t<tr class=rowT>\n\t<td colspan=3 >{mynetworks_title}</td>\n\t</tr>"; if (!is_array($main->array_mynetworks)) { return null; } while (list($num, $val) = each($main->array_mynetworks)) { $html = $html . "\n\t\t<tr class=rowB>\n\t\t\t<td width=1%><img src='img/network-1.gif'></td>\n\t\t\t<td >{$val}</td>\n\t\t\t<td width=1%><a href=\"javascript:DeleteMynetworks({$num},'{$val}');\"><img src='img/x.gif' border=0></td>\n\t\t</tr>"; } $html = $html . "</table>"; $tpl = new templates(); return $tpl->_parse_body($html); }
function ajax_pop() { $sock = new sockets(); $main = new main_cf(); $main->FillDefaults(); $main->main_array["message_size_limit"] = $sock->GET_INFO("message_size_limit"); $main->main_array["default_destination_recipient_limit"] = $sock->GET_INFO("default_destination_recipient_limit"); $main->main_array["smtpd_recipient_limit"] = $sock->GET_INFO("smtpd_recipient_limit"); $main->main_array["mime_nesting_limit"] = $sock->GET_INFO("mime_nesting_limit"); $main->main_array["header_address_token_limit"] = $sock->GET_INFO("header_address_token_limit"); $main->main_array["virtual_mailbox_limit"] = $sock->GET_INFO("virtual_mailbox_limit"); $main->main_array["message_size_limit"] = $main->main_array["message_size_limit"] / 1024 / 1000; $main->main_array["virtual_mailbox_limit"] = $main->main_array["virtual_mailbox_limit"] / 1024 / 1000; $html = "\n\t\t\n\t\t<div id='messages_restriction_id'>\n\t\t<table style='width:100%'>\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{message_size_limit}</strong>:</td>\n\t\t\t <td style='font-size:13px'>" . Field_text('message_size_limit', $main->main_array["message_size_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB</td>\n\t\t\t <td>" . help_icon('{message_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t\n\t\t\n\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{default_destination_recipient_limit}</strong>:</td>\n\t\t\t <td>" . Field_text('default_destination_recipient_limit', $main->main_array["default_destination_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t <td>" . help_icon('{default_destination_recipient_limit_text}') . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{smtpd_recipient_limit}</strong>:</td>\n\t\t\t <td>" . Field_text('smtpd_recipient_limit', $main->main_array["smtpd_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t <td>" . help_icon('{smtpd_recipient_limit_text}') . "</td>\n\t\t</tr>\n\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{mime_nesting_limit}</strong>:</td>\n\t\t\t <td>" . Field_text('mime_nesting_limit', $main->main_array["mime_nesting_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t <td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t\t</tr>\n\t\t\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{header_address_token_limit}</strong>:</td>\n\t\t\t <td>" . Field_text('header_address_token_limit', $main->main_array["header_address_token_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t <td>" . help_icon('{header_address_token_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{virtual_mailbox_limit}</strong>:</td>\n\t\t\t <td style='font-size:13px'>" . Field_text('virtual_mailbox_limit', $main->main_array["virtual_mailbox_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB </td>\n\t\t\t <td>" . help_icon('{virtual_mailbox_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr><td colspan=2 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t<hr>" . button("{apply}", "SaveMessagesRestrictions()") . "\n\t\t</td></tr>\n\t</table>\n\t</div>"; $tpl = new templates(); echo $tpl->_parse_body($html); }
function SaveSettings() { $kas = new kas_filter(); if ($kas->error == true) { $html = "{error_no_socks}"; } else { while (list($num, $val) = each($_POST)) { $kas->array_datas[$num] = $val; } if ($kas->SaveFile()) { $html = "{success}"; } else { $html = "{failed}"; } } unset($_POST); $tpl = new templates(); echo $tpl->_parse_body($html); }
function smtp_sasl_password_id() { $mny = new usersMenus(); $tpl = new templates(); $main = new main_cf(); $pages = new HtmlPages(); if ($mny->AsPostfixAdministrator == false) { echo $tpl->_ENGINE_parse_body('{no_privileges'); exit; } $main->smtp_sasl_password_hash[$_GET["smtp_sasl_password_id"]] = array("DOMAIN" => $_GET["smtp_sasl_password_domain"], "USERNAME" => $_GET["smtp_sasl_password_username"], "PASSWORD" => $_GET["smtp_sasl_password_password"]); $main->save_conf(); echo $tpl->_parse_body('{success}'); if ($pages->AutomaticConfig == true) { $main->save_conf_to_server(); } }
function ApplyConfigKas() { $prod = "kas_main_settings"; $tpl = new templates(); $user = new usersMenus(); if ($user->AllowChangeKas == false) { echo $tpl->_parse_body(NotAllowed($prod)); return null; } if ($user->kas_installed == false) { echo $tpl->_parse_body(NotInstalled($prod)); return null; } $ldap = new clladp(); $kas = new kas_single(); $kas->SaveToserver(); $sock = new sockets(); $sock->getfile('kasrules:' . dirname(__FILE__) . '/ressources/conf/kasDatas'); $kas = new kas_filter(); $kas->SaveFile(); $kas = new kas_dns(); $kas->SaveToServer(); echo $tpl->_parse_body(Success($prod)); }
function hd_partinfos(){ $dev=$_GET["partinfos"]; $tpl=new templates(); $page=CurrentPageName(); $array["status"]='{status}'; $array["tasks"]='{tasks}'; $users=new usersMenus(); $sock=new sockets(); $a=unserialize(base64_decode($sock->getFrameWork('cmd.php?lvmdiskscan=yes'))); if($a[$dev]<>null){$array["lvm"]='{virtual_disks}';} if($users->HDPARM_INSTALLED){ $array["hdparm"]='{hdparm}'; } if($users->SMARTMONTOOLS_INSTALLED){ $array["smart"]='{disk_watchdog}'; } while (list ($num, $ligne) = each ($array) ){ if($_GET["main"]==$num){$class="id=tab_current";}else{$class=null;} if($num=="smart"){ $html[]= "<li><a href=\"system.internal.disk.smart.php?dev=$dev\"><span>$ligne</span></a></li>\n"; continue; } $html[]= "<li><a href=\"$page?switchtab=$num&dev=$dev\"><span>$ligne</span></a></li>\n"; //$html=$html . "<li><a href=\"javascript:LoadAjax('main_config_postfix','$page?main=$num&hostname=$hostname')\" $class>$ligne</a></li>\n"; } echo $tpl->_parse_body(" <div id=partinfosdiv style='width:100%;height:700px;overflow:auto'> <ul>". implode("\n",$html)."</ul> </div> <script> $(document).ready(function(){ $('#partinfosdiv').tabs({ load: function(event, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); }); </script>"); }
function main_add_tab() { $page = CurrentPageName(); $tpl = new templates(); $ask = $tpl->_parse_body('{ADD_NEW_TAB_ASK}'); $html = "\n\t<div style='width:100%;padding:15px'><center><img src='img/wait.gif'></center></div>\n\t<script>\n\tvar x_MainAdminAddTab= function (obj) {\n\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);}\t\n\t\tdocument.location.href='admin.index.php';\n\t}\n\t\n\tfunction MainAdminAddTab(){\n\t\tvar tabname=prompt('{$ask}');\n\t\tif(tabname){\n\t\t\tvar XHR = new XHRConnection();\n \t\tXHR.appendData('Newtab',tabname);\n \t\tdocument.getElementById('BodyContentTabs').innerHTML=\"<div style='width:100%;padding:15px'><center><img src='img/wait.gif'></center></div>\";\n \t\tXHR.sendAndLoad('{$page}', 'GET',x_MainAdminAddTab);\t\n\t\t\n\t\t}else{\n\t\t\tSelectTabID('admin_perso_tabs',1);\n\t\t\t//document.location.href='admin.index.php';\n\t\t\treturn;\n\t\t}\n\t\n\t}\n\t\n\tMainAdminAddTab();\n\t</script>\n"; echo $html; }
function List_entities($echo = 0) { $ldap = new clladp(); $hash = $ldap->hash_get_ou(); if (!is_array($hash)) { return null; } $html = "<center'>\n\t<fieldset><legend>{entities}</legend><table>\n\t<tr class=rowT>\n\t<td> </td>\n\t<td>{entities}</td>\t\n\t<td>{nb_domains}</td>\t\n\t<td> </td>\n\t</tr>\n\t\n\t"; while (list($num, $val) = each($hash)) { if ($class == 'rowB') { $class = 'rowB'; } else { $class = 'rowB'; } $count_domains = 0; $count_domains = count($ldap->hash_get_domains_ou($val)); $html = $html . "<tr class='{$class}'>\n\t\t\t<td width=1%><img src='img/ou.png'></td>\n\t\t\t<td ><a href=\"javascript:ListDomainByEntity('{$val}');\" style='font-size:13px;letter-spacing:3px'>{$val}</td>\n\t\t\t<td ><span style='font-size:13px;letter-spacing:3px'>{$count_domains}</td>\t\t\t\n\t\t\t<td><input type='button' OnClick=\"javascript:AddDomainByEntity('{$val}');\" value='{js_add_domain} »'></td>\n\t\t</tr>"; } $html = $html . "</table></fieldset>"; if ($echo == 1) { $tpl = new templates(); $html = $tpl->_parse_body($html); echo $html; exit; } return $html; }
function popup() { $ou = $_GET["ou"]; $hostname = $_GET["hostname"]; $maincf = new maincf_multi($hostname, $ou); $message_size_limit = $maincf->GET("message_size_limit"); $default_destination_recipient_limit = $maincf->GET("default_destination_recipient_limit"); $smtpd_recipient_limit = $maincf->GET("smtpd_recipient_limit"); $mime_nesting_limit = $maincf->GET("mime_nesting_limit"); $header_address_token_limit = $maincf->GET("header_address_token_limit"); $virtual_mailbox_limit = $maincf->GET("virtual_mailbox_limit"); $message_size_limit = $maincf->GET("message_size_limit") / 1024 / 1000; $virtual_mailbox_limit = $maincf->GET("virtual_mailbox_limit") / 1024 / 1000; $max_rcpt_to = $maincf->GET("max_rcpt_to"); if ($message_size_limit == null) { $message_size_limit = 10240000 / 1024 / 1000; } if ($virtual_mailbox_limit == null) { $virtual_mailbox_limit = 10240000 / 1024 / 1000; } if ($default_destination_recipient_limit == null) { $default_destination_recipient_limit = 50; } if ($smtpd_recipient_limit == null) { $smtpd_recipient_limit = 1000; } if ($mime_nesting_limit == null) { $mime_nesting_limit = 100; } if ($header_address_token_limit == null) { $header_address_token_limit = 10240; } if (!is_numeric($max_rcpt_to)) { $max_rcpt_to = 0; } $html = "\n\t\t\n\t\t<div id='messages_restriction_id'>\n\t\t<div style='font-size:16px'><strong>{restrictions}</strong></div>\n\t\t<table class=form style='width:100%'>\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{message_size_limit}</strong>:</td>\n\t\t\t <td style='font-size:13px'>" . Field_text('message_size_limit', $message_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB</td>\n\t\t\t <td>" . help_icon('{message_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{virtual_mailbox_limit}</strong>:</td>\n\t\t\t <td style='font-size:13px'>" . Field_text('virtual_mailbox_limit', $virtual_mailbox_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB </td>\n\t\t\t <td>" . help_icon('{virtual_mailbox_limit_text}') . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{max_rcpt_to}</strong>:</td>\n\t\t\t <td style='font-size:13px'>" . Field_text('max_rcpt_to', $max_rcpt_to, 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB</td>\n\t\t\t <td>" . help_icon('{max_rcpt_to_text}') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{mime_nesting_limit}</strong>:</td>\n\t\t\t <td>" . Field_text('mime_nesting_limit', $mime_nesting_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t <td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t\t</tr>\t\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{header_address_token_limit_field}</strong>:</td>\n\t\t\t <td>" . Field_text('header_address_token_limit', $header_address_token_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t <td>" . help_icon('{header_address_token_limit_explain}') . "</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t\t\t\t\n\t\t\n\t\t<div style='font-size:16px'><strong>{performances}</strong></div>\n\t\t<table class=form style='width:100%'>\n\t\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{default_destination_recipient_limit}</strong>:</td>\n\t\t\t <td>" . Field_text('default_destination_recipient_limit', $default_destination_recipient_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t <td>" . help_icon('{default_destination_recipient_limit_text}') . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t\t <td nowrap class=legend style='font-size:13px'>{smtpd_recipient_limit}</strong>:</td>\n\t\t\t <td>" . Field_text('smtpd_recipient_limit', $smtpd_recipient_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t <td>" . help_icon('{smtpd_recipient_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr><td colspan=2 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t<hr>" . button("{apply}", "MainMultiSaveMessagesRestrictions()") . "\n\t\t</td></tr>\n\t</table>\n\t</div>"; $tpl = new templates(); echo $tpl->_parse_body($html); }
function available_languages() { $id = $_GET["id"]; $mailman = new mailman($_GET["id"]); $table = "<table style='width:100%'>"; if (is_array($mailman->available_languages)) { while (list($num, $val) = each($mailman->available_languages)) { $table = $table . "<tr>\n\t\t<td width=1%><img src='img/fw_bold.gif'></td>\n\t\t<td><strong>{$mailman->array_lang[$val]}</strong></td>\n\t\t<td>" . imgtootltip('x.gif', '{delete}', "mailman_delete_available_languages('{$id}','{$num}')") . "</td>\n\t</tr>"; } } $table = $table . "</table>"; $table = RoundedLightGreen($table); $tpl = new templates(); return $tpl->_parse_body($table); }
function LicenseDomain_Add() { $kav4mailservers = new kav4mailservers(); if ($kav4mailservers->error == true) { return "{error_no_socks}"; } if (!is_array($kav4mailservers->LicenseDomains)) { $kav4mailservers->LicenseDomains[] = null; } while (list($num, $ligne) = each($kav4mailservers->LicenseDomains)) { $licenceDomains[$ligne] = $ligne; } $ldap = new clladp(); $hash_domains = $ldap->hash_get_all_domains(); if (!is_array($hash_domains)) { $body = "{ERROR_NO_DOMAINS_CREATED_FIRST}"; } else { while (list($num, $ligne) = each($hash_domains)) { if ($licenceDomains[$ligne] == null) { if ($ligne != null) { $hash[$ligne] = $ligne; } } } $hash[""] = "{input_select_list}"; $body = Field_array_Hash($hash, 'LicenseDomain', null); } $html = "<fieldset style='width:80%'><legend>{kav_add_protection_domain}</legend>\n\t<table>\n\t<tr class=rowA>\n\t\t<td align='right'>{kav_legend_protection_domain}:</td>\n\t\t<td>{$body}</td>\n\t</tr>\n\t<tr class=rowB>\n\t\t<td align='right' colspan=2><input type='button' OnClick=\"javascript:LicenseDomain_edit();\" value='{submit} »'></td>\n\t</tr>\t\n\t</table>\n\t</fieldset>"; $tpl = new templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }
function iscsi_tabs(){ $ID=$_GET["ID"]; $array["popup-disk"]='{disk}'; if($ID>0){ $array["popup-security"]='{security}'; $array["popup-params"]='{parameters}'; } $page=CurrentPageName(); $tpl=new templates(); while (list ($num, $ligne) = each ($array) ){ if($_GET["main"]==$num){$class="id=tab_current";}else{$class=null;} $html[]= "<li><a href=\"$page?$num=yes&ID={$_GET["ID"]}\"><span>$ligne</span></a></li>\n"; } echo $tpl->_parse_body(" <div id=iscsid$ID style='width:100%;height:530px;overflow:auto'> <ul>". implode("\n",$html)."</ul> </div> <script> $(document).ready(function(){ $('#iscsid$ID').tabs({ load: function(event, ui) { $('a', ui.panel).click(function() { $(ui.panel).load(this.href); return false; }); } }); }); </script>"); }
function NGINX_EXPLAIN_REVERSE($servername, $color = null) { $q = new mysql_squid_builder(); $servernameencode = urlencode($servername); $tpl = new templates(); if ($color == null) { $color = "black"; } $nginx_zavailb_explain = $tpl->javascript_parse_text("{nginx_zavailb_explain}"); $nginx_zavailb_explain = str_replace(",", ",<br>", $nginx_zavailb_explain); $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT * FROM reverse_www WHERE servername='{$servername}'")); $proxy_buffering = $ligne["proxy_buffering"]; $RedirectQueries = $ligne["RedirectQueries"]; $servername_pattern = $ligne["servername_pattern"]; $servername_pattern_text = null; $zavail = $ligne["zavail"]; $site_enabled = $ligne["enabled"]; $ssl = "{proto} (HTTP) "; if ($ligne["ssl"] == 1) { $certificate_text = $tpl->_ENGINE_parse_body("<span style='font-weight:bold'>{certificate}: {default}</span><br>"); $ssl = "{proto} (HTTP<b>S</b>) "; if ($ligne["port"] == 80) { $ssl = "{proto} (HTTP) {and} {proto} (HTTP<b>S</b>) "; } } if ($ligne["certificate"] != null) { $CommonName = urlencode($ligne["certificate"]); $js = "<a href=\"javascript:blur()\"\n\t\tOnClick=\"javascript:Loadjs('certificates.center.php?certificate-edit-js=yes&CommonName={$CommonName}');\"\n\t\tstyle='text-decoration:underline'>"; $certificate_text = $tpl->_ENGINE_parse_body("<br>{certificate}: {$js}{$ligne["certificate"]}</a><br>"); } $page = CurrentPageName(); $cache_peer_id = $ligne["cache_peer_id"]; $ssl_backend = $ligne["ssl_backend"]; $DEST = array(); if ($cache_peer_id == 0) { return $tpl->_parse_body("<strong>{no_destination}</strong><br><i>{nginx_destination_none_explain}</i>"); } if ($cache_peer_id > 0) { $ligne = @mysql_fetch_array($q->QUERY_SQL("SELECT certificate,servername,ipaddr,port,ForceRedirect,OnlyTCP FROM reverse_sources WHERE ID='{$ligne["cache_peer_id"]}'")); if (!$q->ok) { echo "<p class=text-error>{$q->mysql_error} in " . basename(__FILE__) . " line " . __LINE__ . "</p>"; } $ForceRedirect = "<br>{ForceRedirectyes_explain_table}"; $destination_server = $ligne["servername"]; if ($ligne["ForceRedirect"] == 0) { $ForceRedirect = "<br>{ForceRedirectno_explain_table}"; } if ($ligne["ssl"] == 1) { $ssl = "{proto} (HTTP<b>S</b>) "; } if ($ligne["OnlyTCP"] == 1) { $ssl = "{proto} TCP"; $ForceRedirect = null; } $js = "Loadjs('{$page}?js-source=yes&source-id={$ligne["cache_peer_id"]}')"; if ($ligne["certificate"] != null) { $CommonName = urlencode($ligne["certificate"]); $js = "<a href=\"javascript:blur()\"\n\t\t\tOnClick=\"javascript:Loadjs('certificates.center.php?certificate-edit-js=yes&CommonName={$CommonName}');\"\n\t\t\tstyle='text-decoration:underline'>"; $certificate_text = $tpl->_ENGINE_parse_body("<br>{certificate} - <strong>{from}:{$destination_server}</strong> -: {$js}{$ligne["certificate"]}</a></strong><br>"); } $DEST[] = "<br>{$ssl}, "; if ($cache_peer_id > 0) { $DEST[] = "{redirect_communications_to}:"; if ($ssl_backend == 1) { $ligne["port"] = "<strong>443 (https)</strong>"; } $DEST[] = "<br>«{$ligne["servername"]}» {address} <strong>{$ligne["ipaddr"]}</strong> {on_port} <strong>{$ligne["port"]}</strong> id:{$cache_peer_id}"; if ($ForceRedirect != null) { $DEST[] = $ForceRedirect; } } } if (count($DEST) > 0) { $DESTINATION_TEXT = @implode(" ", $DEST); } $sql = "SELECT * FROM nginx_exploits WHERE servername='{$servername}' LIMIT 0,5"; $results = $q->QUERY_SQL($sql); if (!$q->ok) { senderror($q->mysql_error); } $filters = array(); while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) { $groupid = $ligne["groupid"]; $jsedit = "Loadjs('miniadmin.nginx.exploits.groups.php?js-group=yes&ID={$groupid}&servername={$_GET["servername"]}')"; $ligne2 = mysql_fetch_array($q->QUERY_SQL("SELECT COUNT(*) as tcount FROM nginx_exploits_items WHERE groupid='{$groupid}'")); $RulesNumber = $ligne2["tcount"]; $AF = "<a href=\"javascript:blur();\" OnClick=\"javascript:{$jsedit}\" style='text-decoration:underline'>"; $ligne2 = mysql_fetch_array($q->QUERY_SQL("SELECT groupname FROM nginx_exploits_groups WHERE ID='{$groupid}'")); $filters[] = "{group} {$AF}{$ligne2["groupname"]} ({$RulesNumber} {items})</a>"; } if (count($filters) > 0) { $exp[] = "<br>{check_anti_exploit_with}:" . @implode(", ", $filters); } $jsban = "<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('miniadmin.nginx.exploits.php?firewall-js=yes&servername={$servername}')\"\n\tstyle='text-decoration:underline'>"; $ligne = mysql_fetch_array($q->QUERY_SQL("SELECT maxaccess,sendlogs FROM nginx_exploits_fw WHERE servername='{$servername}'")); if ($ligne["maxaccess"] > 0) { $exp[] = "<br>{bann_ip_after} {$jsban}{$ligne["maxaccess"]} {events}</a>"; } if ($ligne["sendlogs"] == 1) { $exp[] = ", {write_logs_for} {$jsban}403 {errors}</a>"; } if ($RedirectQueries == null) { $proxy_buffering_text = "<br><span style='color:#00B726'>{remote_webpages_are_cached}</span>"; if ($proxy_buffering == 0) { $proxy_buffering_text = "<br><span style='color:#878787'>{caching_webpages_is_disabled}</span>"; } if ($proxy_buffering_text != null) { $exp[] = $proxy_buffering_text; } } if ($RedirectQueries != null) { $DESTINATION_TEXT = "<br>{RedirectQueries_explain_table}<br><a href=\"{$RedirectQueries}\" target=_new style='text-decoration:underline'>{$RedirectQueries}</a>"; } if ($servername_pattern != null) { $servername_pattern_text = "{replace_server_directive}: <strong>{$servername_pattern}</strong>"; } $sql = "SELECT * FROM nginx_aliases WHERE servername='{$servername}' ORDER BY alias LIMIT 0,250"; $results2 = $q->QUERY_SQL($sql); $ali = array(); $alitext = null; while ($ligne = mysql_fetch_array($results2, MYSQL_ASSOC)) { $ali[] = "<a href=\"javascript:blur();\"\n\t\t\tOnClick=\"javascript:Loadjs('nginx.site.aliases.php?popup-js=yes&servername={$servernameencode}');\"\n\t\t\tstyle='text-decoration:underline;color:{$color}'>{$ligne["alias"]}</a>"; } if (count($ali) > 0) { $alitext = "{alias}: (" . @implode("{or} ", $ali) . ") " . "<br>"; } if ($site_enabled == 1) { if ($zavail == 0) { $zavail_text = "<br><i style='font-size:18px;color:#d32d2d'>{$nginx_zavailb_explain}</i>"; } } $html = $tpl->_ENGINE_parse_body("{$zavail_text}<i style='font-size:18px;color:{$color}'>{$certificate_text}{$alitext}{$servername_pattern_text}{$DESTINATION_TEXT}" . @implode(" ", $exp) . "</i>"); $html = str_replace("<br><br>", "<br>", $html); return $html; }
function main_tabs() { $page = CurrentPageName(); $tpl = new templates(); $array["index"] = "{index}"; $array["yes"] = '{main_settings}'; $array["logs"] = '{events}'; $array["ntpdconf"] = '{ntpdconf}'; while (list($num, $ligne) = each($array)) { $html[] = $tpl->_parse_body("<li><a href=\"{$page}?main={$num}\"><span>{$ligne}</span></a></li>\n"); } return "\n\t<div id=ntpd_main_config style='width:100%;height:430px;overflow:auto'>\n\t\t<ul>" . implode("\n", $html) . "</ul>\n\t</div>\n\t\t<script>\n\t\t\t\t\$(document).ready(function(){\n\t\t\t\t\t\$('#ntpd_main_config').tabs({\n\t\t\t\t load: function(event, ui) {\n\t\t\t\t \$('a', ui.panel).click(function() {\n\t\t\t\t \$(ui.panel).load(this.href);\n\t\t\t\t return false;\n\t\t\t\t });\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t\n\t\t\n\t\t\t});\n\t\t</script>"; }
function main_configfile(){ $users=new usersMenus(); if($_GET["hostname"]==null){$hostname=$users->hostname;}else{$hostname=$_GET["hostname"];} $squid=new squid($hostname); $squid->BuildConfig(); $squid->SaveToLdap(); $conf=$squid->squid_conf; $table=explode("\n",$conf); $html= main_tabs() . " <br> <div style='padding:5px;margin:5px'> <table style='width:100%'> "; while (list ($num, $val) = each ($table) ){ $linenum=$num+1; $html=$html . "<tr><td width=1% style='background-color:#CCCCCCC'><strong>$linenum</strong></td><td width=99%'><code>$val</code></td></tr>"; } $html=$html . "</table> </div>"; $tpl=new templates(); echo $tpl->_parse_body($html); }
function CONTACT_INDEX() { if (!isset($_GET["uidUser"])) { if (trim($_GET["employeeNumber"]) == null) { $_GET["employeeNumber"] = time() . "-" . rand(0, 10000); } $contact = $_GET["employeeNumber"]; $ct = new contacts($_SESSION["uid"], $contact); $button = "<input type='button' OnClick=\"javascript:EditContact('FFM_CONTACT_PAGE');\" value='{edit} »»'>"; } if ($_GET["uidUser"] != null) { writelogs("Loading {$_GET["uidUser"]} uid", __FUNCTION__, __FILE__); $ct = new contacts($_SESSION["uid"], null, $_GET["uidUser"]); } $tab = CONTACT_TABS(); $test = CONTACT_PAGE(); $html = "\n\t<div id='tabs'>{$tab}</div>\n\t\n\t<div id='contact_section' class='contact'>{$test}</div>'\n\t"; $tpl = new templates(); echo $tpl->_parse_body($html); }
function filterbehavior_performances_save() { $AmavisMemoryInRAM = $_GET["AmavisMemoryInRAM"]; if ($AmavisMemoryInRAM > 0) { if ($AmavisMemoryInRAM < 128) { $AmavisMemoryInRAM = 128; } } $sock = new sockets(); $sock->SET_INFO('AmavisMemoryInRAM', $AmavisMemoryInRAM); $amavis = new amavis(); $amavis->main_array["BEHAVIORS"]["max_servers"] = $_GET["max_servers"]; $amavis->main_array["BEHAVIORS"]["max_requests"] = $_GET["max_requests"]; $amavis->main_array["BEHAVIORS"]["child_timeout"] = $_GET["child_timeout"]; $amavis->Save(); $tpl = new templates(); echo $tpl->_parse_body("{ERROR_NEED_TO_SAVEAPPLY}"); }
function tableau_FROM() { $head = new main_header_check(); if (!is_array($head->array_subjects)) { return null; } $html = "<table style='width:99%' align=center>\n\t<tr class='rowT'>\n\t<td width=1%> </td>\n\t<td >Match in from address</td>\n\t<td >Error generated</td>\n\t<td>Delete</td>\n\t\n\t</tr>"; if (!is_array($head->array_from)) { return null; } while (list($num, $ligne) = each($head->array_from)) { $PATTERN = $ligne["PATTERN"]; $PATTERN = $head->Trasnformtohuman($PATTERN); $EXPLAIN = $ligne["EXPLAIN"]; if ($class == 'rowA') { $class = 'rowB'; } else { $class = 'rowA'; } $html = $html . "<tr class='{$class}'>\n\t\t<td><img src='img/cadenas.jpg'></td>\n\t\t<td >{$PATTERN}</td>\n\t\t<td >{$EXPLAIN}</td>\n\t\t<td align='center'>\n\t\t\t<a href=\"javascript:delete_mail_from({$num});\"onMouseOver=\"javascript:AffBulle('{js_del_from}');\" OnMouseOut=\"javascript:HideBulle();\"><img src='img/x.gif'></a></td>\n\t\t</tr>\n\t\t"; } $html = $html . "</table>"; $tpl = new templates(); $html = $tpl->_parse_body($html); return $html; }
function sarg_js(){ $tpl=new templates(); $title=$tpl->_parse_body("{APP_SARG}"); $page=CurrentPageName(); $html=" var mem_date=''; function SargBrowseStart(dates){ mem_date=dates; YahooWin4('750','$page?sarg-date='+dates,'$title'); } function StartSarg(){ var load = window.open('sarg/index.html','','scrollbars=no,menubar=no,height=450,width=750,resizable=yes,toolbar=no,location=no,status=no'); //YahooWin3('300','$page?SARG=yes','$title'); } function SargBrowse(dates){ YahooWin5('750','$page?sarg-date='+dates+'&date='+mem_date,'$title'); } StartSarg(); "; echo $html; }
function popup_js() { $json = file_get_contents("js/json.js"); $samba = file_get_contents("js/samba.js"); $tpl = new templates(); $windows_network_neighborhood = $tpl->_ENGINE_parse_body('{windows_network_neighborhood}'); $domain_admin = $tpl->_ENGINE_parse_body("{domain_admin}"); $ERR_NO_PASS_MATCH = $tpl->_ENGINE_parse_body("{ERR_NO_PASS_MATCH}"); $page = CurrentPageName(); $title = $tpl->_parse_body("{APP_SAMBA}"); $start = "load();"; if (isset($_GET["behavior"])) { $start = "Loadjs('samba.neighborhood.php');"; } if (isset($_GET["behavior-admin"])) { $start = "DomainAdmin();"; } if (isset($_GET["js-in-line"])) { $script_start = "<script>"; $start = "TabAddon();"; $script_end = "</script>"; $jsindex = "&js-in-line=yes"; } if (isset($_GET["js-shared_folders"])) { $start = "SharedFoldersInLine();"; } $html = "\n \t\n\t{$script_start}\n\t\n\tfunction load(){\n\t\tYahooWin(860,'{$page}?popup=yes','{$title}');\t\n\t}\t\n\t\n\tfunction SharedFoldersInLine(){\n\t\tAnimateDiv('BodyContent');\n\t\t\$('#BodyContent').load('{$page}?main=shared_folders');\n\t}\t\n\t\n\tfunction TabAddon(){\n\t\tdocument.getElementById('BodyContent').innerHTML='<center><img src=img/wait_verybig.gif></center>';\n\t\t\$('#BodyContent').load('{$page}?popup=yes{$jsindex}');\n\t}\n\t\n\t" . jsaddons() . "\t\n\t\n\n\t\n\n\t\n\t{$json}\n\t{$samba}\n\t{$start}\n\t{$script_end}\n\t"; $user = new usersMenus(); $tpl = new templates(); if ($user->AsSambaAdministrator == false) { $html = $tpl->_ENGINE_parse_body("alert('{ERROR_NO_PRIVS}');"); } echo $html; }
function LoadKasperskySettings($domain = null) { if ($domain != null) { $_GET["LoadKasperskySettings"] = $domain; } $kav4mailservers = new kav4mailservers(); $hash = $kav4mailservers->loadAvSettingsDomain($_GET["LoadKasperskySettings"]); $CuredQuarantine = Field_yesno_checkbox("CuredQuarantine", $hash["CuredQuarantine"]); $InfectedQuarantine = Field_yesno_checkbox("InfectedQuarantine", $hash["InfectedQuarantine"]); $SuspiciousQuarantine = Field_yesno_checkbox("SuspiciousQuarantine", $hash["SuspiciousQuarantine"]); $CorruptedQuarantine = Field_yesno_checkbox("CorruptedQuarantine", $hash["CorruptedQuarantine"]); $WarningQuarantine = Field_yesno_checkbox("WarningQuarantine", $hash["WarningQuarantine"]); $FilteredQuarantine = Field_yesno_checkbox("FilteredQuarantine", $hash["FilteredQuarantine"]); $ErrorQuarantine = Field_yesno_checkbox("ErrorQuarantine", $hash["ErrorQuarantine"]); $ProtectedQuarantine = Field_yesno_checkbox("ProtectedQuarantine", $hash["ProtectedQuarantine"]); $CuredAdminNotify = Field_yesno_checkbox("CuredAdminNotify", $hash["CuredAdminNotify"]); $InfectedAdminNotify = Field_yesno_checkbox("InfectedAdminNotify", $hash["InfectedAdminNotify"]); $SuspiciousAdminNotify = Field_yesno_checkbox("SuspiciousAdminNotify", $hash["SuspiciousAdminNotify"]); $CorruptedAdminNotify = Field_yesno_checkbox("CorruptedAdminNotify", $hash["CorruptedAdminNotify"]); $WarningAdminNotify = Field_yesno_checkbox("WarningAdminNotify", $hash["WarningAdminNotify"]); $FilteredAdminNotify = Field_yesno_checkbox("FilteredAdminNotify", $hash["FilteredAdminNotify"]); $ErrorAdminNotify = Field_yesno_checkbox("ErrorAdminNotify", $hash["ErrorAdminNotify"]); $ProtectedAdminNotify = Field_yesno_checkbox("ProtectedAdminNotify", $hash["ProtectedAdminNotify"]); $arrayA = array("unchanged" => "Unchanged", "remove" => "Remove"); $arrayB = array("unchanged" => "Unchanged", "remove" => "Remove", "cured" => "Cured"); $CuredAdminAction = Field_array_Hash($arrayB, "CuredAdminAction", $hash["CuredAdminAction"]); $InfectedAdminAction = Field_array_Hash($arrayA, "InfectedAdminAction", $hash["InfectedAdminAction"]); $SuspiciousAdminAction = Field_array_Hash($arrayA, "SuspiciousAdminAction", $hash["SuspiciousAdminAction"]); $CorruptedAdminAction = Field_array_Hash($arrayA, "CorruptedAdminAction", $hash["CorruptedAdminAction"]); $WarningAdminAction = Field_array_Hash($arrayA, "WarningAdminAction", $hash["WarningAdminAction"]); $FilteredAdminAction = Field_array_Hash($arrayA, "FilteredAdminAction", $hash["FilteredAdminAction"]); $ErrorAdminAction = Field_array_Hash($arrayA, "ErrorAdminAction", $hash["ErrorAdminAction"]); $ProtectedAdminAction = Field_array_Hash($arrayA, "ProtectedAdminAction", $hash["ProtectedAdminAction"]); $CuredRecipientAction = Field_array_Hash($arrayB, "CuredRecipientAction", $hash["CuredRecipientAction"]); $InfectedRecipientAction = Field_array_Hash($arrayA, "InfectedRecipientAction", $hash["InfectedRecipientAction"]); $SuspiciousRecipientAction = Field_array_Hash($arrayA, "SuspiciousRecipientAction", $hash["SuspiciousRecipientAction"]); $CorruptedRecipientAction = Field_array_Hash($arrayA, "CorruptedRecipientAction", $hash["CorruptedRecipientAction"]); $WarningRecipientAction = Field_array_Hash($arrayA, "WarningRecipientAction", $hash["WarningRecipientAction"]); $FilteredRecipientAction = Field_array_Hash($arrayA, "FilteredRecipientAction", $hash["FilteredRecipientAction"]); $ErrorRecipientAction = Field_array_Hash($arrayA, "ErrorRecipientAction", $hash["ErrorRecipientAction"]); $ProtectedRecipientAction = Field_array_Hash($arrayA, "ProtectedRecipientAction", $hash["ProtectedRecipientAction"]); $CuredSenderNotify = Field_yesno_checkbox("CuredSenderNotify", $hash["CuredSenderNotify"]); $InfectedSenderNotify = Field_yesno_checkbox("InfectedSenderNotify", $hash["InfectedSenderNotify"]); $SuspiciousSenderNotify = Field_yesno_checkbox("SuspiciousSenderNotify", $hash["SuspiciousSenderNotify"]); $CorruptedSenderNotify = Field_yesno_checkbox("CorruptedSenderNotify", $hash["CorruptedSenderNotify"]); $WarningSenderNotify = Field_yesno_checkbox("WarningSenderNotify", $hash["WarningSenderNotify"]); $FilteredSenderNotify = Field_yesno_checkbox("FilteredSenderNotify", $hash["FilteredSenderNotify"]); $ErrorSenderNotify = Field_yesno_checkbox("ErrorSenderNotify", $hash["ErrorSenderNotify"]); $ProtectedSenderNotify = Field_yesno_checkbox("ProtectedSenderNotify", $hash["ProtectedSenderNotify"]); $CuredRecipientNotify = Field_yesno_checkbox("CuredRecipientNotify", $hash["CuredRecipientNotify"]); $InfectedRecipientNotify = Field_yesno_checkbox("InfectedRecipientNotify", $hash["InfectedRecipientNotify"]); $SuspiciousRecipientNotify = Field_yesno_checkbox("SuspiciousRecipientNotify", $hash["SuspiciousRecipientNotify"]); $CorruptedRecipientNotify = Field_yesno_checkbox("CorruptedRecipientNotify", $hash["CorruptedRecipientNotify"]); $WarningRecipientNotify = Field_yesno_checkbox("WarningRecipientNotify", $hash["WarningRecipientNotify"]); $FilteredRecipientNotify = Field_yesno_checkbox("FilteredRecipientNotify", $hash["FilteredRecipientNotify"]); $ErrorRecipientNotify = Field_yesno_checkbox("ErrorRecipientNotify", $hash["ErrorRecipientNotify"]); $ProtectedRecipientNotify = Field_yesno_checkbox("ProtectedRecipientNotify", $hash["ProtectedRecipientNotify"]); $CuredRecipientAttachReport = Field_yesno_checkbox("CuredRecipientAttachReport", $hash["CuredRecipientAttachReport"]); $InfectedRecipientAttachReport = Field_yesno_checkbox("InfectedRecipientAttachReport", $hash["InfectedRecipientAttachReport"]); $SuspiciousRecipientAttachReport = Field_yesno_checkbox("SuspiciousRecipientAttachReport", $hash["SuspiciousRecipientAttachReport"]); $CorruptedRecipientAttachReport = Field_yesno_checkbox("CorruptedRecipientAttachReport", $hash["CorruptedRecipientAttachReport"]); $WarningRecipientAttachReport = Field_yesno_checkbox("WarningRecipientAttachReport", $hash["WarningRecipientAttachReport"]); $FilteredRecipientAttachReport = Field_yesno_checkbox("FilteredRecipientAttachReport", $hash["FilteredRecipientAttachReport"]); $ErrorRecipientAttachReport = Field_yesno_checkbox("ErrorRecipientAttachReport", $hash["ErrorRecipientAttachReport"]); $ProtectedRecipientAttachReport = Field_yesno_checkbox("ProtectedRecipientAttachReport", $hash["ProtectedRecipientAttachReport"]); if ($hash["QuarantinePath"] != null) { $QuarantinePath = basename($hash["QuarantinePath"]); $QuarantinePath = "\n\t\t<tr class=rowA>\n\t\t\t<td align='right'>{QuarantinePath}</td>\n\t\t\t<td>{$QuarantinePath}</td>\n\t\t</tr>"; } $html = "\n\t<fieldset>\n\t\t<legend>{LoadKasperskySettings_general_title}</legend>\n\t\t<table>\n\t\t<tr class=rowA>\n\t\t<td align=right>{LoadKasperskySettings_adminaddr}:</td>\n\t\t<input type='text' id='AdminAddress' value='{$hash["AdminAddress"]}'></td>\n\t\t</tr>\n\t\t{$QuarantinePath}\n\t\t</table>\n\t</fieldset>\n\t<fieldset>\n\t\t<legend>{av_notify_rules}</legend>\n\n<form name='kasperskyactions'>\t\t\n<table>\n<tr class=rowT>\n\t<td rowspan=2>{objects}</td>\n\t<td rowspan=2>{Quarantine}</td>\n\t<td colspan=2>{Administrator_rules}</td>\n\t<td >{sender_rules}</td>\n\t<td colspan=3>{recipient_rules}</td>\n</tr>\n<tr class=rowT>\n\t<td >{notify}</td>\n\t<td>{actions}</td>\n\t<td >{notify}</td>\n\t<td >{notify}</td>\n\t<td>{attach_report}</td>\n\t<td>{actions}</td>\n\t\n</tr>\n<tr class=rowA align='right'>\n\t<td>{Infected}</td>\n\t<td id='center' width=1%>{$InfectedQuarantine}</td>\n\t<td id='center' width=1%>{$InfectedAdminNotify}</td>\n\t<td id='center' >{$InfectedAdminAction}</td>\n\t<td id='center' width=1%>{$InfectedSenderNotify}</td>\n\t<td id='center' width=1%>{$InfectedRecipientNotify}</td>\n\t<td id='center' width=1%>{$InfectedRecipientAttachReport}</td>\n\t<td id='center' >{$InfectedRecipientAction}</td>\n\t\n</tr>\n<tr class=rowB align='right'>\n\t<td>{Cured}</td>\n\t<td id='center' width=1%>{$CuredQuarantine}</td>\n\t<td id='center' width=1%>{$CuredAdminNotify}</td>\n\t<td id='center' >{$CuredAdminAction}</td>\n\t<td id='center' width=1%>{$CuredSenderNotify}</td>\n\t<td id='center' width=1%>{$CuredRecipientNotify}</td>\n\t<td id='center' width=1%>{$CuredRecipientAttachReport}</td>\n\t<td id='center' >{$CuredRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n<tr class=rowA align='right'>\n\t<td>{Suspicious} </td>\n\t<td id='center' width=1%>{$SuspiciousQuarantine}</td>\n\t<td id='center' width=1%>{$SuspiciousAdminNotify}</td>\n\t<td id='center' >{$SuspiciousAdminAction}</td>\n\t<td id='center' width=1%>{$SuspiciousSenderNotify}</td>\n\t<td id='center' width=1%>{$SuspiciousRecipientNotify}</td>\n\t<td id='center' width=1%>{$SuspiciousRecipientAttachReport}</td>\n\t<td id='center' >{$SuspiciousRecipientAction}</td>\n</tr>\t\t\t \t\t\t\t \n<tr class=rowB align='right'>\n\t<td>{Corrupted}</td>\n\t<td id='center' width=1%>{$CorruptedQuarantine}</td>\t\n\t<td id='center' width=1%>{$CorruptedAdminNotify}</td>\t\t\n\t<td id='center'>{$CorruptedAdminAction}</td>\t\t\n\t<td id='center' width=1%>{$CorruptedSenderNotify}</td>\n\t<td id='center' width=1%>{$CorruptedRecipientNotify}</td>\n\t<td id='center' width=1%>{$CorruptedRecipientAttachReport}</td>\n\t<td id='center' >{$CorruptedRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n\n<tr class=rowA align='right'>\n\t<td>{Warning}</td>\n\t<td class=center width=1%>{$WarningQuarantine}</td>\n\t<td class=center width=1%>{$WarningAdminNotify}</td>\t\n\t<td class=center>{$WarningAdminAction}</td>\n\t<td id='center' width=1%>{$WarningSenderNotify}</td>\n\t<td id='center' width=1%>{$WarningRecipientNotify}</td>\n\t<td id='center' width=1%>{$WarningRecipientAttachReport}</td>\n\t<td id='center' >{$WarningRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n<tr class=rowB align='right'>\n\t<td>{Filtered}</td>\n\t<td id='center' width=1%>{$FilteredQuarantine}</td>\n\t<td id='center' width=1%>{$FilteredAdminNotify}</td>\n\t<td id='center' >{$FilteredAdminAction}</td>\n\t<td id='center' width=1%>{$FilteredSenderNotify}</td>\n\t<td id='center' width=1%>{$FilteredRecipientNotify}</td>\n\t<td id='center' width=1%>{$FilteredRecipientAttachReport}</td>\n\t<td id='center' >{$FilteredRecipientAction}</td>\n\t\n</tr> \t\t\t \t\t\t\t \n<tr class=rowA align='right'>\n\t<td>{Error}</td>\n\t<td id='center' width=1%>{$ErrorQuarantine}</td>\n\t<td id='center' width=1%>{$ErrorAdminNotify}</td>\n\t<td id='center' >{$ErrorAdminAction}</td>\n\t<td id='center' width=1%>{$ErrorSenderNotify}</td>\n\t<td id='center' width=1%>{$ErrorRecipientNotify}</td>\n\t<td id='center' width=1%>{$ErrorRecipientAttachReport}</td>\n\t<td id='center' >{$ErrorRecipientAction}</td>\n</tr> \t\t\t \t\t\t\t \n<tr class=rowB align='right'>\n\t<td>{Protected}</td>\n\t<td id='center' width=1%>{$ProtectedQuarantine}</td>\n\t<td id='center' width=1%>{$ProtectedAdminNotify}</td>\n\t<td id='center' >{$ProtectedAdminAction}</td>\n\t<td id='center' width=1%>{$ProtectedSenderNotify}</td>\n\t<td id='center' width=1%>{$ProtectedRecipientNotify}</td>\n\t<td id='center' width=1%>{$ProtectedRecipientAttachReport}</td>\n\t<td id='center' >{$ProtectedRecipientAction}</td>\n</tr>\n</form>\n<tr class=rowA align='right' >\n\t<td colspan=8><input type='button' value='{bt_edit_notify}' OnClick=\"javascript:EditKasperskySettings('{$_GET["LoadKasperskySettings"]}');\" style='float:right'></td></tr>\n</table>\n</fieldset>\n\t\t\t\n\t\t\n\t</fieldset>\n\t"; $tpl = new templates(); echo DIV_SHADOW($tpl->_parse_body($html), 'windows'); }
function all_status() { if (CACHE_SESSION_GET(__FUNCTION__, ___FILE__, 5)) { return; } $page = CurrentPageName(); $sock = new sockets(); $ini = new Bs_IniHandler(); $tpl = new templates(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?squid-ini-status=yes'))); $squid_status = DAEMON_STATUS_ROUND("SQUID", $ini, null, 1); $dansguardian_status = DAEMON_STATUS_ROUND("DANSGUARDIAN", $ini, null, 1); $kav = DAEMON_STATUS_ROUND("KAV4PROXY", $ini, null, 1); $cicap = DAEMON_STATUS_ROUND("C-ICAP", $ini, null, 1); $APP_PROXY_PAC = DAEMON_STATUS_ROUND("APP_PROXY_PAC", $ini, null, 1); $APP_SQUIDGUARD_HTTP = DAEMON_STATUS_ROUND("APP_SQUIDGUARD_HTTP", $ini, null, 1); $APP_UFDBGUARD = DAEMON_STATUS_ROUND("APP_UFDBGUARD", $ini, null, 1); $md = md5(date('Ymhis')); $tr[] = $squid_status; $tr[] = $dansguardian_status; $tr[] = $kav; $tr[] = $cicap; $tr[] = $APP_PROXY_PAC; $tr[] = $APP_SQUIDGUARD_HTTP; $tr[] = $APP_UFDBGUARD; $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 == 2) { $t = 0; $tables[] = "</tr><tr>"; } } if ($t < 2) { for ($i = 0; $i <= $t; $i++) { $tables[] = "<td valign='top'> </td>"; } } $refresh = imgtootltip("refresh-32.png", "{refresh}", "LoadAjax('squid-services','{$page}?squid-services=yes');"); $tables[] = "</table>"; $html = "\n\t\t<div style='text-align:right;margin-bottom:10px'>" . button("{restart_all_services}", "Loadjs('squid.restart.php')") . "</div>\n\t\t" . @implode("\n", $tables) . "<div style='text-align:right'>{$refresh}</div>"; CACHE_SESSION_SET(__FUNCTION__, __FILE__, $tpl->_parse_body($html)); }
function HTTPS_PROCESSES() { $httpd = new httpd(); $tpl = new templates(); $lighttp_max_load_per_proc = $tpl->_parse_body('{lighttp_max_load_per_proc}'); if (strlen($lighttp_max_load_per_proc) > 40) { $lighttp_max_load_per_proc = texttooltip(substr($lighttp_max_load_per_proc, 0, 37) . "...", $lighttp_max_load_per_proc); } $HTML = "\n<input type='hidden' id='interface_restarted' value='{interface_restarted}'>\n<form name='FFM119'>\n\t<input type='hidden' name='lighttpd_procs' value='yes'>\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td nowrap class=legend>{lighttp_max_proc}:</strong></td>\n\t\t<td>" . Field_text('lighttp_max_proc', trim($httpd->lighttp_max_proc), 'width:30px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend>{lighttp_min_proc}:</strong></td>\n\t\t<td>" . Field_text('lighttp_min_proc', trim($httpd->lighttp_min_proc), 'width:30px') . "</td>\n\t</tr>\n\t<tr>\n\t\t<td nowrap class=legend>{$lighttp_max_load_per_proc}:</strong></td>\n\t\t<td>" . Field_text('lighttp_max_load_per_proc', trim($httpd->lighttp_max_load_per_proc), 'width:30px') . "</td>\n\t</tr>\t\t\n\n\t<tr>\n\t\t<td nowrap class=legend>{PHP_FCGI_CHILDREN}:</strong></td>\n\t\t<td>" . Field_text('PHP_FCGI_CHILDREN', trim($httpd->PHP_FCGI_CHILDREN), 'width:30px') . "</td>\n\t</tr>\t\n\t<tr>\n\t\t<td nowrap class=legend>{PHP_FCGI_MAX_REQUESTS}:</strong></td>\n\t\t<td>" . Field_text('PHP_FCGI_MAX_REQUESTS', trim($httpd->PHP_FCGI_MAX_REQUESTS), 'width:30px') . "</td>\n\t</tr>\t\t\n\t\n\t\n\t\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t<input type='button' OnClick=\"javascript:HTTPS_PROCESSES();\" value='{edit} »'></td>\n\t</tr>\n</table>\n</form>"; $HTML = RoundedLightWhite($HTML); $HTML = "<H1>lighttpd {processes}</H1>{$HTML}"; echo $tpl->_ENGINE_parse_body($HTML); }
function ShoweventsORG() { $ldap = new clladp(); $pattern = $_GET["SendQuery"]; $pattern = str_replace('*', '%', $pattern); if (strpos(" {$pattern}", '%') == 0) { $pattern = $pattern . "%"; } if ($_SESSION["RTTM"]["M"][md5($pattern)] != null) { echo $_SESSION["RTTM"]["M"][md5($pattern)]; return; } $hash = $ldap->hash_get_domains_ou($_SESSION["ou"]); if (!is_array($hash)) { return null; } while (list($num, $ligne) = each($hash)) { $sender_domain[] = "(sender_domain='{$num}')"; $sender_domain[] = "(delivery_domain='{$num}')"; } $or = implode(" OR ", $sender_domain); $first = "((delivery_user LIKE '{$pattern}') OR (sender_user LIKE '{$pattern}'))"; $sql = "SELECT * FROM smtp_logs WHERE {$first} AND ({$or}) ORDER BY time_stamp DESC limit 0,100"; $q = new mysql(); $results = $q->QUERY_SQL($sql, 'artica_events'); while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) { $count = $count + 1; $tr = $tr . format_line($ligne); } $tpl = new templates(); $html = $tpl->_parse_body("<table style='width:99%'>{$tr}</table>"); $_SESSION["RTTM"]["M"][md5($pattern)] = $html; echo $html; }
function ajax_pop() { $sock = new sockets(); $users = new usersMenus(); $users->LoadModulesEnabled(); $EnableAmavisDaemon = $users->EnableAmavisDaemon; if (!$users->AMAVIS_INSTALLED) { $EnableAmavisDaemon = 0; } if (!is_numeric($EnableAmavisDaemon)) { $EnableAmavisDaemon = 0; } $EnableArticaPolicyFilter = $sock->GET_INFO("EnableArticaPolicyFilter"); $EnableArticaPolicyFilter = 0; if (!is_numeric($EnableArticaPolicyFilter)) { $EnableArticaPolicyFilter = 0; } $ArticaPolicyFilterMaxRCPTInternalDomainsOnly = $sock->GET_INFO("ArticaPolicyFilterMaxRCPTInternalDomainsOnly"); $SpamassassinMaxRCPTScore = $sock->GET_INFO("SpamassassinMaxRCPTScore"); $page = CurrentPageName(); $main = new main_cf(); $main->FillDefaults(); $message_size_limit = $sock->GET_INFO("message_size_limit"); $main->main_array["default_destination_recipient_limit"] = $sock->GET_INFO("default_destination_recipient_limit"); $main->main_array["smtpd_recipient_limit"] = $sock->GET_INFO("smtpd_recipient_limit"); $main->main_array["mime_nesting_limit"] = $sock->GET_INFO("mime_nesting_limit"); $PostfixNotifyMessagesRestrictions = $sock->GET_INFO("PostfixNotifyMessagesRestrictions"); $main = new maincf_multi("master", "master"); $header_address_token_limit = $sock->GET_INFO("header_address_token_limit"); $header_size_limit = $sock->GET_INFO("header_size_limit"); $max_rcpt_to = $main->GET("max_rcpt_to"); if (!is_numeric($message_size_limit)) { $message_size_limit = 10240000; } $main->main_array["virtual_mailbox_limit"] = $sock->GET_INFO("virtual_mailbox_limit"); $message_size_limit = $message_size_limit / 1024 / 1000; $main->main_array["virtual_mailbox_limit"] = $main->main_array["virtual_mailbox_limit"] / 1024 / 1000; if (!is_numeric($header_address_token_limit)) { $header_address_token_limit = 10240; } if (!is_numeric($header_size_limit)) { $header_size_limit = 102400; } if (!is_numeric($max_rcpt_to)) { $max_rcpt_to = 0; } if (!is_numeric($PostfixNotifyMessagesRestrictions)) { $PostfixNotifyMessagesRestrictions = 0; } $header_size_limit = $header_size_limit / 1024; if (!is_numeric($SpamassassinMaxRCPTScore)) { $SpamassassinMaxRCPTScore = 10; } $html = "\n\t\t\n\t\t<div id='messages_restriction_id'>\n\t\t\n\t\t\n\n\t\n\n\n\t\t<div style='font-size:16px'><strong>{max_rcpt_to}</strong></div>\n\t\t<table class=form style='width:99%'>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{max_rcpt_to}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('max_rcpt_to', $max_rcpt_to, 'width:60px;font-size:13px;padding:3px;text-align:right') . " {recipients} </td>\n\t\t\t<td>" . help_icon('{max_rcpt_to_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{max_rcpt_to_onlyForLocalDomains}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_checkbox("ArticaPolicyFilterMaxRCPTInternalDomainsOnly", 1, $ArticaPolicyFilterMaxRCPTInternalDomainsOnly, "ArticaPolicyFilterMaxRCPTInternalDomainsOnlySave()") . "</td>\n\t\t\t<td>" . help_icon('{max_rcpt_to_onlyForLocalDomains_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{score}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('SpamassassinMaxRCPTScore', $SpamassassinMaxRCPTScore, 'width:40px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t\t<td>" . help_icon('{SpamassassinMaxRCPTScore_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t\t</tr>\n\t\t</table>\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t<div style='font-size:16px'><strong>{restrictions}</strong></div>\n\t\t<table class=form style='width:99%'>\n\n\t\t\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{message_size_limit}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('message_size_limit', $message_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB</td>\n\t\t\t<td>" . help_icon('{message_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{virtual_mailbox_limit}</strong>:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('virtual_mailbox_limit', $main->main_array["virtual_mailbox_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " MB </td>\n\t\t\t<td>" . help_icon('{virtual_mailbox_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{mime_nesting_limit}</strong>:</td>\n\t\t\t<td>" . Field_text('mime_nesting_limit', $main->main_array["mime_nesting_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t<td>" . help_icon('{mime_nesting_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{header_address_token_limit_field}</strong>:</td>\n\t\t\t<td>" . Field_text('header_address_token_limit', $header_address_token_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " </td>\n\t\t\t<td>" . help_icon('{header_address_token_limit_explain}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{header_size_limit}:</td>\n\t\t\t<td style='font-size:13px'>" . Field_text('header_size_limit', $header_size_limit, 'width:60px;font-size:13px;padding:3px;text-align:right') . " KB </td>\n\t\t\t<td>" . help_icon('{header_size_limit_text}') . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td nowrap class=legend style='font-size:13px'>{notify}:</td>\n\t\t\t<td style='font-size:13px'>" . Field_checkbox("PostfixNotifyMessagesRestrictions", 1, $PostfixNotifyMessagesRestrictions, "PostfixNotifyMessagesRestrictionsSave()") . "</td>\n\t\t\t<td>" . help_icon('{PostfixNotifyMessagesRestrictions_text}') . "</td>\n\t\t</tr>\n\t<tr>\n\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t</tr>\t\t\n\t\t</table>\n\t\t\n\t\t\n\t<div style='font-size:16px'><strong>{performances}</strong></div>\n\t<table class=form style='width:99%'>\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{default_destination_recipient_limit}</strong>:</td>\n\t\t<td>" . Field_text('default_destination_recipient_limit', $main->main_array["default_destination_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t<td>" . help_icon('{default_destination_recipient_limit_text}') . "</td>\n\t</tr>\n\t\n\t<tr>\n\t\t<td nowrap class=legend style='font-size:13px'>{smtpd_recipient_limit}</strong>:</td>\n\t\t<td>" . Field_text('smtpd_recipient_limit', $main->main_array["smtpd_recipient_limit"], 'width:60px;font-size:13px;padding:3px;text-align:right') . "</td>\n\t\t<td>" . help_icon('{smtpd_recipient_limit_text}') . "</td>\n\t</tr>\n\n\n\n\t<tr>\n\t<td colspan=3 align='rigth' style='padding-right:10px;text-align:right'>\n\t\t" . button("{apply}", "SaveMessagesRestrictions()") . "</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\nvar x_SaveMessagesRestrictions=function (obj) {\n\ttempvalue=obj.responseText;\n\tYahooWinSHide();\n }\t\n\t\nfunction SaveMessagesRestrictions(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('header_size_limit',document.getElementById('header_size_limit').value);\n\tXHR.appendData('message_size_limit',document.getElementById('message_size_limit').value);\n\tXHR.appendData('default_destination_recipient_limit',document.getElementById('default_destination_recipient_limit').value);\n\tXHR.appendData('smtpd_recipient_limit',document.getElementById('smtpd_recipient_limit').value);\n\tXHR.appendData('mime_nesting_limit',document.getElementById('mime_nesting_limit').value);\n\tXHR.appendData('header_address_token_limit',document.getElementById('header_address_token_limit').value);\n\tXHR.appendData('virtual_mailbox_limit',document.getElementById('virtual_mailbox_limit').value);\n\tXHR.appendData('max_rcpt_to',document.getElementById('max_rcpt_to').value);\n\tXHR.appendData('SpamassassinMaxRCPTScore',document.getElementById('SpamassassinMaxRCPTScore').value);\n\t\n\t\n\t\n\tdocument.getElementById('messages_restriction_id').innerHTML='<center><img src=\"img/wait_verybig.gif\"></center>';\n\tXHR.sendAndLoad('{$page}', 'GET',x_SaveMessagesRestrictions);\n}\t\n\nfunction PostfixNotifyMessagesRestrictionsSave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('PostfixNotifyMessagesRestrictions').checked){\n\t\tXHR.appendData('PostfixNotifyMessagesRestrictions',1);\n\t}else{\n\t\tXHR.appendData('PostfixNotifyMessagesRestrictions',0);\n\t}\n\tXHR.sendAndLoad('{$page}', 'GET');\n}\n\nfunction ArticaPolicyFilterMaxRCPTInternalDomainsOnlySave(){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById('ArticaPolicyFilterMaxRCPTInternalDomainsOnly').checked){\n\t\tXHR.appendData('ArticaPolicyFilterMaxRCPTInternalDomainsOnly',1);\n\t}else{\n\t\tXHR.appendData('ArticaPolicyFilterMaxRCPTInternalDomainsOnly',0);\n\t}\n\tXHR.sendAndLoad('{$page}', 'GET');\n}\n\n\nfunction CheckRequiredRestrictionsFields(){\n\tvar EnableArticaPolicyFilter={$EnableAmavisDaemon};\n\tif(EnableArticaPolicyFilter==0){\n\t\tdocument.getElementById('ArticaPolicyFilterMaxRCPTInternalDomainsOnly').disabled=true;\n\t\tdocument.getElementById('SpamassassinMaxRCPTScore').disabled=true;\n\t}\n}\n\n\nCheckRequiredRestrictionsFields();\n</script>\n\t\n\t\n\t"; $tpl = new templates(); echo $tpl->_parse_body($html); }
function user_page_tabs($dn = null) { $ou = $_GET["ou"]; $domain = $_GET["domain"]; if (is_file("ressources/settings.inc")) { include "ressources/settings.inc"; } $tabs[0] = "{account_name}"; $tabs[1] = "{aliases}"; if ($_GLOBAL["mailboxes_server"] == "cyrus") { $tabs[2] = "{manage_mailbox} "; } $html = "\n\t<ul id=tablist>\n\t\t<ul'>\n"; while (list($num, $ligne) = each($tabs)) { if ($num == $_GET["tab"]) { $sid = "id='tab_current'"; } else { $sid = null; } $html = $html . "\t\t<li ><a href=\"#\" OnClick=\"javascript:editmailbox('{$dn}','{$ou}','{$domain}','{$num}');\" {$sid}>{$ligne}</a></li>\n"; } $html = $html . "</ul>"; $tpl = new templates(); return $tpl->_parse_body($html); }
function BuildRows($appli, $SockStatus, $internetkey, $noupgrade = false) { $ini = new Bs_IniHandler(); if ($GLOBALS["INDEXFF"] == null) { $GLOBALS["INDEXFF"] = @file_get_contents(dirname(__FILE__) . '/ressources/index.ini'); } $ini->loadString($GLOBALS["INDEXFF"]); $tpl = new templates(); $button_text = $tpl->_parse_body('{install_upgrade}'); if (strlen($button_text) > 27) { $button_text = substr($button_text, 0, 24) . "..."; } $bgcolor = "style='background-color:#DFFDD6'"; $version = ParseAppli($SockStatus, $appli); $uninstall = ParseUninstall($SockStatus, $appli); if ($version == "0" or strlen($version) == 0) { $version = "{not_installed}"; $bgcolor = null; $uninstall = null; } if (file_exists(dirname(__FILE__) . "/ressources/install/{$appli}.dbg")) { $dbg_exists = imgtootltip('22-logs.png', "{events}", "InstallLogs('{$appli}')"); $styledbg = "background-color:yellow;border:1px solid black"; } else { $dbg_exists = "<img src='img/fw_bold.gif'>"; } $appli_text = $tpl->_ENGINE_parse_body("{{$appli}}"); $appli_text = replace_accents($appli_text); if (strlen($appli_text) > 30) { $appli_text = texttooltip(substr($appli_text, 0, 27) . "...", $appli_text, null, null, 1); } $button_install = button($button_text, "ApplicationSetup('{$appli}')"); if ($GLOBALS["ArticaMetaDisableSetupCenter"] == 1) { $button_install = null; $uninstall = null; } // UNINSTALL if ($uninstall != null) { $version = "<table><tr><td style='font-size:13px' valign='middle'>{$version}</td>\n\t\t\t<td valign='middle'>" . imgtootltip("ed_delete.gif", "{uninstall} {{$appli}}", "SetupCenterRemove('{$uninstall}','{$appli}')") . "</td></tr></table>"; } if ($ini->_params["NEXT"]["{$internetkey}"] == null) { writelogs("Unable to stat NEXT/{$internetkey} \"{$ini->_params["NEXT"]["{$internetkey}"]}\"", __FUNCTION__, __FILE__, __LINE__); $ini->_params["NEXT"]["{$internetkey}"] = "<div style='color:#d32d2d'>{error_network}</div>"; $button_install = null; } if ($internetkey == "openldap") { $sock = new sockets(); if ($sock->GET_INFO("AllowUpgradeLdap") != 1) { $button_install = null; } } if ($noupgrade) { $button_install = null; } return "\n\t<tr {$bgcolor}>\n\t\t<td width=2% style=\"{$styledbg}\">{$dbg_exists}</td>\n\t\t<td style='font-size:13px' nowrap>{$appli_text}</td>\n\t\t<td style='font-size:13px'>{$version}</td>\n\t\t<td style='font-size:13px'>{$ini->_params["NEXT"]["{$internetkey}"]}</td>\n\t\t<td style='font-size:11px'>{$button_install}</td>\n\t\t<td style='font-size:13px'><div style='width:100px;height:22px;border:1px solid #CCCCCC' id='STATUS_{$appli}'>" . install_status($appli) . "</div></td>\n\t</tr>\n\t"; }
function page_index_status() { $tabs = main_tabs(); $squid = new squid($_GET["hostname"]); $ini = new Bs_IniHandler(); $sock = new sockets(); $ini->loadString(base64_decode($sock->getFrameWork('cmd.php?squid-ini-status=yes'))); $tpl = new templates(); //echo "<H1>ouou</H1>"; $squid_status = DAEMON_STATUS_ROUND("SQUID", $ini, null, 1); $dansguardian_status = DAEMON_STATUS_LINE("DANSGUARDIAN", $ini, null, 1); $kav = DAEMON_STATUS_LINE("KAV4PROXY", $ini, null, 1); $cicap = DAEMON_STATUS_LINE("C-ICAP", $ini, null, 1); $proxy_pac = DAEMON_STATUS_LINE("APP_PROXY_PAC", $ini, null, 1); $md = md5(date('Ymhis')); $squid = new squidbee(); if (count($squid->network_array) == 0) { $net = Paragraphe("warning64.png", "{no_squid_network}", "{no_squid_network_text}", "javascript:Loadjs('squid.popups.php?script=network')", null, 350); echo $tpl->_ENGINE_parse_body($net); return; } if ($dansguardian_status != null) { $dansguardian_status = "<tr><td valign='top'>{$dansguardian_status}</td></tr>"; } if ($kav != null) { $kav = "<tr><td valign='top'>{$kav}</td></tr>"; } if ($cicap != null) { $cicap = "<tr><td valign='top'>{$cicap}</td></tr>"; } if ($proxy_pac != null) { $proxy_pac = "<tr><td valign='top'>{$proxy_pac}</td></tr>"; } $html = "\n\t<table style='width=99%'>'\n\t<tr>\n\t<td valign='top'><img src='img/crion-128.png'></td>\n\t<td valign='top'>\n\t<table style='width:99%'>\n\t\t<tr><td valign='top'>{$squid_status}</td></tr>\n\t\t{$kav}\n\t\t{$cicap}\n\t\t{$dansguardian_status}\n\t\t{$proxy_pac}\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\t\n\t"; echo $tpl->_parse_body($html); }