本文整理汇总了PHP中SET_CACHED函数的典型用法代码示例。如果您正苦于以下问题:PHP SET_CACHED函数的具体用法?PHP SET_CACHED怎么用?PHP SET_CACHED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SET_CACHED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tabs
function tabs()
{
$html = GET_CACHED(__FILE__, __FUNCTION__, $_GET["newinterface"], TRUE);
if ($html != null) {
echo $html;
}
$page = CurrentPageName();
$users = new usersMenus();
$array["popup-main"] = "{BUILD_OPENVPN_CLIENT_CONFIG}";
$array["help"] = "{help}";
$font = "font-size:18px";
$newinterface = "&newinterface=yes";
while (list($num, $ligne) = each($array)) {
if ($num == "OPENVPN_SCHEDULE_RUN") {
$tab[] = "<li><a href=\"index.openvpn.schedule.php?popup=yes\"><span style='{$font}'>{$ligne}</span></a></li>\n";
continue;
}
$tab[] = "<li><a href=\"{$page}?{$num}=yes{$newinterface}\"><span style='{$font}'>{$ligne}</span></a></li>\n";
}
$tpl = new templates();
$html = build_artica_tabs($tab, "main_openvpn_builclientconfig");
$tpl = new templates();
$html = $tpl->_ENGINE_parse_body($html);
SET_CACHED(__FILE__, __FUNCTION__, null, $html);
echo $html;
}
示例2: refresh_service_status
function refresh_service_status()
{
if (!$GLOBALS["VERBOSE"]) {
if (GET_CACHED(__FILE__, __FUNCTION__, md5($_GET["refresh-service-status"]), false, 1)) {
return;
}
}
$refresh["C-ICAP"] = "APP_C_ICAP";
if (preg_match("#SERVICE-STATUS-ROUND-(.+)#", $_GET["refresh-service-status"], $re)) {
$tpl = new templates();
$key = $re[1];
if ($GLOBALS["VERBOSE"]) {
echo "Prod: {$key}\n<br>";
}
$content = GetIniContent($key);
if ($content == null) {
if (!is_file("ressources/logs/global.status.ini")) {
return;
}
$bsini = new Bs_IniHandler("ressources/logs/global.status.ini");
} else {
$bsini = new Bs_IniHandler();
$bsini->loadString($content);
}
if ($bsini->_params[$key]["service_name"] == null) {
return null;
}
$prod = $bsini->_params[$key]["service_name"];
$status = DAEMON_STATUS_ROUND($key, $bsini);
$html = $tpl->_ENGINE_parse_body($status);
SET_CACHED(__FILE__, __FUNCTION__, md5($_GET["refresh-service-status"]), $html);
echo $html;
}
}
示例3: tabs
function tabs()
{
if (GET_CACHED(__FILE__, __FUNCTION__)) {
return;
}
$squid = new squidbee();
$tpl = new templates();
$users = new usersMenus();
$page = CurrentPageName();
$sock = new sockets();
$array["popup"] = '{parameters}';
$array["schedules"] = '{schedules}';
$array["events"] = '{events}';
$fontsize = 18;
$t = time();
while (list($num, $ligne) = each($array)) {
if ($num == "schedules") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"schedules.php?ForceTaskType=69\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
continue;
}
if ($num == "events") {
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"cyrus.watchdog-events.php\" style='font-size:{$fontsize}px'><span>{$ligne}</span></a></li>\n");
continue;
}
$html[] = $tpl->_ENGINE_parse_body("<li><a href=\"{$page}?{$num}={$t}\" style='font-size:{$fontsize}'><span>{$ligne}</span></a></li>\n");
}
$html = build_artica_tabs($html, 'main_cyrus_backup');
SET_CACHED(__FILE__, __FUNCTION__, null, $html);
echo $html;
}
示例4: page
function page()
{
$html = "\n\n\n\n<script>\n\tLoadAjax('middle','squid.users.quicklinks.php');\n\tChangeHTMLTitleUserSquidPerform();\n\tRemoveSearchEnginePerform();\n</script>\n\n\n";
$tpl = new template_users($title, $html, $_SESSION, 0, 0, 0, $cfg);
error_log(basename(__FILE__) . " " . __FUNCTION__ . '() line ' . __LINE__);
$html = $tpl->web_page;
$html = str_replace("admin.tabs.php", "squid.users.admin.tabs.php", $html);
SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
echo $html;
return;
}
示例5: page
function page()
{
$sock = new sockets();
$EnableRemoteStatisticsAppliance = $sock->GET_INFO("EnableRemoteStatisticsAppliance");
$MalwarePatrolDatabasesCount = $sock->getFrameWork("cmd.php?MalwarePatrolDatabasesCount=yes");
if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
return;
}
$page = CurrentPageName();
$tpl = new templates();
$q = new mysql_squid_builder();
$users = new usersMenus();
$websitesnums = $q->COUNT_ROWS("visited_sites");
$websitesnums = numberFormat($websitesnums, 0, "", " ");
$sql = "DELETE FROM categorize WHERE LENGTH(pattern)=0";
$q->QUERY_SQL($sql);
$export = $q->COUNT_ROWS("categorize");
$export = numberFormat($export, 0, "", " ");
$categories = $q->COUNT_CATEGORIES();
$categories = numberFormat($categories, 0, "", " ");
$tablescat = $q->LIST_TABLES_CATEGORIES();
$tablescatNUM = numberFormat(count($tablescat), 0, "", " ");
$q = new mysql_squid_builder();
$requests = $q->EVENTS_SUM();
$requests = numberFormat($requests, 0, "", " ");
$PhishingURIS = $q->COUNT_ROWS("uris_phishing");
$PhishingURIS = numberFormat($PhishingURIS, 0, "", " ");
$MalwaresURIS = $q->COUNT_ROWS("uris_malwares");
$MalwaresURIS = numberFormat($MalwaresURIS, 0, "", " ");
$Computers = $q->COUNT_ROWS("webfilters_nodes");
$Computers = numberFormat($Computers, 0, "", " ");
$DAYSNumbers = $q->COUNT_ROWS("tables_day");
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT SUM(totalsize) as tsize FROM tables_day"));
$totalsize = FormatBytes($ligne["tsize"] / 1024);
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT AVG(cache_perfs) as pourc FROM tables_day"));
$pref = round($ligne["pourc"]);
$ligne = mysql_fetch_array($q->QUERY_SQL("SELECT COUNT(sitename) as tcount FROM visited_sites WHERE LENGTH(category)=0"));
$websitesnumsNot = numberFormat($ligne["tcount"], 0, "", " ");
$CachePermformance = $q->CachePerfHour();
if ($CachePermformance > -1) {
$color = "#E01313";
if ($CachePermformance > 20) {
$color = "#6DBB6A";
}
$cachePerfText = "\n\t\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b style='color:{$color}'>{$CachePermformance}%</b> {cache_performance} ({now})</td>\n\t\t</tr>\n\t\t";
}
$mouse = "OnMouseOver=\";this.style.cursor='pointer';\" OnMouseOut=\";this.style.cursor='default';\"";
$submenu = "\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$totalsize}</b> {downloaded_flow}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$pref}%</b> {cache_performance}</td>\n\t</tr>\n\t";
$main_table = "\n\t<table style='width:98%' class=form>\n\t<tr><td style='font-size:16px'>{statistics}::{status}</td></tr>\n\t{$cachePerfText}\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;><b>{$DAYSNumbers}</b> {daysOfStatistics}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$requests}</b> {requests}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px'><b>{$Computers}</b> {computers}</td>\n\t</tr>\t\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$websitesnums}</b> {visited_websites}</td>\n\t</tr>\t\n\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$categories}</b> {websites_categorized}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$PhishingURIS}</b> {phishing_uris}</td>\n\t</tr>\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$MalwaresURIS}</b> {viruses_uris}</td>\n\t</tr>\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$MalwarePatrolDatabasesCount}</b> Malware Patrol</td>\n\t</tr>\t\t\t\t\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$websitesnumsNot}</b> {not_categorized}</td>\n\t</tr>\t\t\t\t\n\t<tr>\n\t\t<td valign='top' style='font-size:14px;'><b>{$tablescatNUM}</b> {categories}</td>\n\t</tr>\n\t</table>\t\n";
$main_table = $tpl->_ENGINE_parse_body($main_table);
SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $main_table);
echo $main_table;
}
示例6: popup
function popup()
{
$t = $_GET["t"];
$title = "MYSQL_PASSWORD_USER_TEXT";
$username = Field_text("username-{$t}", null, "font-size:14px;padding:3px");
$page = CurrentPageName();
if (isset($_GET["root"])) {
$title = "change_root_password_text";
$username = "<input type='hidden' id='username-{$t}' name='username-{$t}' value='root'>\n\t\t<span style='font-size:14px;font-weight:bold'>root</span>";
}
$html = "\n\t\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td valign='top'>\n\t\t\t<img src='img/change-mysql-128.png'>\n\t\t</td>\n\t\t<td valign='top'><div class=explain style='font-size:14px'>{{$title}}</div>\n\t\t\t<table style='width:99.5%' class=form>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend nowrap style='font-size:14px'>{username}:</td>\n\t\t\t\t\t<td valign='top'>{$username}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td valign='top' class=legend style='font-size:14px'>{password}:</td>\n\t\t\t\t\t<td valign='top'>" . Field_password("password-{$t}", null, "font-size:14px;padding:3px;width:120px") . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=2 align='right'>\n\t\t\t\t\t\t<hr>" . button("{apply}", "ChangeMysqlPassword()", 16) . "\n\t\t\t\t\t\t\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\t\t\n\t\t</td>\n\t</tr>\n\t</table>\n\t<div id='mysql-connect-status' style='min-height:50px'></div>\n\t\n\t\n\t<div id='mysqldivForLogs' style='height:250px;overflow:auto;min-height:250px'></div>\n\t\n\t<script>\n\t\tfunction MySQLConnectStatus(){\n\t\t\tif(YahooWin3Open()){\n\t\t\t\tLoadAjaxTiny('mysql-connect-status','{$page}?mysql-connect-status=yes');\n\t\t\t}\n\t\t}\n\t\t\n\t\tsetTimeout('MySQLConnectStatus()', 3000);\n\t</script>\n\t\n\t";
$tpl = new templates();
$html = $tpl->_ENGINE_parse_body($html, "mysql.index.php");
SET_CACHED(__FILE__, __FUNCTION__, null, $html);
echo $html;
}
示例7: popup
function popup()
{
if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
return;
}
$ldap = new clladp();
$usersnumber = $ldap->COUNT_DE_USERS();
$ldap->ldap_close();
$tpl = new templates();
$users = $tpl->_ENGINE_parse_body("<i>{this_server_store}: <strong>{$usersnumber}</strong> {users}</i>");
$page = CurrentPageName();
$html = "<H1>{organizations}</H1>\n<input type='hidden' name='add_new_organisation_text' id='add_new_organisation_text' value='{add_new_organisation_text}'>\n<div style='font-size:16px;text-align:left;padding-bottom:5px;border-bottom:1px solid #CCCCCC'>{about_organization}</div>\n<div style='font-size:11px;text-align:right;padding-top:5px;'><span id='countdeusers'>{$users}</span></div>\n<div id='orgs' style='width:720px;height:350px;overflow:auto'></div>\n\n";
$tpl = new templates();
$html = $tpl->_ENGINE_parse_body($html);
SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
echo $html;
}
示例8: quicklinks_postfix
function quicklinks_postfix()
{
if (GET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__)) {
return;
}
$page = CurrentPageName();
$tpl = new templates();
$sock = new sockets();
$users = new usersMenus();
$EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
$InnoDBFilePerTableAsk = $sock->GET_INFO("InnoDBFilePerTableAsk");
if (!is_numeric($EnablePostfixMultiInstance)) {
$EnablePostfixMultiInstance = 0;
}
if (!is_numeric($InnoDBFilePerTableAsk)) {
$InnoDBFilePerTableAsk = 0;
}
$the_specified_module_is_not_installed = $tpl->javascript_parse_text("{the_specified_module_is_not_installed}");
if ($users->POSTFIX_INSTALLED) {
if ($users->AsPostfixAdministrator) {
$tr[] = paragrapheWin("messaging-server-white-64.png", "{APP_POSTFIX}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_postfix')");
$tr[] = paragrapheWin("64-transport-white.png", "{transport_table}", "AnimateDiv('BodyContent');\n\t\t\t\tLoadAjax('BodyContent','postfix.transport.table.php?hostname=master')");
}
}
if ($users->POSTFIX_INSTALLED) {
if ($users->ZARAFA_INSTALLED) {
if ($users->AsMailBoxAdministrator) {
$tr[] = paragrapheWin("zarafa-white-64.png", "{APP_ZARAFA}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_zarafa')");
$tr[] = paragrapheWin("webmail-64.png", "WebMail", "AnimateDiv('BodyContent');LoadAjax('BodyContent','zarafa.webmail.php')");
$tr[] = paragrapheWin("push-mail-64.png", "{smartphones}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','zarafa.zpush.php')");
}
}
}
//$postfix_multiple=$tpl->_ENGINE_parse_body(quicklinks_paragraphe("postfix-multi-48.png", "multiple_instances",null, "QuickLinkPostfixMulti()"));
if ($users->POSTFIX_INSTALLED) {
if ($users->cyrus_imapd_installed) {
if ($users->AsMailBoxAdministrator) {
$tr[] = paragrapheWin("bg-cyrus-white-64.png", "{mailboxes}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','cyrus.index.php?popup-index=yes');");
if ($users->roundcube_installed) {
$tr[] = paragrapheWin("webmail-white-64.png", "WebMail", "Loadjs('roundcube.index.php?script=yes&in-front-ajax=yes&newinterface=yes');");
} else {
$tr[] = paragrapheWin("64-deny-white.png", "WebMail", "alert('{$the_specified_module_is_not_installed}');");
}
$tr[] = paragrapheWin("database-check-64-white.png", "{backup}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','cyrus.backup.php?tabs=yes');");
}
}
if ($users->AsQuarantineAdministrator) {
$tr[] = paragrapheWin("quarantine-64-white.png", "{quarantine}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','domains.quarantine.php?SuperAdmin=yes');");
}
}
//certified-64-white.png
$opendkim = Paragraphe('certified-64.png', '{APP_OPENDKIM}', '{APP_OPENDKIM_TEXT}', "javascript:Loadjs('opendkim.php?mail=master')", null, 210, null, 0, true);
$tr[] = paragrapheWin("folder-64-backup-white.png", "{backupemail_behavior}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','postfix.backup.fly.php?hostname=master')");
$tr[] = paragrapheWin("certified-64-white.png", "{APP_OPENDKIM}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','opendkim.php?popup=yes&mail=master')");
//$backup=Paragraphe('folder-64-backup-grey.png','{backupemail_behavior}','{feature_disabled}',"",null,210,100);
//$backup=Paragraphe('folder-64-backup.png','{backupemail_behavior}','{backupemail_behavior_text}',"javascript:Loadjs('$page?script=backup')",null,210,100,0,true);
if ($EnablePostfixMultiInstance == 0) {
$postfix_multiple = null;
}
if (!$users->cyrus_imapd_installed) {
$cyrus = null;
}
//$tr[]=$postfix_multiple;
if ($users->POSTFIX_INSTALLED) {
if ($users->AsPostfixAdministrator) {
$tr[] = paragrapheWin("queue-64-white.png", "{queue_management}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_queue')");
$tr[] = paragrapheWin("whitelisting-white-64.png", "{white list}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','quicklinks.postfix.php?function=section_whitelist')");
if ($users->MAILMAN_INSTALLED) {
if (!$users->LIGHT_INSTALL) {
$tr[] = paragrapheWin("mailing-white-64.png", "mailman", "Loadjs('mailman.php?script=yes')");
}
}
$tr[] = paragrapheWin("fetch-white-64.png", "{APP_FETCHMAIL}", "AnimateDiv('BodyContent');LoadAjax('BodyContent','fetchmail.index.php?quicklinks=yes');");
}
}
$html = $tpl->_ENGINE_parse_body(CompileTr5_win($tr, true));
SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
echo $html;
}
示例9: main_services
//.........这里部分代码省略.........
if($users->APP_AUDITD_INSTALLED){
$auditd=Paragraphe('folder-watch-64.png','{APP_AUDITD}','{APP_AUDITD_TEXT}',"javascript:Loadjs('auditd.php');",'APP_AUDITD_TEXT');
}
if($users->DROPBOX_INSTALLED){
$dropbox=Paragraphe('dropbox-64.png','{APP_DROPBOX}','{APP_DROPBOX_TEXT}',"javascript:Loadjs('samba.dropbox.php')",null,210,null,0,false);
}
if($users->APACHE_INSTALLED){
$apache=Paragraphe('apache-groupeware-64.png','{APP_GROUPWARE_APACHE}','{APP_GROUPWARE_APACHE_TEXT}',"javascript:Loadjs('apache-groupware.php')",null,210,null,0,false);
}
if($users->CLAMD_INSTALLED){
$clamav=Paragraphe('clamav-64.png','{clamav_protect}','{clamav_protect_disable_text}',"javascript:Loadjs('clamav.enable.php')",null,210,null,0,false);
}
if($users->APACHE_INSTALLED){
if($users->PUREFTP_INSTALLED){
$free_web=Paragraphe('free-web-64.png','{free_web_servers}','{free_web_servers_text}',"javascript:Loadjs('freeweb.php')",null,210,null,0,false);
}
}
$APP_SABNZBDPLUS=Paragraphe('sab2_64-grey.png','{APP_SABNZBDPLUS}','{APP_SABNZBDPLUS_TEXT}',"",null,210,null,0,false);
if($users->APP_SABNZBDPLUS_INSTALLED){
$APP_SABNZBDPLUS=Paragraphe('sab2_64.png','{APP_SABNZBDPLUS}','{APP_SABNZBDPLUS_TEXT}',"javascript:Loadjs('sabnzbdplus.php')",null,210,null,0,false);
}
$metaconsole=Paragraphe("artica-meta-64.png","{meta-console}","{meta-console-text}","javascript:Loadjs('artica.meta.php')",null,210,null,0,false);
if($users->LXC_INSTALLED){
$LXC=Paragraphe('64-computer-alias.png','{APP_LXC}','{APP_LXC_TEXT}',"javascript:Loadjs('lxc.index.php')",null,210,null,0,false);
}
if($users->KASPERSKY_WEB_APPLIANCE){
$addressbook=null;
$userautofill=null;
$massmailing=null;
$APP_SABNZBDPLUS=null;
}
//ApacheGroupware
$tr[]=$add_remove;
$tr[]=$services;
$tr[]=$metaconsole;
$tr[]=$backuppc;
$tr[]=$auditd;
$tr[]=$phpldapadmin;
$tr[]=$apache;
$tr[]=$free_web;
$tr[]=$clamav;
$tr[]=$mldonkey;
$tr[]=$massmailing;
$tr[]=$addressbook;
$tr[]=$userautofill;
$tr[]=$obm2;
$tr[]=$dotclear;
$tr[]=$kav4fs;
$tr[]=$ocs;
$tr[]=$ocsAgent;
$tr[]=$dropbox;
$tr[]=$LXC;
$tr[]=$APP_SABNZBDPLUS;
$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==3){$t=0;$tables[]="</tr><tr>";}
}
if($t<3){
for($i=0;$i<=$t;$i++){
$tables[]="<td valign='top'> </td>";
}
}
$tables[]="</table>";
$html=implode("\n",$tables);
$tpl=new templates();
$html=$tpl->_ENGINE_parse_body($html);
SET_CACHED(__FILE__,__FUNCTION__,null,$html);
echo $html;
}
示例10: menus
function menus()
{
include_once 'ressources/class.templates.inc';
$tpl = new templates();
$restart_computer_and_defrag_warn = $tpl->javascript_parse_text("{restart_computer_and_defrag_warn}");
$page = CurrentPageName();
$users = new usersMenus();
if (!$users->AsSystemAdministrator) {
$html = "\n\t\t<input type='hidden' id='isanuser' name ='isanuser' value='1'>\n\t\t<center><H2 style='color:#d32d2d'>{logoff}</H2></center>\n\t\t";
$tpl = new templates();
echo $tpl->_ENGINE_parse_body($html);
exit;
}
$sock = new sockets();
$AllowShutDownByInterface = $sock->GET_INFO('AllowShutDownByInterface');
$DisableRebootOrShutDown = $sock->GET_INFO('DisableRebootOrShutDown');
if ($AllowShutDownByInterface == 1) {
$AllowShutDownByInterface_tr = "\n\t\t<td align='center'>\n\t\t\t" . imgtootltip('shutdown-computer-64.png', '{shutdown}', "Loadjs('logoff.php?shutdown-js=yes')") . "\n\t\t</td>\t\t\n\t\t";
}
$reboot = imgtootltip('reboot-computer-64.png', '{restart_computer}', 'RestartComputer()');
$rebootfsck = "<td align='center'>" . imgtootltip('reboot-computer-defrag-64.png', '{restart_computer_and_defrag}', 'RestartDefragComputer()') . "</td>";
if ($DisableRebootOrShutDown == 1) {
$reboot = imgtootltip('reboot-computer-64-grey.png', '{restart_computer}');
$rebootfsck = "<td align='center'>" . imgtootltip('reboot-computer-defrag-64-off.png', '{restart_computer_and_defrag}', 'blur()') . "</td>";
if ($AllowShutDownByInterface_tr != null) {
$AllowShutDownByInterface_tr = "<td align='center'>" . imgtootltip('shutdown-computer-64-grey.png', '{shutdown}') . "</td>";
}
}
$html = "\n\t<input type='hidden' id='shutdown_computer_text' value='{shutdown_computer_text}'>\n\t<input type='hidden' id='restart_computer_text' value='{restart_computer_text}'>\n\t<table style='width:100%'>\n\t<tr>\n\t\t<td align='center'>" . imgtootltip('64-disconnect.png', '{logoff}', "MyHref('logoff.php')") . "</td>\t\t\n\t\t<td align='center'>{$reboot}</td>\n\t\t{$rebootfsck}\n\t\t{$AllowShutDownByInterface_tr}\t\t\n\t</tr>\n\t</table>\n\t<script>\n\tvar x_RestartDefragComputer=function(obj){\n var tempvalue=obj.responseText;\n if(tempvalue.length>3){alert(tempvalue);}\n window.location ='{$page}';\n \n }\t\n\t\n\t\n\tfunction RestartDefragComputer(){\n\t\t\tif(confirm('{$restart_computer_and_defrag_warn}')){\n\t\t\t\tvar XHR = new XHRConnection();\n\t\t\t\tXHR.appendData('defrag','yes');\n\t\t\t\tXHR.sendAndLoad('{$page}', 'POST',x_RestartDefragComputer);\n\t\t\t}\n\t\t}\n\t</script>\n\t";
$tpl = new templates();
$page = $tpl->_ENGINE_parse_body($html);
SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $page);
echo $page;
}
示例11: external
function external()
{
$page = CurrentPageName();
$tpl = new template_users();
$t = time();
$html = "\r\n\t<div id='{$t}'></div>\r\n\t<script>\r\n\t\tLoadAjax('{$t}','{$page}?bypopup=yes');\r\n\t</script>";
$tpl = new template_users("{events}::{APP_SQUID}", $html, 0, 1, 1);
$tpl->_BuildPopUpNew($html, "{events}::{APP_SQUID}");
$html = $tpl->web_page;
SET_CACHED(__FILE__, __FUNCTION__, __FUNCTION__, $html);
echo $html;
}
示例12: left_menus_actions
//.........这里部分代码省略.........
if ($users->AsWebStatisticsAdministrator) {
$SQUIDEnable = $sock->GET_INFO("SQUIDEnable");
if (!is_numeric($SQUIDEnable)) {
$SQUIDEnable = 1;
}
if ($EnableRemoteStatisticsAppliance == 0) {
if ($SQUIDEnable == 1) {
if (!$users->SQUID_REVERSE_APPLIANCE) {
$f[] = left_menus_format("CATEGORIZE_A_WEBSITE", "32-categories-add.png", "Loadjs('squid.visited.php?add-www=yes')", "ADDWEBSITE_PROXY_EXPLAIN");
$f[] = left_menus_format("whitelist_website", "domain-whitelist-w32.png", "Loadjs('squid.urlrewriteaccessdeny.php?add-www-js=yes')", "whitelist_website_explain");
$f[] = left_menus_format("test_categories", "loupe-32.png", "Loadjs('squid.category.tests.php')", "squid_test_categories_explain");
}
}
}
}
}
}
if ($GLOBALS["VERBOSE"]) {
echo __LINE__ . " Saving {$cachePage}\n";
}
if ($users->POSTFIX_INSTALLED) {
$EnablePostfixMultiInstance = $sock->GET_INFO("EnablePostfixMultiInstance");
if (!is_numeric($EnablePostfixMultiInstance)) {
$EnablePostfixMultiInstance = 0;
}
if ($EnablePostfixMultiInstance == 1) {
if ($users->AsPostfixAdministrator) {
$f[] = left_menus_format("NEW_SMTP_INSTANCE", "32-network-server-add.png", "Loadjs('postfix.multiple.instances.wizard.php')");
}
}
$EnableAmavisDaemon = trim($sock->GET_INFO("EnableAmavisDaemon", true));
if (!is_numeric($EnableAmavisDaemon)) {
$EnableAmavisDaemon = 0;
}
if ($users->AsAnAdministratorGeneric) {
$f[] = left_menus_format("check_recipients", "check-32.png", "only:Loadjs('postfix.debug.mx.php')");
if ($users->AMAVIS_INSTALLED) {
if ($users->spamassassin_installed) {
if ($EnableAmavisDaemon == 1) {
$f[] = left_menus_format("SPAMASSASSIN_RULES", "script-32.png", "only:Loadjs('spamassassin.rules.php?byid=admin-start_page')");
}
}
}
}
}
if ($GLOBALS["VERBOSE"]) {
echo __LINE__ . " Saving {$cachePage} users->POWER_DNS_INSTALLED = {$users->POWER_DNS_INSTALLED} users->AsAnAdministratorGeneric={$users->AsAnAdministratorGeneric}\n";
}
if ($users->AsAnAdministratorGeneric) {
if (!$OnlySMTP) {
$f[] = left_menus_format("explorer", "explorer-32.png", "only:Loadjs('tree.php');", 'SHARE_FOLDER_TEXT');
}
if (!$OnlySMTP) {
$f[] = left_menus_format("ADD_COMPUTER", "computer-32-add.png", "only:YahooUser(1051,'domains.edit.user.php?userid=newcomputer\$&ajaxmode=yes','New computer');", "ADD_COMPUTER_TEXT");
}
if ($users->POWER_DNS_INSTALLED) {
$DisablePowerDnsManagement = $sock->GET_INFO("DisablePowerDnsManagement");
$EnablePDNS = $sock->GET_INFO("EnablePDNS");
$PowerDNSMySQLEngine = $sock->GET_INFO("PowerDNSMySQLEngine");
if (!is_numeric($EnablePDNS)) {
$EnablePDNS = 0;
}
if (!is_numeric($PowerDNSMySQLEngine)) {
$PowerDNSMySQLEngine = 1;
}
if (!is_numeric($DisablePowerDnsManagement)) {
$DisablePowerDnsManagement = 0;
}
if ($DisablePowerDnsManagement == 0) {
if ($EnablePDNS == 1) {
$f[] = left_menus_format("new_dns_entry", "filter-add-32.png", "only:YahooWin5('550','pdns.mysql.php?item-id=0&t={$t}','PowerDNS');", "new_dns_entry");
}
}
}
}
if ($GLOBALS["VERBOSE"]) {
echo __LINE__ . " Saving {$cachePage} -> " . count($f) . "\n";
}
if (count($f) > 0) {
$html = "\n\t\t<hr>\n\t\t<div style='font-size:16px;color:white;margin-top:8px;text-transform:capitalize;'>{actions}:</div>\n\t\t<table style='width:99%' class=form><tbody>\n\t\t" . @implode("\n", $f) . "\n\t\t</tbody>\n\t\t</table;\n\t\t";
if ($GLOBALS["VERBOSE"]) {
echo __LINE__ . " AS ROOT={$GLOBALS["AS_ROOT"]}\n";
}
if ($GLOBALS["AS_ROOT"]) {
if ($GLOBALS["VERBOSE"]) {
echo __LINE__ . " Saving {$cachePage}\n";
}
@mkdir(dirname($cachePage), 0777, true);
@file_put_contents($cachePage, $html);
@chmod($cachePage, 0777);
return;
}
if ($GLOBALS["VERBOSE"]) {
echo __LINE__ . " Saving {$cachePage} ->" . count($f) . "\n";
}
$html = $tpl->_ENGINE_parse_body($html);
SET_CACHED(__FILE__, __FUNCTION__, null, $html);
echo $html;
}
}
示例13: popup_status
function popup_status(){
if(GET_CACHED(__FILE__, __FUNCTION__)){return;}
$page=CurrentPageName();
$tpl=new templates();
$sock=new sockets();
$datas=base64_decode($sock->getFrameWork('cmd.php?Global-Applications-Status=yes'));
$ini=new Bs_IniHandler();
$ini->loadString($datas);
$users=new usersMenus();
if($users->YAFFAS_INSTALLED){
$yaffas="<div class=text-info>{APP_YAFFAS_TEXT}</div>";
}
if($ini->_params["APP_ZARAFA"]["master_version"]==null){unset($ini->_params["APP_ZARAFA"]["master_version"]);}
if(!isset($ini->_params["APP_ZARAFA"]["master_version"])){
$datas=base64_decode($sock->getFrameWork('cmd.php?zarafa-status=yes'));
$ini->loadString($datas);
}
$html="
<table style='width:100%'>
<tr>
<td valign='top' width=1%><span id='zarafa-box'></span></td>
<td valign='top' width=99%>
<H3 style='font-size:22px;font-weight:bold'>{APP_ZARAFA} v{$ini->_params["APP_ZARAFA"]["master_version"]}</H3>
<div id='zarafa-error' style='color:#FB0808;font-weight:bold;font-size:14px'></div>
<div class=text-info style='font-size:14px'>{APP_ZARAFA_TEXT}</div>$yaffas
<table style='width:100%'>
<tr>
<td width=1%><img src='img/arrow-right-24.png'></td>
<td nowrap>
<a href=\"javascript:blur();\"
OnClick=\"javascript:Loadjs('postfix.events.new.php?js-zarafa=yes');\"
style='font-size:13px;text-decoration:underline'>{APP_ZARAFA}:{events}</a>
</td>
</tr>
<tr>
<td width=1%><img src='img/arrow-right-24.png'></td>
<td nowrap><a href=\"javascript:blur();\"
OnClick=\"javascript:Loadjs('zarafa.audit.logs.php');\"
style='font-size:13px;text-decoration:underline'>{APP_ZARAFA}:{audit}</a></td>
</tr>
<tr>
<td width=1%><span id='mysql-dedie-img'></span></td>
<td nowrap><a href=\"javascript:blur();\" OnClick=\"javascript:Loadjs('ZarafaDB.wizard.php')\" id='mysql-dedie-text' style='font-size:13px;text-decoration:underline'></a></td>
</tr>
</table>
</td>
</tr>
</table>
<div id='zarafa-services-status' style='width:100%;'></div>
<script>
LoadAjax('zarafa-services-status','$page?services-status=yes');
LoadAjaxTiny('zarafa-box','$page?zarafa-box=yes');
</script>
";
$html=$tpl->_ENGINE_parse_body($html);
SET_CACHED(__FILE__, __FUNCTION__, null, $html);
echo $html;
}
示例14: main_graphs
function main_graphs()
{
if (GET_CACHED(__FILE__, __FUNCTION__)) {
return;
}
$page = CurrentPageName();
$t = time() . rand(0, time());
$html = "\n\t<div id='{$t}-1' style='width:990px;height:450px'></div>\n\t\n\t<div id='{$t}-2' style='width:990px;height:450px'></div>\n\t\n\t<div id='{$t}-3' style='width:990px;height:450px'></div>\n\t<script>\n\t\tAnimateDiv('{$t}-1');\n\t\tAnimateDiv('{$t}-2');\n\t\tAnimateDiv('{$t}-3');\n\t\t\n\t\tfunction F1{$t}(){\n\t\t\tLoadjs('{$page}?graph1=yes&container={$t}-1');\n\t\t}\n\t\t\n\t\tfunction F2{$t}(){\n\t\t\tLoadjs('{$page}?graph2=yes&container={$t}-2');\n\t\t}\t\t\n\n\t\t\n\t\tfunction F3{$t}(){\n\t\t\tLoadjs('{$page}?graph3=yes&container={$t}-3');\n\t\t}\t\t\n\t\tsetTimeout('F1{$t}()',500);\n\t\tsetTimeout('F2{$t}()',1000);\n\t\tsetTimeout('F3{$t}()',1500);\n\t\t\n\t</script>\n\t";
SET_CACHED(__FILE__, __FUNCTION__, null, $html);
echo $html;
}
示例15: main_switch
function main_switch()
{
cookies_main();
//if(GET_CACHED(__FILE__,__FUNCTION__,$_GET["main"])){return;}
$array["transport_settings"] = '{transport_settings}';
$array["security_settings"] = '{security_settings}';
$array["tweaks"] = '{tweaks}';
if (isset($_GET["ajaxmenu"])) {
echo "<div id='main_config_postfix'>";
}
switch ($_GET["main"]) {
case "transport_settings":
$html = Transport_rules_redirect();
//SET_CACHED(__FILE__,__FUNCTION__,$_GET["main"],$html);
echo $html;
break;
case "transport_settings_rules":
$html = Transport_rules();
//SET_CACHED(__FILE__,__FUNCTION__,$_GET["main"],$html);
echo $html;
break;
case "security_settings":
$html = security();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
case "security2":
$html = security2();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
case "tweaks":
$html = tweaks();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
case "filters":
$html = filters_section();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
case "mailbox":
$html = mailbox_section();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
case "status":
$html = status_section();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
case "filters-connect":
$html = filters_connect_section();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
default:
$html = Transport_rules();
SET_CACHED(__FILE__, __FUNCTION__, $_GET["main"], $html);
echo $html;
break;
}
if (isset($_GET["ajaxmenu"])) {
echo "</div>";
}
}