本文整理匯總了PHP中admin::permission方法的典型用法代碼示例。如果您正苦於以下問題:PHP admin::permission方法的具體用法?PHP admin::permission怎麽用?PHP admin::permission使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類admin
的用法示例。
在下文中一共展示了admin::permission方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
<div class="navbar-inner">
<div class="navbar-header">
<a href="index.php" class="navbar-brand">
<div><img alt="Pixel Admin" src="admin/assets/images/pixel-admin/main-navbar-logo.png"></div>
<?php
echo admin_title;
?>
</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#main-navbar-collapse"><i class="navbar-icon fa fa-bars"></i></button>
</div>
<div id="main-navbar-collapse" class="collapse navbar-collapse main-navbar-collapse">
<div>
<ul class="nav navbar-nav">
<?php
foreach ($client_top_menu_links as $module => $infos) {
if ($admin->permission($infos["link"], $online_admin["group_id"]) == 1) {
?>
<li>
<a href="?s=display&manage=<?php
echo $infos["link"];
?>
"><i class="fa <?php
echo $infos["icon"];
?>
"></i> <?php
echo $infos["title"];
?>
</a>
</li>
<?php
}
示例2: form
include "class/class.form.php";
$form = new form();
include "class/class.pager.php";
$pager = new pager();
include "class/class.admin.php";
$admin = new admin();
include "class/class.site.php";
$site = new site();
if ($admin->online()) {
$online_admin = $core->get_row("admins", "*", "WHERE id='" . $_SESSION["admin_id"] . "'");
}
}
if ($_GET["dispatch"]) {
if ($admin->online()) {
$dispatch = explode('.', $_GET["dispatch"]);
if ($admin->permission($_GET["dispatch"], $online_admin["group_id"]) == 1) {
$module = $dispatch[0];
$file = $dispatch[1];
/* DEFINES */
define("MODULE_FOLDER", "admin/modules/" . $module . "/");
define("MODULE_DISPLAY_FOLDER", "admin/modules/" . $module . "/display/");
define("MODULE_PROCESS_FOLDER", "admin/modules/" . $module . "/process/");
define("MODULE_LINK", $module);
$inc_css = "admin/modules/" . $module . "/module.css";
if (file_exists($inc_css)) {
echo '<link rel="stylesheet" href="' . $inc_css . '"/>';
}
$inc_js = "admin/modules/" . $module . "/module.js";
if (file_exists($inc_js)) {
echo '<script type="text/javascript" src="' . $inc_js . '"></script>';
}