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


PHP CacheEngine::CacheAdminPages方法代码示例

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


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

示例1: make_admin_menu

function make_admin_menu()
{
    global $dirs, $futurebb_user, $base_config;
    if (!file_exists(FORUM_ROOT . '/app_config/cache/admin_pages.php')) {
        CacheEngine::CacheAdminPages();
    }
    include FORUM_ROOT . '/app_config/cache/admin_pages.php';
    ?>
	<div class="forum_content leftmenu">
		<h2 class="boxtitle">Administration</h2>
		<ul class="leftnavlist">
		<?php 
    if ($futurebb_user['g_admin_privs']) {
        $p = $admin_pages;
    } else {
        $p = $mod_pages;
    }
    foreach ($p as $key => $val) {
        echo '<li';
        if ($dirs[2] == $key) {
            echo ' class="active"';
        }
        echo '><a href="' . $base_config['baseurl'] . '/admin/' . $key . '">' . htmlspecialchars(translate($val)) . '</a></li>';
    }
    ?>
		</ul>
	</div>
	<?php 
}
开发者ID:Cythral,项目名称:futurebb,代码行数:29,代码来源:admin.php

示例2: DBInsert

    }
    return $text;
}
if (isset($_POST['form_sent'])) {
    if (futurebb_hash($_POST['confirmpwd']) == $futurebb_user['password']) {
        if (proper_line_breaks($_POST['mod_pages']) != base64_decode($futurebb_config['mod_pages'])) {
            $q = new DBInsert('interface_history', array('action' => 'edit', 'area' => 'interface', 'field' => 'mod_pages', 'user' => $futurebb_user['id'], 'time' => time(), 'old_value' => base64_decode($futurebb_config['mod_pages'])), 'Failed to update interface editing history');
            $q->commit();
            set_config('mod_pages', base64_encode(proper_line_breaks($_POST['mod_pages'])));
        }
        if (proper_line_breaks($_POST['admin_pages']) != base64_decode($futurebb_config['admin_pages'])) {
            $q = new DBInsert('interface_history', array('action' => 'edit', 'area' => 'interface', 'field' => 'admin_pages', 'user' => $futurebb_user['id'], 'time' => time(), 'old_value' => base64_decode($futurebb_config['admin_pages'])), 'Failed to update interface editing history');
            $q->commit();
            set_config('admin_pages', base64_encode(proper_line_breaks($_POST['admin_pages'])));
        }
        CacheEngine::CacheAdminPages();
    } else {
        echo '<p>Your password was incorrect. Please try again.</p>';
    }
}
?>
<form action="<?php 
echo $base_config['baseurl'];
?>
/admin/interface/admin_pages" method="post" enctype="multipart/form-data">
	<p>Enter in the following format:<br /><code>url=&gt;text</code></p>
	<p>The URL is simply the part that goes after <code><?php 
echo $base_config['baseurl'];
?>
/admin/</code>, and the text is the language key to display in the link.</p>
	<h3>Administrator link list</h3>
开发者ID:Cythral,项目名称:futurebb,代码行数:31,代码来源:admin_pages.php

示例3: remove_admin_menu

 static function remove_admin_menu($url)
 {
     global $futurebb_config;
     $lines = explode("\n", base64_decode($futurebb_config['admin_pages']));
     foreach ($lines as $key => $line) {
         if (strpos($line, $url . '=>') === 0) {
             unset($lines[$key]);
         }
     }
     set_config('admin_pages', base64_encode(implode("\n", $lines)));
     $lines = explode("\n", base64_decode($futurebb_config['mod_pages']));
     foreach ($lines as $key => $line) {
         if (strpos($line, $url . '=>') === 0) {
             unset($lines[$key]);
         }
     }
     set_config('mod_pages', base64_encode(implode("\n", $lines)));
     if (file_exists(FORUM_ROOT . '/cache/admin_pages.php')) {
         //clear the cache
         unlink(FORUM_ROOT . '/cache/admin_pages.php');
     }
     CacheEngine::CacheAdminPages();
 }
开发者ID:Cythral,项目名称:futurebb,代码行数:23,代码来源:functions.php


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