当前位置: 首页>>代码示例>>PHP>>正文


PHP templates类代码示例

本文整理汇总了PHP中templates的典型用法代码示例。如果您正苦于以下问题:PHP templates类的具体用法?PHP templates怎么用?PHP templates使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了templates类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: popup

function popup()
{
    $sock = new sockets();
    $page = CurrentPageName();
    $CyrusEnableLMTPUnix = $sock->GET_INFO("CyrusEnableLMTPUnix");
    if ($CyrusEnableLMTPUnix == null) {
        $CyrusEnableLMTPUnix = 1;
    }
    $nets["127.0.0.1"] = "127.0.0.1";
    $net = new networking();
    while (list($num, $ipaddr) = each($net->array_TCP)) {
        if ($ipaddr == null) {
            continue;
        }
        $nets[$ipaddr] = $ipaddr;
    }
    $CyrusLMTPListen = trim($sock->GET_INFO("CyrusLMTPListen"));
    if ($CyrusLMTPListen == null) {
        $CyrusLMTPListen = "127.0.0.1:2005";
    }
    if (preg_match("#(.+?):(.+)#", $CyrusLMTPListen, $re)) {
        $ipaddr_listen = $re[1];
        $port = $re[2];
    }
    $lmtp_unix = "/var/spool/postfix/var/run/cyrus/socket/lmtp";
    $html = "\n\t<div id='cyrus_lmtp_div'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td width=1% valign='top'><img src='img/database-connect-settings-90.png'></td>\n\t\t<td valign='top'>\n\t<div style='font-size:13px;padding:5px'>{cyrus_lmtp_howto}</div>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{enable_lmtp_unix}:</td>\n\t\t<td>" . Field_checkbox("CyrusEnableLMTPUnix", 1, $CyrusEnableLMTPUnix, "CyrusEnableLMTPUnixSwitch()") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:13px'>{listen_ip}:</td>\n\t\t<td>\n\t\t\t<table style='width:1%'>\n\t\t\t<tr>\n\t\t\t\t<td width=1%>" . Field_array_Hash($nets, "lmtp_ipaddr", $ipaddr_listen, null, null, 0, "font-size:13px;padding:3px") . "</td>\n\t\t\t\t<td width=1%>:</td>\n\t\t\t\t<td width=1%>" . Field_text("lmtp_port", $port, "font-size:13px;padding:3px;width:40px") . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>\n\t\t\t" . button("{apply}", "CyrusEnableLMTPUnixSave()") . "</td>\n\t</tr>\n\t</table>\n\t</td>\n\t</tr>\n\t</table>\n\t</div>\n\t<script>\n\t\n\tvar x_CyrusEnableLMTPUnixSave= function (obj) {\n\t\tYahooWinHide();\n\t}\t\n\t\n\tfunction CyrusEnableLMTPUnixSave(){\n\t\tvar XHR = new XHRConnection();\n\t\tif(document.getElementById('CyrusEnableLMTPUnix').checked){XHR.appendData('CyrusEnableLMTPUnix',1);}else{XHR.appendData('CyrusEnableLMTPUnix',0);}\n\t\tXHR.appendData('CyrusLMTPListen',document.getElementById('lmtp_ipaddr').value+':'+document.getElementById('lmtp_port').value);\n\t\tdocument.getElementById('cyrus_lmtp_div').innerHTML='<div style=\"width:100%\"><center style=\"margin:20px;padding:20px\"><img src=\"img/wait_verybig.gif\"></center></div>';\n\t\tXHR.sendAndLoad('{$page}', 'GET',x_CyrusEnableLMTPUnixSave);\n\t}\n\t\t\n\t\tCyrusEnableLMTPUnixSwitch();\n\t</script>\n\t";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:29,代码来源:cyrus.lmtp.php

示例2: PageFetchmail_status

function PageFetchmail_status()
{
    include_once 'ressources/class.fetchmail.inc';
    $tpl = new templates();
    $yum = new usersMenus();
    if ($yum->AsMailBoxAdministrator == false) {
        $html = $tpl->_ENGINE_parse_body("<h3>{not allowed}</H3>");
        return $html;
    }
    $status = new status(1);
    $stat = $status->fetchmail_satus();
    $html = $stat;
    if ($usersmenus->AutomaticConfig == false) {
        $html = $html . "<br><fieldset><legend>{apply config}</legend>\n\t\t\t\t\t<center><input type='button' value='{apply config}' OnClick=\"javascript:TreeFetchMailApplyConfig()\"></center>\n\t\t\t\t</fieldset>";
    }
    $fetch = new fetchmail();
    if (is_array($fetch->array_servers)) {
        $html = $html . "<fieldset>\n\t\t\t\t<legend>{servers_list}</legend>\n\t\t\t\t<center>\n\t\t\t\t<table style='width:90%;border:1px solid #CCCCCC'>\n\t\t\t\t<tr style='border-bottom:1px solid #CCCCCC'>\n\t\t\t\t\t<td colspan=2><strong>{servers_list}</td>\n\t\t\t\t\t<td align='center'><strong>{number_users}</strong></td>\n\t\t\t\t</tr>";
        while (list($num, $val) = each($fetch->array_servers)) {
            $html = $html . "<tr>\n\t\t\t\t\t<td width=1%><img src='img/webmin_on-22.gif'></td>\n\t\t\t\t\t<td><a href=\"javascript:TreeFetchmailShowServer('{$num}');\">{$num}</a></td>\n\t\t\t\t\t<td align='center'>" . count($val) . "</td>\n\t\t\t\t\t</tr>";
        }
        $html = $html . "</table></center></fieldset>";
    }
    return $tpl->_ENGINE_parse_body("<div id=status>{$html}</div>");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:25,代码来源:fetchmail.status.php

示例3: buildjs

function buildjs()
{
    $t = $_GET["t"];
    $time = time();
    $MEPOST = 0;
    header("content-type: application/x-javascript");
    $tpl = new templates();
    $page = CurrentPageName();
    $array = unserialize(@file_get_contents($GLOBALS["CACHEFILE"]));
    $prc = intval($array["POURC"]);
    $title = $tpl->javascript_parse_text($array["TEXT"]);
    $md5file = trim(md5_file($GLOBALS["LOGSFILES"]));
    echo "// CACHE FILE: {$GLOBALS["CACHEFILE"]} {$prc}%\n";
    echo "// LOGS FILE: {$GLOBALS["LOGSFILES"]} - {$md5file} " . strlen($md5file) . "\n";
    if ($prc == 0) {
        if (strlen($md5file) < 32) {
            echo "\n\t// PRC = {$prc} ; md5file={$md5file}\n\tfunction Start{$time}(){\n\t\t\tif(!RTMMailOpen()){return;}\n\t\t\tLoadjs('{$page}?build-js=yes&t={$t}&md5file={$_GET["md5file"]}');\n\t}\n\tsetTimeout(\"Start{$time}()\",1000);";
            return;
        }
    }
    if ($md5file != $_GET["md5file"]) {
        echo "\n\tvar xStart{$time}= function (obj) {\n\t\tif(!document.getElementById('text-{$t}')){return;}\n\t\tvar res=obj.responseText;\n\t\tif (res.length>3){\n\t\t\tdocument.getElementById('text-{$t}').value=res;\n\t\t}\t\t\n\t\tLoadjs('{$page}?build-js=yes&t={$t}&md5file={$md5file}');\n\t}\t\t\n\t\n\tfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\t\$('#progress-{$t}').progressbar({ value: {$prc} });\n\t\tvar XHR = new XHRConnection();\n\t\tXHR.appendData('Filllogs', 'yes');\n\t\tXHR.appendData('t', '{$t}');\n\t\tXHR.setLockOff();\n\t\tXHR.sendAndLoad('{$page}', 'POST',xStart{$time},false); \n\t}\n\tsetTimeout(\"Start{$time}()\",1000);";
        return;
    }
    if ($prc > 100) {
        echo "\n\tfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\tdocument.getElementById('title-{$t}').style.border='1px solid #C60000';\n\t\tdocument.getElementById('title-{$t}').style.color='#C60000';\n\t\t\$('#progress-{$t}').progressbar({ value: 100 });\n\t}\n\tsetTimeout(\"Start{$time}()\",1000);\n\t";
        return;
    }
    if ($prc == 100) {
        echo "\n\tfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\t\$('#progress-{$t}').progressbar({ value: {$prc} });\n\t\tLayersTabsAllAfter();\n\t\tRTMMailHide();\n\t\tCacheOff();\n\t\t{$at_the_end};\n\t\t}\n\tsetTimeout(\"Start{$time}()\",1000);\n\t";
        return;
    }
    echo "\t\nfunction Start{$time}(){\n\t\tif(!RTMMailOpen()){return;}\n\t\tdocument.getElementById('title-{$t}').innerHTML='{$title}';\n\t\t\$('#progress-{$t}').progressbar({ value: {$prc} });\n\t\tLoadjs('{$page}?build-js=yes&t={$t}&md5file={$_GET["md5file"]}');\n\t}\n\tsetTimeout(\"Start{$time}()\",1500);\n";
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:34,代码来源:squid.transparent.networks.progress.php

示例4: popup

function popup()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $group = $tpl->_ENGINE_parse_body("{group}");
    $members = $tpl->_ENGINE_parse_body("{members}");
    $description = $tpl->_ENGINE_parse_body("{description}");
    $new_group = $tpl->_ENGINE_parse_body("{new_group}");
    $tt = $_GET["t"];
    if (!is_numeric($tt)) {
        $tt = time();
    }
    $t = time();
    $ldap = new clladp();
    $ou = $_GET["ou"];
    if (is_base64_encoded($ou)) {
        $ou = base64_decode($ou);
    }
    $dn = urlencode($_GET["dn"]);
    $buttons = "\nbuttons : [\n{name: '<b>{$new_group}</b>', bclass: 'add', onpress : CreateGroup{$t}},\n],";
    if ($ldap->IsOUUnderActiveDirectory($ou)) {
        $buttons = null;
    }
    $html = "\n<span id='DomainsGroupFindPopupDiv'></span>\n<table class='flexRT{$t}' style='display: none' id='flexRT{$t}' style='width:100%'></table>\n\n\t\n<script>\n\$(document).ready(function(){\n\$('#flexRT{$t}').flexigrid({\n\turl: '{$page}?search=yes&ou={$_GET["ou"]}&t={$t}&tt={$tt}&dn={$dn}',\n\tdataType: 'json',\n\tcolModel : [\n\t\t{display: '{$group}', name : 'member', width : 183, sortable : false, align: 'left'},\t\n\t\t{display: '{$members}', name : 'email', width :71, sortable : false, align: 'center'},\n\t\t{display: '{$description}', name : 'desc', width : 199, sortable : true, align: 'left'},\n\t\t{display: '&nbsp;', name : 'del', width : 31, sortable : true, align: 'center'},\n\t\t\n\t\t],\n\t{$buttons}\n\tsearchitems : [\n\t\t{display: '{$group}', name : 'find-member'},\n\t\t],\n\tsortname: 'pattern',\n\tsortorder: 'asc',\n\tusepager: true,\n\ttitle: '',\n\tuseRp: true,\n\trp: 50,\n\tshowTableToggleBtn: false,\n\twidth: 550,\n\theight: 350,\n\tsingleSelect: true,\n\trpOptions: [10, 20, 30, 50,100,200]\n\t\n\t});   \n});\n\tfunction DomainsGroupFindPopupDivRefresh(){\n\t\t\$('#flexRT{$t}').flexReload();\n\t}\n\t\n\tfunction CreateGroup{$t}(){\n\t\tLoadjs('domains.edit.group.php?popup-add-group=yes&ou={$_GET["ou"]}&t={$t}&tt={$tt}');\n\t}\n\n\n</script>\n\n";
    echo $html;
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:domains.find.groups.php

示例5: popup

function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    $q = new mysql();
    $sql = "SELECT * FROM officials_domains ORDER BY domain";
    writelogs("{$sql}", __FUNCTION__, __FILE__, __LINE__);
    $results = $q->QUERY_SQL($sql, "artica_backup");
    if (!$q->ok) {
        echo "<H2>{$q->mysql_error}</H2>";
    }
    while ($ligne = mysql_fetch_array($results, MYSQL_ASSOC)) {
        $domains[$ligne["domain"]] = $ligne["domain"];
    }
    $OverWriteRestrictedDomains = 0;
    if ($users->OverWriteRestrictedDomains) {
        $OverWriteRestrictedDomains = 1;
    }
    if ($OverWriteRestrictedDomains == 1) {
        $over = "\n\t\t<hr>\n\t\t<div class=explain>{OverWriteRestrictedDomains_allow_text}</div>\n\t\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{domain}:</td>\n\t\t<td width=100%>" . Field_text("overwrite-domain", null, "font-size:16px;padding:3px;width:320px") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=2 align='right'><hr>" . button("{add}", "AddSubdomainOUOver()") . "</td>\n\t</tr>\n\t</table>\n\t\t";
    }
    $_GET["ou"] = urlencode($_GET["ou"]);
    $domains[null] = "{select}";
    $html = "\n\t<div id='add_subdomain_explain'></div>\n\t<div class=explain >{add_subdomain_explain}</div>\n\t\n\t<table style='width:99%' class=form>\n\t<tr>\n\t\t<td class=legend>{subdomain}:</td>\n\t\t<td width=50%>" . Field_text("subdomain", null, "font-size:16px;padding:3px;width:220px") . "</td>\n\t\t<td style='font-size:16px;padding:3px' width=1%><strong>.</strong></td>\n\t\t<td width=50%>" . Field_array_Hash($domains, "maindomain", null, "style:font-size:16px;padding:3px;") . "</td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=4 align='right'><hr>" . button("{add}", "AddSubdomainOU()") . "</td>\n\t</tr>\n\t</table>\n\t{$over}\n\t<script>\n\tvar x_AddSubdomainOU= function (obj) {\n\t\tvar results=obj.responseText;\n\t\tdocument.getElementById('subdomain').innerHTML='';\n\t\tif(results.length>3){alert(results);return;}\n\t\tYahooWin4Hide();\n\t\tLoadAjax('LocalDomainsList','domains.edit.domains.php?LocalDomainList=yes&ou={$_GET["ou"]}');\n\t}\t\t\n\t\t\n\t\tfunction AddSubdomainOU(){\n\t\t\tvar maindomain=document.getElementById('maindomain').value;\n\t\t\tvar subdomain=document.getElementById('subdomain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tif(subdomain.length<3){return;}\n\t\t\tvar domain=subdomain+'.'+maindomain;\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',domain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\n\t\t\t\n\t\t}\n\t\t\n\t\tfunction AddSubdomainOUOver(){\n\t\t\tvar maindomain=document.getElementById('overwrite-domain').value;\n\t\t\tif(maindomain.length<3){return;}\n\t\t\tvar XHR = new XHRConnection();\n\t\t\tXHR.appendData('AddNewInternetDomain','{$_GET["ou"]}');\n\t\t\tXHR.appendData('AddNewInternetDomainDomainName',maindomain);\t\n\t\t\tAnimateDiv('add_subdomain_explain');\n\t\t\tXHR.sendAndLoad('domains.edit.domains.php', 'GET',x_AddSubdomainOU);\t\t\t\n\t\t}\n\n\t</script>\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:27,代码来源:domains.add.localdomain.restricted.php

示例6: page

function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $html = "<div style='width:98%' class=form>\n\t\t\t<div style='font-size:18px' class=explain>{squid_articadb_restore_explain}</div>\n\t\t\t\n\t\t\t<center style='margin:30px'>" . button("{upload_backuped_container}", "Loadjs('squid.articadb.restore.upload.php')", 32) . "</center>\n\t</div>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:7,代码来源:squid.articadb.restore.php

示例7: popup

function popup()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $ID = $_GET["ID"];
    $sql = "SELECT * FROM webfilter_rules WHERE ID={$ID}";
    $ligne = mysql_fetch_array($q->QUERY_SQL($sql));
    $more8chars = $tpl->javascript_parse_text("{more8chars}");
    if ($ID == 0) {
        $sock = new sockets();
        $ligne = unserialize(base64_decode($sock->GET_INFO("DansGuardianDefaultMainRule")));
    }
    if ($ligne["BypassSecretKey"] == null) {
        $ligne["BypassSecretKey"] = md5(time());
    }
    $TIMES[0] = "{none}";
    $TIMES[300] = "5 {minutes}";
    $TIMES[900] = "15 {minutes}";
    $TIMES[1800] = "30 {minutes}";
    $TIMES[3600] = "1 {hour}";
    $TIMES[7200] = "2 {hours}";
    $TIMES[14400] = "4 {hours}";
    $t = time();
    $html = "\n\t<div id='{$t}'>\n\t<div class=text-info style='font-size:14px'>{TemporaryDeniedPageBypassExplain}<br>{BypassSecretKeyExplain}</div>\n\t<table style='width:99%' class=form>\n\t<tbody>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{bypassFor}:</td>\n\t\t\t<td>" . Field_array_Hash($TIMES, "bypass{$t}", $ligne["bypass"], "style:font-size:16px") . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class=legend style='font-size:16px'>{BypassSecretKey}:</td>\n\t\t\t<td>" . Field_password("BypassSecretKey{$t}", $ligne["BypassSecretKey"], "font-size:16px;width:220px") . "</td>\n\t\t</tr>\t\t\n\t\t<tr>\n\t\t\t<td colspan=2 align='right'><hr>" . button("{apply}", "bypassForSave()") . "</td>\n\t\t</tr>\n\t\t\n\t</tbody>\n\t</table>\n\t</div>\n\t<script>\n\tvar x_bypassForSave= function (obj) {\n\t\tvar res=obj.responseText;\n\t\tvar ID='{$ID}';\n\t\tif (res.length>3){alert(res);}\n\t\tYahooWin4Hide();\n\t}\n\t\n\t\tfunction bypassForSave(){\n\t\t      var XHR = new XHRConnection();\n\t\t      \n\t\t      var bypass=document.getElementById('bypass{$t}').value;\n\t\t      if(bypass.length<8){alert('{$more8chars}');return;}\n\t\t      XHR.appendData('bypass', document.getElementById('bypass{$t}').value);\n\t\t      XHR.appendData('BypassSecretKey', document.getElementById('BypassSecretKey{$t}').value);\n\t\t      XHR.appendData('ID','{$ID}');\n\t\t      AnimateDiv('{$t}');\n\t\t      XHR.sendAndLoad('{$page}', 'POST',x_bypassForSave);  \t\t\n\t\t}\n\t</script>\t\n\t";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:27,代码来源:dansguardian2.bypass.php

示例8: config_popup

function config_popup()
{
    $vpn = new openvpn();
    $config = $vpn->BuildClientconf($_SESSION["uid"]);
    $tbconfig = explode("\n", $config);
    $html_logs[] = htmlentities("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)");
    $uid = $_SESSION["uid"];
    writelogs("VPN config -> " . strlen($config) . " bytes length (" . count($tbconfig) . " lines)", __FUNCTION__, __FILE__, __LINE__);
    $sock = new sockets();
    if (!$sock->SaveConfigFile($config, "{$uid}.ovpn")) {
        $html_logs[] = htmlentities("Framework error while saving  -> {$uid}.ovpn;" . strlen($config) . " bytes length (" . count($tbconfig) . " lines)");
    }
    writelogs("sockets() OK", __FUNCTION__, __FILE__, __LINE__);
    //$datas=$sock->getfile('OpenVPNGenerate:'.$uid);
    $datas = $sock->getFrameWork("openvpn.php?build-vpn-user={$_SESSION["uid"]}&basepath=" . dirname(__FILE__));
    $tbl = explode("\n", $datas);
    $tbl = array_reverse($tbl);
    while (list($num, $line) = each($tbl)) {
        if (trim($line) == null) {
            continue;
        }
        $html_logs[] = "<div><code style='font-size:10px;color:black;'>" . htmlentities($line) . "</code></div>";
    }
    if (is_file('ressources/logs/' . $uid . '.zip')) {
        $download = "\n\t\t<center>\n\t\t\t<a href='ressources/logs/" . $uid . ".zip'><img src='img/download-64.png' title=\"{DOWNLOAD_CONFIG_FILES}\" style='padding:8Px;border:1px solid #055447;margin:3px'></a>\n\t\t</center>\n\t\t";
    }
    $html = "\n\t\n\t{$download}\n\t<H3>{events}</H3>\n\t" . ParagrapheTXT("<div style='width:100%;height:200px;overflow:auto'>" . implode("\n", $html_logs) . "</div>");
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:brucewu16899,项目名称:artica,代码行数:30,代码来源:vpn.php

示例9: page

function page()
{
    $q = new mysql_squid_builder();
    $timekey = date('Ymd');
    $timekeyMonth = date("Ym");
    $time = time();
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql_squid_builder();
    $tpl = new templates();
    $t = time();
    $per["1m"] = "{minute}";
    $per["5m"] = "5 {minutes}";
    $per["10m"] = "10 {minutes}";
    $per["1h"] = "{hour}";
    $per["1d"] = "{day}";
    $members["MAC"] = "{MAC}";
    $members["USERID"] = "{uid}";
    $members["IPADDR"] = "{ipaddr}";
    if (!isset($_SESSION["SQUID_STATS_MEM_DATE1"])) {
        $_SESSION["SQUID_STATS_MEM_DATE1"] = date("Y-m-d");
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_TIME1"])) {
        $_SESSION["SQUID_STATS_MEM_TIME1"] = "00:00";
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_DATE2"])) {
        $_SESSION["SQUID_STATS_MEM_DATE2"] = date("Y-m-d");
    }
    if (!isset($_SESSION["SQUID_STATS_MEM_TIME2"])) {
        $_SESSION["SQUID_STATS_MEM_TIME2"] = "23:00";
    }
    $html = "\n\t<div style='width:98%;margin-bottom:20px' class=form>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend>{interval}:</td>\n\t\t<td style='vertical-align:top;font-size:18px;'>" . Field_array_Hash($per, "interval-{$t}", "10m", "blur()", null, 0, "font-size:18px;") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{from_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("from-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE1"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("from-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME1"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px' class=legend nowrap>{to_date}:</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . field_date("to-date-{$t}", $_SESSION["SQUID_STATS_MEM_DATE2"], ";font-size:18px;width:160px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px'>" . Field_text("to-time-{$t}", $_SESSION["SQUID_STATS_MEM_TIME2"], ";font-size:18px;width:82px") . "</td>\n\t\t<td style='vertical-align:top;font-size:18px;;width:400px'>" . button("Go", "Run{$t}()", 18) . "</td>\n\t\t</tr>\n\t\t</table>\n\t</div>\n\t<div style='font-size:32px'>{proxy_memory_service_status}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='graph-{$t}'></div>\n\t<div style='font-size:32px'>{server_memory_consumption}</div>\n\t<div style='width:1280px;height:550px;margin-bottom:10px' id='memstats-{$t}'></div>\n\t\n\t\n\t\n\t\n\t\n\t\n<script>\n\nfunction Run{$t}(){\n\tvar date1=document.getElementById('from-date-{$t}').value;\n\tvar time1=document.getElementById('from-time-{$t}').value;\n\tvar date2=document.getElementById('to-date-{$t}').value\n\tvar time2=document.getElementById('to-time-{$t}').value;\n\tvar interval=document.getElementById('interval-{$t}').value;\n\tLoadjs('{$page}?query=yes&container=graph-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\tLoadjs('{$page}?memstats=yes&container=memstats-{$t}&date1='+date1+'&time1='+time1+'&date2='+date2+'&time2='+time2+'&interval='+interval);\n\n}\nRun{$t}();\n</script>\t\n";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:34,代码来源:squid.memory.status.php

示例10: page

function page()
{
    $sock = new sockets();
    $ArticaTechNetInfluxRepo = unserialize(base64_decode($sock->GET_INFO("ArticaTechNetProFTPDRepo")));
    $tpl = new templates();
    $version = $sock->GET_INFO("ProFTPDVersion");
    $manual_update = $tpl->javascript_parse_text("{manual_update}");
    $html = "\n\t\t\t\n\t<div style='font-size:30px;margin-bottom:30px'>{available_versions} &nbsp;|&nbsp; {current}:&nbsp;{$version}\n\t&nbsp;|&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('update.upload.php')\"\n\tstyle='text-decoration:underline'>{$manual_update}</a>\n\t&nbsp;|&nbsp;<a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('influx.refresh.update.php')\"\n\tstyle='text-decoration:underline'>{refresh}</a>\n\t\n\t\n\t</div>\n\t<table style='width:100%'>\n\t<tr>\n\t<th style='font-size:22px'>{version}</th>\n\t<th style='font-size:22px'>{OS}</th>\n\t<th style='font-size:22px'>{filename}</th>\n\t<th style='font-size:22px'>{filesize}</th>\n\t<th style='font-size:22px'>&nbsp;</tf>\n\t</tr>\t\t\t\t\n\t";
    $color = null;
    while (list($key, $array) = each($ArticaTechNetInfluxRepo)) {
        while (list($OS, $MAIN) = each($array)) {
            $URL = $MAIN["URL"];
            $VERSION = $MAIN["VERSION"];
            $FILESIZE = $MAIN["FILESIZE"];
            $FILENAME = $MAIN["FILENAME"];
            $FILESIZE = FormatBytes($FILESIZE / 1024);
            $button = button("{update2}", "Loadjs('proftpd.update.progress.php?key={$key}&OS={$OS}&filename={$FILENAME}');", 32);
            if ($color == null) {
                $color = "#F2F0F1";
            } else {
                $color = null;
            }
            $html = $html . "\n\t\t<tr style='background-color:{$color};height:80px'>\n\t\t\t<td style='font-size:28px;padding-left:10px'><center>{$VERSION}</center></td>\n\t\t\t<td style='font-size:28px;padding-left:10px'><center>{$OS}</center></td>\n\t\t\t<td style='font-size:28px;padding-left:10px;text-align:right'><a href=\"{$URL}\" target=_new style='text-decoration:underline'>{$FILENAME}</a></td>\t\n\t\t\t<td style='font-size:28px;padding-left:10px;text-align:right'>{$FILESIZE}</td>\t\n\t\t\t<td style='font-size:28px;padding-left:10px'><center>{$button}</center></td>\t\n\t\t</tr>\n\t\t";
        }
    }
    $html = $html . "</table>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:articatech,项目名称:artica,代码行数:28,代码来源:proftpd.update.php

示例11: popup

function popup()
{
    $priv = new usersMenus();
    $ct = new user($_GET["popup"]);
    $sock = new sockets();
    $lvm = new lvm_org($ct->ou);
    $array = $lvm->disklist;
    $paths["/home/{$ct->uid}"] = "/home/{$ct->uid} ({system_disk})";
    if (is_array($array)) {
        while (list($num, $val) = each($array)) {
            $sock = new sockets();
            $results = $sock->getFrameWork("cmd.php?fstab-get-mount-point=yes&dev={$num}");
            $array2 = unserialize(base64_decode($results));
            while (list($num, $mounted) = each($array2)) {
                $paths[trim("{$mounted}/{$ct->uid}")] = dirname(trim($mounted . '/' . $ct->uid) . "({dedicated_storage})");
            }
        }
    }
    $loginShell_hidden = Field_hidden('loginShell', $us->loginShell) . Field_hidden('uidNumber', $us->uidNumber);
    $loginShell = "<tr>\n\t\t\t\t\t<td align='right' nowrap class=legend {$styleTDRight}>{loginShell}:</strong>\n\t\t\t\t\t<td {$styleTDLeft}>\n\t\t\t\t\t\t\t<table style='width:100%;margin-left:-4px;'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align=left width=1%>" . Field_text('loginShell', $us->loginShell, 'width:90px') . "</td>\n\t\t\t\t\t\t\t<td align=left>" . help_icon('{loginShellText}', true) . "</td>\n\t\t\t\t\t\t\t<td class=legend nowrap>{UidNumber}:</td>\n\t\t\t\t\t\t\t<td align=left width=1%>" . Field_text('uidNumber', $us->uidNumber, 'width:90px') . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t</td>\n\t\t\t\t\t</tr>";
    $dotclear = "<tr>\n\t\t<td class=legend nowrap>{DotClearUserEnabled}:</td>\n\t\t<td align=left width=1%>" . Field_numeric_checkbox_img('DotClearUserEnabled', $us->DotClearUserEnabled) . "</td>\n\t\t<td align=left>" . help_icon('{DotClearUserEnabledText}', true) . "</td>\n\t</tr>";
    $form = Field_hidden('USER_SYSTEM_INFOS_UID', $ct->uid) . "\n\t<div style='text-align:right;margin-top:-5px;margin-bottom:9px;'><code>{home}:{$ct->homeDirectory}</code></div>\n\t<div id='ChangeUserPasswordID'>\n\t<table style='width:100%'>\n\t\n\t<tr>\n\t\t<td class=legend nowrap>{loginShell}:</td>\n\t\t<td align=left width=1%>" . Field_text('loginShell', $ct->loginShell, 'width:190px') . "</td>\n\t\t<td align=left>" . help_icon('{loginShellText}', true) . "</td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend nowrap>{homeDirectory}:</td>\n\t\t<td align=left width=1%>" . Field_array_Hash($paths, 'homeDirectory', $ct->homeDirectory) . "</td>\n\t\t<td align=left>" . help_icon('{homeDirectoryText}', true) . "</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td class=legend nowrap>{UidNumber}:</td>\n\t\t<td align=left width=1%>" . Field_text('UidNumber', $ct->uidNumber, 'width:90px') . "</td>\n\t\t<td align=left>" . help_icon('{UidNumberText}', true) . "</td>\n\t</tr>\n\t\t\n\t\t\n\t<tr><td colspan=3><hr></td></tr>\n\t<tr>\n\t\t<td colspan=3 align='right'>" . button("{edit}", "UserSystemInfosSave()") . "\n\t</tr>\n\t</table>\n\t</div>\n\t";
    $form = RoundedLightWhite($form);
    $safebox = Paragraphe("safe-box-64.png", "{coffrefort}", "{coffrefort_create_user}", "javascript:Loadjs('domains.edit.user.safebox.php?uid={$ct->uid}')");
    if (!$priv->CRYPTSETUP_INSTALLED) {
        $safebox = null;
    }
    $html = "<H1>{UserSystemInfos}</H1>\n\t<div style='margin-top:-35px;text-align:right;margin-bottom:30px;width:95%'>\n\t\t<i style='font-size:16px;font-weight:bold;padding-bottom:4px;color:white'>{$ct->DisplayName}</i>\n\t</div>\n\t<div id='UserSystemInfosSave'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t{$safebox}\n\t\t</td>\n\t\t<td valign='top'>\n\t\t\t{$form}\n\t\t</td>\n\t</tr>\n\t</table>\n\t\n\t</div>";
    $tpl = new templates();
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:,项目名称:,代码行数:31,代码来源:

示例12: task_list

function task_list()
{
    $tpl = new templates();
    $sock = new sockets();
    $ARRAY = unserialize(base64_decode($sock->getFrameWork("zarafa.php?zarafadb-processlist=yes")));
    $data = array();
    $data['page'] = 1;
    $data['total'] = 0;
    $data['rows'] = array();
    if ($_POST["query"] != null) {
        $tofind = $_POST["query"];
        $tofind = str_replace(".", "\\.", $tofind);
        $tofind = str_replace("[", "\\[", $tofind);
        $tofind = str_replace("]", "\\]", $tofind);
        $tofind = str_replace("*", ".*?", $tofind);
    }
    $c = 0;
    $seconds = $tpl->javascript_parse_text("{seconds}");
    while (list($ID, $ligne) = each($ARRAY)) {
        $color = "black";
        if ($tofind != null) {
            if (!preg_match("#{$tofind}#", $ligne[$_POST["qtype"]])) {
                continue;
            }
        }
        $c++;
        $kill = imgsimple("delete-24.png", null, "KillTHREAD('{$ID}')");
        $data['rows'][] = array('id' => md5(serialize($ligne)), 'cell' => array("<span style='font-size:14px;color:{$color}'>{$ID}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["USER"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["HOST"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["COMMAND"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["TIME"]}&nbsp;{$seconds}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["STATE"]}</span>", "<span style='font-size:14px;color:{$color}'>{$ligne["INFO"]}</span>", "<span style='font-size:14px;color:{$color}'>{$kill}</span>"));
    }
    $data['total'] = $c;
    echo json_encode($data);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:32,代码来源:zarafa.dabatase.processlist.php

示例13: 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");
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:31,代码来源:squid.accesslogs.tabs.php

示例14: page

function page()
{
    $page = CurrentPageName();
    $tpl = new templates();
    $users = new usersMenus();
    if (!$users->APACHE_MOD_BW) {
        echo FATAL_ERROR_SHOW_128("{the_specified_module_is_not_installed}");
        return;
    }
    $servername_enc = urlencode($_GET["servername"]);
    $page = CurrentPageName();
    $tpl = new templates();
    $q = new mysql();
    $sock = new sockets();
    $free = new freeweb($_GET["servername"]);
    $Params = $free->Params;
    $t = time();
    $ForceBandWidthModule = intval($Params["ModeBw"]["ForceBandWidthModule"]);
    $BandwidthAll = intval($Params["ModeBw"]["BandwidthAll"]);
    if ($BandwidthAll == 0) {
        $BandwidthAll = 1536000;
    }
    $BandwidthAll = $BandwidthAll / 1024;
    $html = "\n\n\t<div style='width:98%' class=form>\n\t" . Paragraphe_switch_img("{apache_Bandwidth_enable}", "{apache_Bandwidth_explain}", "bandlimit", "{$free->bandlimit}", null, 650) . "\n\t<table style='width:100%'>\n\t<td colspan=3 align=right>" . button("{rules}", "Loadjs('freeweb.mod.bw.php?servername={$servername_enc}')", 24) . "</td>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{limit_all_requests}:</td>\n\t\t<td>" . Field_checkbox("ForceBandWidthModule", 1, $ForceBandWidthModule) . "</td>\n\t\t<td></td>\n\t</tr>\n\t<tr>\n\t\t<td class=legend style='font-size:18px'>{default_limit}:</td>\n\t\t<td style='font-size:18px'>" . Field_text("BandwidthAll", $BandwidthAll, "font-size:18px;width:90px") . "&nbsp;KB/s</td>\n\t\t<td></td>\n\t</tr>\n\n\t<tr>\n\t\t<td colspan=3 align=right><hr>" . button("{apply}", "Save{$t}()", 24) . "</td>\n\t</tr>\n\t</table>\n\t<p>&nbsp;</p>\n\t</div>\n<script>\n\tvar xSave{$t}=function (obj) {\n\t\t\tvar results=obj.responseText;\n\t\t\tif(results.length>0){alert(results);}\n\t\t\tRefreshTab('main_freeweb_qos');\n\t}\n\t\nfunction Save{$t}(){\n\tvar XHR = new XHRConnection();\n\tXHR.appendData('bandlimit',document.getElementById('bandlimit').value);\n\tif(document.getElementById('ForceBandWidthModule').checked){\n\t\tXHR.appendData('ForceBandWidthModule',1);\n\t}else{\n\t\tXHR.appendData('ForceBandWidthModule',0);\n\t}\n\t\n\t\n\tXHR.appendData('BandwidthAll',document.getElementById('BandwidthAll').value);\n\tXHR.appendData('servername','{$_GET["servername"]}');\n\tXHR.sendAndLoad('{$page}', 'POST',xSave{$t});\n}\n</script>";
    echo $tpl->_ENGINE_parse_body($html);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:26,代码来源:freeweb.edit.bw.php

示例15: save

function save()
{
    $sock = new sockets();
    $sock->SET_INFO("EnableMacAddressFilter", $_POST["EnableMacAddressFilter"]);
    $tpl = new templates();
    echo $tpl->javascript_parse_text("{need_restart_reconfigure_proxy}", 1);
}
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:7,代码来源:squid.macaddr.php


注:本文中的templates类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。