本文整理汇总了PHP中templates::_parse_body方法的典型用法代码示例。如果您正苦于以下问题:PHP templates::_parse_body方法的具体用法?PHP templates::_parse_body怎么用?PHP templates::_parse_body使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类templates
的用法示例。
在下文中一共展示了templates::_parse_body方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: js
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;
}
示例2: popup
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>");
}
示例3: Mynetworks
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);
}
示例4: ajax_pop
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);
}
示例5: SaveSettings
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);
}
示例6: smtp_sasl_password_id
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();
}
}
示例7: ApplyConfigKas
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));
}
示例8: hd_partinfos
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>");
}
示例9: main_add_tab
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;
}
示例10: List_entities
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;
}
示例11: popup
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);
}
示例12: available_languages
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);
}
示例13: LicenseDomain_Add
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');
}
示例14: iscsi_tabs
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>");
}
示例15: NGINX_EXPLAIN_REVERSE
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>";
//.........这里部分代码省略.........