本文整理汇总了PHP中data::checkAdmin方法的典型用法代码示例。如果您正苦于以下问题:PHP data::checkAdmin方法的具体用法?PHP data::checkAdmin怎么用?PHP data::checkAdmin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类data
的用法示例。
在下文中一共展示了data::checkAdmin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: data
<?php
$data = new data();
$id = $_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id'];
$result = $data->checkAdmin($id);
?>
<?php
if ($result) {
?>
<div class = "admin-menu">
<a href='users' class = "admin-button">Управление пользователями</a>
<a href='m-news' class = "admin-button">Управление новостями</a>
</div>
<?php
}
示例2: data
<?php
$data = new data();
if (isset($_SESSION['idprofile'])) {
$id = $_SESSION['idprofile'];
$_SESSION['idprofile'] = $_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id'];
} else {
$id = $_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id'];
}
$result = $data->showProfile($id);
$result2 = $data->checkAdmin($_SESSION['user']['id'] ? $_SESSION['user']['id'] : $_COOKIE['user_id']);
if ($result2) {
$result3 = $data->showFollow($result->id_follow);
}
$today = date('Y-m-d');
if ($result->id_follow != 0) {
if ($result->data_finish <= $today) {
$status = "VIP";
} else {
$status = "Обыватель";
}
} else {
$status = "Обыватель";
}
?>
<div id= "lk">
<div id = "lk-profilebox">
<p id="lk-name"><?php
echo $result->name;
?>