本文整理汇总了PHP中isLoggedInAdmin函数的典型用法代码示例。如果您正苦于以下问题:PHP isLoggedInAdmin函数的具体用法?PHP isLoggedInAdmin怎么用?PHP isLoggedInAdmin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isLoggedInAdmin函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: redirect
<?php
// initialize
include_once '../../common/init.php';
if (!isLoggedInAdmin() && !isLoggedInOperator()) {
redirect('');
} else {
// include needed database functions
include_once $BASE_PATH . 'database/products.php';
$search = strip_tags($_POST['search']);
if (isset($_POST['pagenr'])) {
$pagenr = $_POST['pagenr'];
if ($search) {
$products = searchProductPageImage($search, $pagenr);
} else {
$products = getAllProductsPageImage($pagenr);
}
echo json_encode(array("numpages" => ceil($products[0]['count'] / $pagesize), "products" => $products));
}
}
示例2: redirect
<?php
// initialize
include_once '../../../common/init.php';
if (!isLoggedInAdmin()) {
redirect('');
} else {
// include needed database functions
include_once $BASE_PATH . 'database/auth.php';
$id = $_GET['id'];
if (!empty($id)) {
deleteManager($id);
}
redirect('pages/manager/managers/list_managers.php');
}
示例3: redirect
<?php
// initialize
include_once '../../../common/init.php';
if (isLoggedInAdmin()) {
redirect('pages/manager');
} else {
// display smarty template
$smarty->display('manager/auth/login.tpl');
}