本文整理汇总了PHP中templates::_ENGINE_parse_body方法的典型用法代码示例。如果您正苦于以下问题:PHP templates::_ENGINE_parse_body方法的具体用法?PHP templates::_ENGINE_parse_body怎么用?PHP templates::_ENGINE_parse_body使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类templates
的用法示例。
在下文中一共展示了templates::_ENGINE_parse_body方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: table
function table()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
$sock = new sockets();
$t = time();
$websites = $tpl->_ENGINE_parse_body("{websites}");
$add_member = $tpl->_ENGINE_parse_body("{add_member}");
$delete = $tpl->javascript_parse_text("{delete}");
$aliases = $tpl->javascript_parse_text("{aliases}");
$about2 = $tpl->_ENGINE_parse_body("{about2}");
$new_report = $tpl->javascript_parse_text("{new_report}");
$report = $tpl->javascript_parse_text("{report}");
$title = $tpl->javascript_parse_text("{websites}: {not_categorized}");
$progress = $tpl->javascript_parse_text("{progress}");
$size = $tpl->javascript_parse_text("{size}");
$hits = $tpl->javascript_parse_text("{hits}");
$computers = $tpl->javascript_parse_text("{computers}");
$launch = $tpl->javascript_parse_text("{analyze}");
$export = $tpl->javascript_parse_text("{export}");
$q = new mysql_squid_builder();
$NOT_CATEGORIZED_TIME = intval(@file_get_contents("{$GLOBALS["BASEDIR"]}/NOT_CATEGORIZED_TIME"));
$lastscan = null;
if ($NOT_CATEGORIZED_TIME > 0) {
$lastscan = $tpl->javascript_parse_text("{last_scan} " . distanceOfTimeInWords($NOT_CATEGORIZED_TIME, time()));
}
//current_members
$t = time();
$buttons = "\n\tbuttons : [\n\t\t{name: '<strong style=font-size:22px>{$launch}</strong>', bclass: 'link', onpress : Launch{$t}},\n\t\t{name: '<strong style=font-size:22px>{$export}</strong>', bclass: 'link', onpress : export{$t}},\n\t],";
$html = "\n\t<table class='SQUID_NOT_CATEGORIZED_TABLE' style='display: none' id='SQUID_NOT_CATEGORIZED_TABLE' style='width:100%'></table>\n\t<script>\n\t\$(document).ready(function(){\n\t\$('#SQUID_NOT_CATEGORIZED_TABLE').flexigrid({\n\turl: '{$page}?search=yes&ID={$_GET["ID"]}',\n\tdataType: 'json',\n\tcolModel : [\n\t{display: '<strong style=font-size:18px>{$websites}</strong>', name : 'familysite', width : 418, sortable : true, align: 'left'},\n\t{display: '<strong style=font-size:18px>{$hits}</strong>', name : 'hits', width : 228, sortable : true, align: 'right'},\n\t{display: '<strong style=font-size:18px>{$size}</strong>', name : 'size', width : 228, sortable : false, align: 'right'},\n\t],\n\t{$buttons}\n\tsearchitems : [\n\t{display: '{$websites}', name : 'familysite'},\n\t\n\t],\n\tsortname: 'size',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<span style=font-size:30px>{$title} {$lastscan}</span>',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: '500',\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\n});\n});\n\n\nfunction Launch{$t}(){\n\tLoadjs('squid.statistics.not-categorized.progress.php');\n}\n\nfunction export{$t}(){\n\tLoadjs('{$page}?export=yes');\n}\n\nfunction GoToProxyAliases{$t}(){\n\tGoToProxyAliases();\n}\n\nfunction GotoNetworkBrowseComputers{$t}(){\n\tGotoNetworkBrowseComputers();\n}\n\nvar xAddcategory{$t}=function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\t\$('#SQUID_MAIN_REPORTS').flexReload();\n\t\$('#SQUID_MAIN_REPORTS_USERZ').flexReload();\n}\n\nfunction Addcategory{$t}(field,value){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ID','{$_GET["ID"]}');\n\tXHR.appendData('field',field);\n\tXHR.appendData('value',value);\n\tXHR.sendAndLoad('{$page}', 'POST',xAddcategory{$t});\n}\n</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例2: tabs
function tabs()
{
$tpl = new templates();
$array["index"] = '{parameters}';
$array["rules"] = '{rules}';
$array["transparent"] = '{transparent_rules}';
$array["events"] = '{events}';
//$array["plugins"]='{squid_plugins}';
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql();
$style = "style='font-size:22px'";
$t = time();
while (list($num, $ligne) = each($array)) {
if ($num == "index") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"ss5.php\" {$style}><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "events") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"ss5.events.php\" {$style}><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "rules") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"ss5.rules.php\" {$style}><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "transparent") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"ss5.transparent.php\" {$style}><span>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes\" {$style}><span>{$ligne}</span></a></li>\n");
}
echo build_artica_tabs($html, "ss5_main", 1490);
}
示例3: tabs
function tabs()
{
$uuid = $_GET["uuid"];
$fontsize = 18;
$tpl = new templates();
$page = CurrentPageName();
$array["RTT"] = "{realtime}";
$array["WEEK"] = "{this_week}";
$array["websites"] = "{websites}";
while (list($num, $ligne) = each($array)) {
if ($num == "RTT") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.bandwidth.rtt.week.php?uuid={$uuid}&meta=1\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "WEEK") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.bandwidth.rttw.week.php?uuid={$uuid}&meta=1\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "websites") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.bandwidth.rweb.week.php?uuid={$uuid}&meta=1\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes\" style='font-size:{$fontsize};font-weight:normal'><span>{$ligne}</span></a></li>\n");
}
$html = build_artica_tabs($html, 'main_bandwidth_meta_tabs');
echo $html;
}
示例4: rules
function rules()
{
$tpl = new templates();
$page = CurrentPageName();
$q = new mysql_squid_builder();
$action_delete_rule = $tpl->javascript_parse_text("{action_delete_rule}");
$rule_text = $tpl->_ENGINE_parse_body("{rule}");
$sql = "SELECT ID,enabled,groupmode,groupname FROM webfilter_rules ORDER BY groupname";
$results = $q->QUERY_SQL($sql);
if (!$q->ok) {
echo "<H2>{$q->mysql_error}</H2>";
}
$add = imgtootltip("plus-24.png", "{add} {rule}", "DansGuardianEditRule(-1)");
$select = imgtootltip("32-parameters.png", "{edit}", "DansGuardianEditRule('0','default')");
$style = "style='font-size:14px;font-weight:bold;color:black'";
$html = "<center><span id='DansAnimate'></span>\n<table cellspacing='0' cellpadding='0' border='0' class='tableView' style='width:99%'>\n<thead class='thead'>\n\t<tr>\n\t\t<th width=1%>{$add}</th>\n\t\t<th width=99%>{rules}</th>\n\t\t<th width=1%>{groups}</th>\n\t\t<th width=1%>{blacklists}</th>\n\t\t<th width=1%>{whitelists}</th>\n\t\t<th width=1%> </th>\n\t</tr>\n</thead>\n<tbody class='tbody'>\n\t\t<tr class=oddRow>\n\t\t\t<td width=1%>{$select}</td>\n\t\t\t<td {$style} width=99%>" . texthref("Default", "DansGuardianEditRule('0','default')") . "<div><i style='font-size:10px'>{$ligne["ipaddr"]}</i></div></a></td>\n\t\t\t<td width=1% align='center' {$style}>-</td>\n\t\t\t<td width=1% align='center' {$style}>" . COUNTDEGBLKS(0) . "</td>\n\t\t\t<td width=1% align='center' {$style}>" . COUNTDEGBWLS(0) . "</td>\n\t\t\t<td width=1% > </td>\n\t\t</tr>\n";
$classtr = "oddRow";
while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
if ($classtr == "oddRow") {
$classtr = null;
} else {
$classtr = "oddRow";
}
$select = imgtootltip("32-parameters.png", "{edit}", "DansGuardianEditRule('{$ligne["ID"]}','{$ligne["groupname"]}')");
$delete = imgtootltip("delete-32.png", "{delete}", "DansGuardianDeleteMainRule('{$ligne["ID"]}')");
$color = "black";
if ($ligne["enabled"] == 0) {
$color = "#CCCCCC";
}
$style = "style='font-size:14px;font-weight:bold;color:{$color}'";
$html = $html . "\n\t\t<tr class={$classtr}>\n\t\t\t<td width=1%>{$select}</td>\n\t\t\t<td {$style} width=99%>" . texthref($ligne["groupname"], "DansGuardianEditRule('{$ligne["ID"]}','{$ligne["groupname"]}')") . "<div><i style='font-size:10px'>{$ligne["ipaddr"]}</i></div></a></td>\n\t\t\t<td width=1% align='center' {$style}>" . COUNTDEGROUPES($ligne["ID"]) . "</td>\n\t\t\t<td width=1% align='center' {$style}>" . COUNTDEGBLKS($ligne["ID"]) . "</td>\n\t\t\t<td width=1% align='center' {$style}>" . COUNTDEGBWLS($ligne["ID"]) . "</td>\n\t\t\t<td width=1% >{$delete}</td>\n\t\t</tr>\n\t\t";
}
$html = $html . "</table>\n\t</center>\n\t<script>\n\t\tfunction DansGuardianEditRule(ID,rname){\n\t\t\tYahooWin3('600','dansguardian2.edit.php?ID='+ID,'{$rule_text}::'+ID+'::'+rname);\n\t\t}\n\t\t\n\t\tvar x_DansGuardianDeleteMainRule= function (obj) {\n\t\t\tvar res=obj.responseText;\n\t\t\tif (res.length>3){alert(res);}\n\t\t\tif(document.getElementById('main_dansguardian_tabs')){RefreshTab('main_dansguardian_tabs');}\n\t\t\tGroupsDansRuleSearch();\t\t\n\t\t\t\n\t\t\t\n\t\t}\t\t\n\t\t\n\t\tfunction DansGuardianDeleteMainRule(ID){\n\t\t\tif(confirm('{$action_delete_rule}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tAnimateDiv('DansAnimate');\n\t\t \tXHR.appendData('DansGuardianDeleteMainRule', ID);\n\t\t \tXHR.sendAndLoad('{$page}', 'POST',x_DansGuardianDeleteMainRule); \n\t\t\t}\n\t\t}\n\t\n\t\n\t</script>";
echo $tpl->_ENGINE_parse_body($html);
}
示例5: tabs
function tabs()
{
$fontsize = 18;
$tpl = new templates();
$page = CurrentPageName();
$users = new usersMenus();
$sock = new sockets();
$SquidUrgency = intval($sock->GET_INFO("SquidUrgency"));
if ($SquidUrgency == 1) {
echo FATAL_ERROR_SHOW_128("<div style='font-size:22px'>{proxy_in_emergency_mode}</div>\n\t\t\t<div style='font-size:18px'>{proxy_in_emergency_mode_explain}</div>\n\t\t\t<div style='text-align:right'><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('squid.urgency.php?justbutton=yes');\"\n\t\t\tstyle='text-decoration:underline'>{disable_emergency_mode}</a></div>\t\n\t\t\t");
return;
}
$array["thishour"] = '{this_hour}';
$array["thishour2"] = '{this_hour} ({compressed})';
while (list($num, $ligne) = each($array)) {
if ($num == "thishour") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "thishour2") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.compressed.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "thishour3") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.accesslogs.day.compressed.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}={$time}\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
}
echo build_artica_tabs($html, "main_squid_logs_subtabs");
}
示例6: certificate_edit_csr
function certificate_edit_csr()
{
$commonName = $_GET["CommonName"];
$page = CurrentPageName();
$q = new mysql();
$tpl = new templates();
$sql = "SELECT `csr`,`UsePrivKeyCrt` FROM sslcertificates WHERE CommonName='{$commonName}'";
$upload_text = $tpl->_ENGINE_parse_body("{upload_content}");
$t = $_GET["t"];
if (!is_numeric($t)) {
$t = time();
}
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
if (!$q->ok) {
senderror($q->mysql_error);
}
$tt = time();
if (strlen($ligne["csr"]) < 50) {
$sock = new sockets();
$CommonName = urlencode($CommonName);
echo base64_decode($sock->getFrameWork("system.php?BuildCSR={$commonName}"));
$ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup"));
}
$CommonNameURL = urlencode("{$commonName}");
$button_upload = button("{$upload_text}", "Loadjs('certificates.center.upload.php?certificate-upload-js=yes&CommonName={$CommonNameURL}&type=csr&t={$_GET["t"]}&textid=text{$t}&RunAfter=VerifyCertificate{$tt}',true)");
if ($ligne["UsePrivKeyCrt"] == 0) {
$button_upload = null;
}
$csr_ssl_explain = $tpl->_ENGINE_parse_body("{csr_ssl_explain}");
$html = "\n<div class=text-info style='font-size:18px'>{$csr_ssl_explain}</div>\n\t<div id='verify-{$tt}'></div>\n\t\t<center>{$button_upload}</center>\n\t\t<center style='margin:10px'>\n\t\t<textarea id='text{$t}' style='font-family:Courier New;\n\t\tfont-weight:bold;width:100%;height:520px;border:5px solid #8E8E8E;\n\t\toverflow:auto;font-size:16px !important;width:99%;height:390px'>{$ligne["csr"]}</textarea>\n\t\t</center>\n\t</div>\n<script>\n\tfunction VerifyCertificate{$tt}(){\n\tLoadAjax('verify-{$tt}','{$page}?verify-csr=yes&CommonName={$CommonNameURL}',true);\n}\nVerifyCertificate{$tt}();\n</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例7: table
function table()
{
$page = CurrentPageName();
$tpl = new templates();
$t = time();
$new_webiste = $tpl->_ENGINE_parse_body("{new_website}");
$email = $tpl->_ENGINE_parse_body("{email}");
$enabled = $tpl->_ENGINE_parse_body("{enabled}");
$delete_this_member_ask = $tpl->javascript_parse_text("{delete_this_member_ask}");
$SSL_BUMP_WL = $tpl->_ENGINE_parse_body("{SSL_BUMP_WL}");
$website_ssl_wl_help = $tpl->javascript_parse_text("{website_ssl_wl_help}");
$parameters = $tpl->javascript_parse_text("{parameters}");
$website_name = $tpl->javascript_parse_text("{websites}");
$apply = $tpl->javascript_parse_text("{apply}");
$decrypted_ssl_websites = $tpl->javascript_parse_text("{decrypted_ssl_websites}");
$squid = new squidbee();
if ($squid->hasProxyTransparent == 1) {
$explain = $tpl->_ENGINE_parse_body("<div style='font-weight:bold;color:#BD0000'>{sslbum_wl_not_supported_transp}</div>");
}
//$q=new mysql_squid_builder();
//$q->QUERY_SQL("ALTER TABLE `usersisp` ADD UNIQUE (`email`)");
$buttons = "\n\tbuttons : [\n\t{name: '<b>{$new_webiste}</b>', bclass: 'Add', onpress : sslBumbAddwl},\n\t{name: '<b>{$apply}</b>', bclass: 'Apply', onpress : Apply{$t}}\n\t],";
$html = "\n\t<table class='flexRT{$t}' style='display: none' id='flexRT{$t}' style='width:100%'></table>\n\n\n\t<script>\n\trow_id='';\n\t\$(document).ready(function(){\n\t\$('#flexRT{$t}').flexigrid({\n\turl: '{$page}?whitelist-list=yes&t={$t}',\n\tdataType: 'json',\n\tcolModel : [\n\t{display: '{$website_name}', name : 'website_name', width : 606, sortable : false, align: 'left'},\n\t{display: '{$enabled}', name : 'enabled', width : 68, sortable : true, align: 'center'},\n\t{display: ' ', name : 'delete', width : 68, sortable : false, align: 'center'},\n\t],\n\t{$buttons}\n\tsearchitems : [\n\t{display: '{$website_name}', name : 'website_name'},\n\t],\n\tsortname: 'website_name',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<strong style=font-size:18px>{$decrypted_ssl_websites}</strong>',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '95%',\n\theight: 310,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\n});\n});\n\nvar x_sslBumbAddwl{$t}=function(obj){\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue);}\n\t\$('#flexRT{$t}').flexReload();\n}\n\nfunction sslBumbAddwlCheck(e){\n\tif(checkEnter(e)){sslBumbAddwl();}\n}\n\nfunction sslBumbAddwl(){\nvar www=prompt('{$website_ssl_wl_help}');\nif(www){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('website_ssl_wl',www);\n\tXHR.sendAndLoad('{$page}', 'GET',x_sslBumbAddwl{$t});\n\t}\n}\n\nvar x_sslbumpEnableW=function(obj){\n\tvar tempvalue=obj.responseText;\n\tif(tempvalue.length>3){alert(tempvalue);}\n\tif(row_id.length>0){ \$('#row'+row_id).remove();}\n}\n\nfunction sslbumpEnableW(idname){\n\tvar XHR = new XHRConnection();\n\tif(document.getElementById(idname).checked){XHR.appendData('enable',1);}else{XHR.appendData('enable',0);}\n\tXHR.appendData('website_ssl_eble',idname);\n\tXHR.sendAndLoad('{$page}', 'GET',x_sslbumpEnableW);\n}\n\nfunction Apply{$t}(){\n\tLoadjs('squid.compile.progress.php');\n}\n\nfunction sslbumpAllowSquidSSLDropBox(){\nvar XHR = new XHRConnection();\nif(document.getElementById('AllowSquidSSLDropBox').checked){XHR.appendData('AllowSquidSSLDropBox',1);}else{XHR.appendData('AllowSquidSSLDropBox',0);}\nXHR.sendAndLoad('{$page}', 'POST',x_sslBumbAddwl{$t});\n\n}\n\nfunction sslbumpAllowSquidSSLSkype(){\nvar XHR = new XHRConnection();\nif(document.getElementById('AllowSquidSSLSkype').checked){XHR.appendData('AllowSquidSSLSkype',1);}else{XHR.appendData('AllowSquidSSLSkype',0);}\nXHR.sendAndLoad('{$page}', 'POST',x_sslBumbAddwl{$t});\n}\n\nfunction sslBumSettings(){\nYahooWin3('550','{$page}?add-params=yes','{$parameters}');\n}\n\n\nfunction sslbumpDeleteW(ID,rowid){\nrow_id=rowid;\nvar XHR = new XHRConnection();\nXHR.appendData('website_ssl_del',ID);\nXHR.sendAndLoad('{$page}', 'GET',x_sslBumbAddwl{$t});\n}\n\n\n</script>\n\n";
echo $html;
}
示例8: popup
function popup()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
$sock = new sockets();
$t = time();
$members = $tpl->_ENGINE_parse_body("{members}");
$add_member = $tpl->_ENGINE_parse_body("{add_member}");
$delete = $tpl->javascript_parse_text("{delete}");
$aliases = $tpl->javascript_parse_text("{aliases}");
$about2 = $tpl->_ENGINE_parse_body("{about2}");
$new_report = $tpl->javascript_parse_text("{new_report}");
$report = $tpl->javascript_parse_text("{report}");
$progress = $tpl->javascript_parse_text("{progress}");
$size = $tpl->javascript_parse_text("{size}");
$hits = $tpl->javascript_parse_text("{hits}");
$computers = $tpl->javascript_parse_text("{computers}");
$uid = $tpl->javascript_parse_text("{uid}");
$q = new mysql_squid_builder();
$mac = $tpl->javascript_parse_text("{MAC}");
$ipaddr = $tpl->javascript_parse_text("{ipaddr}");
$websites = $tpl->javascript_parse_text("{websites}");
$categories = $tpl->javascript_parse_text("{categories}");
$TIMES_SLOT["day"] = "{this_day}";
$TIMES_SLOT["hour"] = "{this_hour}";
$TIMES_SLOT["week"] = "{this_week}";
$TIMES_SLOT["month"] = "{this_month}";
$title = $tpl->javascript_parse_text("{$TIMES_SLOT[$_GET["timeslot"]]}");
$t = time();
$buttons = "\n\tbuttons : [\n\t{name: '<strong style=font-size:16px>{$uid}</strong>', bclass: 'link', onpress : GoToUID{$t}},\n\t{name: '<strong style=font-size:16px>{$mac}</strong>', bclass: 'link', onpress : GotoMAC{$t}},\n\t{name: '<strong style=font-size:16px>{$ipaddr}</strong>', bclass: 'link', onpress : GotoIPADDR{$t}},\n\t{name: '<strong style=font-size:16px>{$websites}</strong>', bclass: 'link', onpress : GotoWEBS{$t}},\n\t{name: '<strong style=font-size:16px>{$categories}</strong>', bclass: 'link', onpress : GotoCATS{$t}},\n\t],";
$html = "\n\t<table class='RTT{$t}' style='display: none' id='RTT{$t}' style='width:100%'></table>\n\t<script>\n\$(document).ready(function(){\n\t\$('#RTT{$t}').flexigrid({\n\turl: '{$page}?search=yes×lot={$_GET["timeslot"]}',\n\tdataType: 'json',\n\tcolModel : [\n\t{display: '<strong style=font-size:18px>{$members}</strong>', name : 'USER', width : 418, sortable : true, align: 'left'},\n\t{display: '<strong style=font-size:18px>{$size}</strong>', name : 'SIZE', width : 228, sortable : true, align: 'right'},\n\t],\n\t{$buttons}\n\tsearchitems : [\n\t{display: '{$members}', name : 'USER'},\n\t\n\t],\n\tsortname: 'SIZE',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<span style=font-size:26px>" . $tpl->javascript_parse_text("{$TIMES_SLOT[$_GET["timeslot"]]}") . "</span>',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: '500',\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t});\n});\n\nfunction GoToUID{$t}(){\n\$('#RTT{$t}').flexOptions({url: '{$page}?search=yes×lot={$_GET["timeslot"]}'}).flexReload();\n\n}\nfunction GotoMAC{$t}(){\n\$('#RTT{$t}').flexOptions({url: '{$page}?search=yes×lot={$_GET["timeslot"]}&SUBDIR=MAC'}).flexReload();\n}\nfunction GotoIPADDR{$t}(){\n\$('#RTT{$t}').flexOptions({url: '{$page}?search=yes×lot={$_GET["timeslot"]}&SUBDIR=IPADDR'}).flexReload();\n}\nfunction GotoWEBS{$t}(){\n\$('#RTT{$t}').flexOptions({url: '{$page}?search=yes×lot={$_GET["timeslot"]}&SUBDIR=WEBS'}).flexReload();\n}\nfunction GotoCATS{$t}(){\n\$('#RTT{$t}').flexOptions({url: '{$page}?search=yes×lot={$_GET["timeslot"]}&SUBDIR=CATS'}).flexReload();\n}\n\n</script>\n";
echo $html;
}
示例9: tabs
function tabs()
{
$tpl = new templates();
$stats_appliance = new stats_appliance();
$array["popup"] = '{active_requests}';
$time = time();
$style = "style='font-size:22px'";
$page = CurrentPageName();
$t = time();
while (list($num, $ligne) = each($array)) {
if ($num == "categories") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.active.requests.categories.php\"><span {$style}>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "categories-day") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.active.requests.categories.day.php\"><span {$style}>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "popup-members") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.active.requests.members.php\"><span {$style}>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "popup-members-day") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"squid.active.requests.members.day.php\"><span {$style}>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes&t={$time}\"><span {$style}>{$ligne}</span></a></li>\n");
}
echo build_artica_tabs($html, "squid_active_requests_relatime");
}
示例10: tabs
function tabs()
{
$tpl = new templates();
$array["popup-index"] = '{index}';
$array["smtp_connection_cache_destinations"] = '{smtp_connection_cache_destinations}';
$array["address_verify_map"] = '{address_verify_map}';
$array["title_postfix_tuning"] = '{title_postfix_tuning}';
if ($_GET["hostname"] == null) {
$_GET["hostname"] = "master";
}
$page = CurrentPageName();
$t = time();
while (list($num, $ligne) = each($array)) {
if ($num == "smtp_connection_cache_destinations") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"postfix.performances.cache.php?with-tabs=yes&hostname={$_GET["hostname"]}\"><span style='font-size:13px'>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "address_verify_map") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"postfix.performances.verify.map.php?with-tabs=yes&hostname={$_GET["hostname"]}\"><span style='font-size:13px'>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "title_postfix_tuning") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"postfix.performances.tuning.php?with-tabs=yes&hostname={$_GET["hostname"]}\"><span style='font-size:13px'>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}=yes&hostname={$_GET["hostname"]}\"><span style='font-size:13px'>{$ligne}</span></a></li>\n");
}
echo "{$menus}\n\t<div id=main_post_perfs_tabs style='width:100%;height:650px;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\$('#main_post_perfs_tabs').tabs();\n\t\t\t\n\t\t\t\n\t\t\t});\n\t\t</script>";
}
示例11: page
function page()
{
$t = time();
$page = CurrentPageName();
$tpl = new templates();
$users = new usersMenus();
$sock = new sockets();
$t = time();
$websites = $tpl->_ENGINE_parse_body("{websites}");
$add_website = $tpl->_ENGINE_parse_body("{add_website}");
$select = $tpl->javascript_parse_text("{select}");
$aliases = $tpl->javascript_parse_text("{aliases}");
$about2 = $tpl->_ENGINE_parse_body("{about2}");
$new_report = $tpl->javascript_parse_text("{new_report}");
$report = $tpl->javascript_parse_text("{report}");
$title = $tpl->javascript_parse_text("{statistics}:: {websites}");
$progress = $tpl->javascript_parse_text("{progress}");
$run = $tpl->javascript_parse_text("{run}");
$size = $tpl->javascript_parse_text("{size}");
$hits = $tpl->javascript_parse_text("{hits}");
$q = new mysql_squid_builder();
$build = $tpl->javascript_parse_text("{rebuild_items}");
$buttons = "\n\tbuttons : [\n\t{name: '<strong style=font-size:16px >{$build}</strong>', bclass: 'Reconf', onpress : BuildCache{$t}},\n\t],";
$html = "\n\t<table class='SQUID_FAMZ' style='display: none' id='SQUID_FAMZ' style='width:100%'></table>\n\t<script>\n\t\$(document).ready(function(){\n\t\$('#SQUID_FAMZ').flexigrid({\n\turl: '{$page}?search=yes&callback={$_GET["callback"]}',\n\tdataType: 'json',\n\t\tcolModel : [\n\t\t{display: '{$websites}', name : 'familysite', width : 390, sortable : true, align: 'left'},\n\t\t{display: '{$size}', name : 'size', width : 124, sortable : true, align: 'right'},\n\t\t{display: '{$hits}', name : 'hits', width : 124, sortable : true, align: 'right'},\n\t\t{display: '{$select};', name : 'explain', width : 70, sortable : false, align: 'center'},\n\t\t],\n\t\t{$buttons}\n\tsearchitems : [\n\t{display: '{$websites}', name : 'familysite'},\n\t\n\t],\n\tsortname: 'size',\n\tsortorder: 'desc',\n\tusepager: true,\n\ttitle: '<span style=font-size:18px>{$title}</span>',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: '350',\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t});\n\t});\n\t\n\t\nfunction NewReport{$t}(){\n\tLoadjs('squid.browse-familysites.php?callback=Addcategory{$t}');\n}\n\nfunction BuildCache{$t}(){\n\tLoadjs('squid.browse-familysites.progress.php');\n}\n\nvar xAddcategory{$t}=function (obj) {\n\tvar results=obj.responseText;\n\tif(results.length>0){alert(results);}\n\t\$('#SQUID_MAIN_REPORTS').flexReload();\n\t\$('#SQUID_FAMZ').flexReload();\n}\n\t\nfunction Addcategory{$t}(categorykey){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('ID','{$_GET["ID"]}');\n\tXHR.appendData('categorykey',categorykey);\n\tXHR.sendAndLoad('{$page}', 'POST',xAddcategory{$t});\n}\n</script>\n\t";
echo $tpl->_ENGINE_parse_body($html);
}
示例12: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
$folders = $tpl->_ENGINE_parse_body("{folders}");
$enabled = $tpl->_ENGINE_parse_body("{enabled}");
$proto = $tpl->_ENGINE_parse_body("{proto}");
$uri = $tpl->_ENGINE_parse_body("{url}");
$member = $tpl->_ENGINE_parse_body("{member}");
$user = $tpl->_ENGINE_parse_body("{user}");
$title = $tpl->_ENGINE_parse_body("{today}: {realtime_requests} " . date("H") . "h");
$new_rule = $tpl->_ENGINE_parse_body("{new_rule}");
$delete_rule = $tpl->javascript_parse_text("{delete_rule}");
$refresh = $tpl->_ENGINE_parse_body("{refresh}");
$t = time();
$fetch = new Fetchmail_settings();
$rule = $fetch->LoadRule($_GET["ruldeid"]);
$port = 143;
$tls = "notls";
if ($rule["ssl"] == 1) {
$port = 993;
$tls = "ssl/novalidate-cert";
}
$title = "{$rule["poll"]}:{$port}/{$tls}";
$import = $tpl->_ENGINE_parse_body("{import}");
$buttons = "\n\tbuttons : [\n\t{name: '{$new_rule}', bclass: 'Add', onpress : add_fetchmail_rules{$t}},\n\t{name: '{$import}', bclass: 'Copy', onpress : ImportBulk{$t}},\n\t{name: '{$refresh}', bclass: 'Reload', onpress : Reload{$t}},\n\t\t],\t";
$buttons = null;
$html = "\n\t<div>\n\t<table class='flexRT{$t}' style='display: none' id='flexRT{$t}' style='width:100%'></table>\n\t</div>\n\t\n<script>\nvar fetchid=0;\n\$(document).ready(function(){\n\$('#flexRT{$t}').flexigrid({\n\turl: '{$page}?browse-imap=yes&ruldeid={$_GET["ruldeid"]}&uid={$_GET["uid"]}&t={$t}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '{$folders}', name : 'uid', width :542, sortable : false, align: 'left'},\n\t\t{display: '{$enabled}', name : 'enabled', width :31, sortable : false, align: 'left'},\n\t\t],{$buttons}\n\t\n\tsearchitems : [\n\t\t{display: '{$folders}', name : 'folders'},\n\t\t],\n\tsortname: 'uid',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '{$title}',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: 620,\n\theight: 408,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t}); \n});\n\n \n\n \n function Reload{$t}(){\n \t\$('#flexRT{$t}').flexReload();\n }\n \n\tvar x_EnableImapf= function (obj) {\n\t\tvar tempvalue=obj.responseText;\n\t\tif(tempvalue.length>3){alert(tempvalue);return;}\n\t} \n \n function EnableImapf(md,folderbased){\n \t var XHR = new XHRConnection();\n \t if(document.getElementById('ck_'+md).checked){XHR.appendData('enabled',1);}else{XHR.appendData('enabled',0);}\n \t XHR.appendData('ruldeid','{$_GET["ruldeid"]}');\n \t XHR.appendData('uid','{$_GET["uid"]}');\n \t XHR.appendData('folderenc',folderbased);\n \t XHR.appendData('md5',md);\n \t XHR.setLockOff();\n \t XHR.sendAndLoad('{$page}', 'POST',x_EnableImapf); \n }\n\n</script>";
echo $html;
return;
}
示例13: PageAveserverLicence
function PageAveserverLicence()
{
$yum = new usersMenus();
$tpl = new templates();
$tpl = new templates();
if ($yum->AsPostfixAdministrator == false) {
return $tpl->_ENGINE_parse_body("<h3>{not allowed}</H3>");
}
$sock = new sockets();
$file = $sock->getfile("aveserver_licence");
$file = htmlentities($file);
$table = explode("\n", $file);
$html = "<table style='width:100%'>";
while (list($num, $val) = each($table)) {
if (preg_match('#(.+)\\:(.+)#', $val, $regs)) {
if ($val != null) {
$html = $html . "<tr><td nowrap align='right'><strong>{$regs[1]}: </strong><td style='border-bottom:1px solid #CCCCCC'>{$regs[2]}</td></tr>";
}
}
if (preg_match('#Key file\\s+(.+?)\\.key#', $val, $regs)) {
$html = $html . "<tr><td nowrap align='right' colspan=2><input type='button' value='{delete} {$regs[1]}' OnClick=\"javascript:TreeAveServerLicenceDeleteKey('{$regs[1]}.key');\"></td></tr>";
}
if (preg_match("#Serial#i", $val)) {
$html = $html . "<tr><td colspan=2 style='border-bottom:2px solid #CCCCCC'> </td></tr>";
}
}
$html = "<h4>{licence status}</h4>{$html}</table>";
return $tpl->_ENGINE_parse_body("{$html}");
}
示例14: popup
function popup()
{
$q = new mysql();
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$hostname = $_GET["hostname"];
//
$array["backup-status"] = "{backupemail_behavior}";
$array["backup-options"] = '{options}';
$array["backup-storage"] = '{storage}';
$fontsize = "font-size:18px;";
while (list($num, $ligne) = each($array)) {
if ($num == "backup-options") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"postfix.archiver.php?hostname={$hostname}\" style='{$fontsize}'><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "backup-status") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"postfix.archiver.php?hostname={$hostname}&status=yes\" style='{$fontsize}'><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "backup-storage") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"postfix.archiver.database.php?hostname={$hostname}&status=yes\" style='{$fontsize}'><span>{$ligne}</span></a></li>\n");
continue;
}
$html[] = "<li><a href=\"{$page}?{$num}=yes\" style='{$fontsize}' ><span>{$ligne}</span></a></li>\n";
}
$html = build_artica_tabs($html, 'main_backup_fly', 975) . "\n\t\t<script>LeftDesign('folder-256-backup-white-opac20.png');</script>";
echo $html;
}
示例15: popup
function popup()
{
$page = CurrentPageName();
$tpl = new templates();
if ($_GET["prepend"] == null) {
$_GET["prepend"] = 0;
}
if ($_GET["prepend-guid"] == null) {
$_GET["prepend-guid"] = 0;
}
$OnlyGUID = $_GET["OnlyGUID"];
$OnlyAD = $_GET["OnlyAD"];
if (!is_numeric($OnlyGUID)) {
$OnlyGUID = 0;
}
if (!is_numeric($OnlyAD)) {
$OnlyAD = 0;
}
if ($_GET["callback"] != null) {
$callback = "{$_GET["callback"]}(id,prependText,guid);WinORGHide();return;";
}
$GroupName = $tpl->_ENGINE_parse_body("{groupname}");
$Members = $tpl->_ENGINE_parse_body("{members}");
$item_add = $tpl->javascript_parse_text("{item_added}");
$Select = $tpl->javascript_parse_text("{select}");
$title = $tpl->javascript_parse_text("{browse_remote_ldap_server}");
$t = time();
$CallBack2 = null;
if ($_GET["CallBack2"] != null) {
$CallBack2 = "{$_GET["CallBack2"]}(base64,Name);";
}
$html = "\n\t<table class='table{$t}' style='display: none' id='table{$t}' style='width:99%'></table>\n\t<script>\n\t\$(document).ready(function(){\n\t\$('#table{$t}').flexigrid({\n\turl: '{$page}?search-groups=yes&t={$t}&ADID={$_GET["ADID"]}&MainFunction={$_GET["MainFunction"]}&field-user={$_GET["field-user"]}&field-type={$_GET["field-type"]}&function={$_GET["function"]}&t={$t}&CallBack2={$_GET["CallBack2"]}',\n\tdataType: 'json',\n\tcolModel : [\n\t{display: ' ', name : 'select', width : 42, sortable : false, align: 'center'},\n\t{display: '{$GroupName}', name : 'groupname', width : 372, sortable : true, align: 'left'},\n\t{display: '{$Members}', name : 'none', width : 67, sortable : false, align: 'center'},\n\t{display: '{$Select}', name : 'none', width : 79, sortable : false, align: 'center'},\n\t],\n\n\tsearchitems : [\n\t{display: '{$GroupName}', name : 'groupname'},\n\t],\n\tsortname: 'groupname',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '<span style=font-size:18px>{$title}</span>',\n\tuseRp: true,\n\trp: 15,\n\tshowTableToggleBtn: false,\n\twidth: '99%',\n\theight: 400,\n\tsingleSelect: true\n\n});\n});\nfunction BrowseFindUserGroupClick(e){\nif(checkEnter(e)){BrowseFindUserGroup();}\n}\n\nvar x_BrowseFindUserGroup=function (obj) {\ntempvalue=obj.responseText;\ndocument.getElementById('finduserandgroupsidBrwse').innerHTML=tempvalue;\n}\n\n\nfunction BrowseFindUserGroup(){\nLoadAjax('finduserandgroupsidBrwse','{$page}?query='+escape(document.getElementById('BrowseUserQuery').value)+'&prepend={$_GET["prepend"]}&field-user={$_GET["field-user"]}&prepend-guid={$_GET["prepend-guid"]}&OnlyUsers={$_GET["OnlyUsers"]}&OnlyGUID={$_GET["OnlyGUID"]}&organization={$_GET["organization"]}&OnlyGroups={$_GET["OnlyGroups"]}&callback={$_GET["callback"]}&NOComputers={$_GET["NOComputers"]}&Zarafa={$_GET["Zarafa"]}&OnlyAD={$OnlyAD}');\n\n}\n\n\nfunction BrowseSelect{$t}(id,prependText,guid){\n{$callback}\n\tvar prepend={$_GET["prepend"]};\n\tvar prepend_gid={$_GET["prepend-guid"]};\n\tvar OnlyGUID={$OnlyGUID};\n\tif(document.getElementById('{$_GET["field-user"]}')){\n\tvar selected=id;\n\tif(OnlyGUID==1){\n\tdocument.getElementById('{$_GET["field-user"]}').value=guid;\n\tWinORGHide();\n\treturn;\n}\n\nif(prepend==1){selected=prependText+id;}\nif(prepend_gid==1){\nif(guid>1){\nselected=prependText+id+':'+guid;\n}\n}\ndocument.getElementById('{$_GET["field-user"]}').value=selected;\nWinORGHide();\n\t}\n}\n\nfunction EditField{$t}(base64,Name){\n\tvar fieldtype='{$_GET["field-type"]}';\n\tvar ADID='{$_GET["ADID"]}';\n\tif(document.getElementById('{$_GET["field-user"]}')){\n\t\tif(fieldtype==2){\n\t\t\tdocument.getElementById('{$_GET["field-user"]}').value='AD:'+ADID+':'+base64;\n\t\t\talert('{$item_add} mode:'+fieldtype+' - '+'`'+Name+'`');\n\t\t\t{$CallBack2}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(fieldtype==3){\n\t\t\tdocument.getElementById('{$_GET["field-user"]}').value=Name;\n\t\t\talert('{$item_add} `'+Name+' - '+'`'+Name+'`');\n\t\t\t{$CallBack2}\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(fieldtype==4){\n\t\t\tdocument.getElementById('{$_GET["field-user"]}').value='ExtLDAP:'+Name+':'+base64;\n\t\t\tdocument.getElementById('{$_GET["field-user"]}').disabled=true;\n\t\t\talert('{$item_add} `'+Name+' - '+'`'+Name+'`');\n\t\t\t{$CallBack2}\n\t\t\treturn;\n\t\t}\t\t\n\t\t\n\t\tdocument.getElementById('{$_GET["field-user"]}').value=base64;\n\t\talert('{$item_add} mode:'+fieldtype+' - '+'`'+Name+'`');\n\t\t{$CallBack2}\n\t}\n}\n</script>\n";
echo $html;
}