本文整理汇总了PHP中admin_logged_in函数的典型用法代码示例。如果您正苦于以下问题:PHP admin_logged_in函数的具体用法?PHP admin_logged_in怎么用?PHP admin_logged_in使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了admin_logged_in函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: confirm_admin_logged_in
function confirm_admin_logged_in()
{
if (!admin_logged_in()) {
if (logged_in()) {
redirect_to("index.php?admin=0");
} else {
redirect_to("index.php");
}
}
}
示例2: set_time_limit
<?php
/**
* @package Helios Calendar
* @license GNU General Public License version 2 or later; see LICENSE
*/
set_time_limit(600);
define('hcAdmin', true);
include '../loader.php';
admin_logged_in();
action_headers();
$token = isset($_POST['token']) ? cIn(strip_tags($_POST['token'])) : '';
if (!check_form_token($token)) {
go_home();
}
include HCLANG . '/admin/tools.php';
$catID = $_POST['catID'];
$catIDWhere = '0,' . implode(',', $_POST['catID']);
$tID = isset($_POST['tID']) && is_numeric($_POST['tID']) ? cIn(strip_tags($_POST['tID'])) : 0;
$mID = isset($_POST['mID']) && is_numeric($_POST['mID']) ? cIn(strip_tags($_POST['mID'])) : 0;
$expVars = array(1 => array('tag' => '[event_id]', 'field' => '29'), 2 => array('tag' => '[event_title]', 'field' => '0'), 3 => array('tag' => '[event_desc]', 'field' => '1'), 4 => array('tag' => '[event_date]', 'field' => '30'), 5 => array('tag' => '[event_time_start]', 'field' => '2'), 6 => array('tag' => '[event_time_end]', 'field' => '3'), 7 => array('tag' => '[event_cost]', 'field' => '4'), 8 => array('tag' => '[event_billboard]', 'field' => '5'), 9 => array('tag' => '[contact_name]', 'field' => '6'), 10 => array('tag' => '[contact_email]', 'field' => '7'), 11 => array('tag' => '[contact_phone]', 'field' => '8'), 12 => array('tag' => '[contact_url]', 'field' => '9'), 13 => array('tag' => '[space]', 'field' => '10'), 14 => array('tag' => '[loc_name]', 'field' => 'X'), 15 => array('tag' => '[loc_address]', 'field' => 'X'), 16 => array('tag' => '[loc_address2]', 'field' => 'X'), 17 => array('tag' => '[loc_city]', 'field' => 'X'), 18 => array('tag' => '[loc_region]', 'field' => 'X'), 19 => array('tag' => '[loc_postal]', 'field' => 'X'), 20 => array('tag' => '[loc_country]', 'field' => 'X'), 21 => array('tag' => '[loc_url]', 'field' => '26'), 22 => array('tag' => '[cal_url]', 'field' => 'X'), 23 => array('tag' => '[date_series]', 'field' => 'X'), 24 => array('tag' => '[date_unique]', 'field' => '30'), 25 => array('tag' => '[category_unique]', 'field' => '31'), 26 => array('tag' => '[desc_notags]', 'field' => '1'));
$result = doQuery("SELECT * FROM " . HC_TblPrefix . "templates WHERE IsActive = 1 AND PkID = '" . $tID . "'");
if (hasRows($result)) {
$content = mysql_result($result, 0, 2);
$header = mysql_result($result, 0, 3);
$footer = mysql_result($result, 0, 4);
$ext = mysql_result($result, 0, 5);
$groupBy = mysql_result($result, 0, 7);
$sortBy = mysql_result($result, 0, 8);
$cleanUp = explode("\n", mysql_result($result, 0, 9));
$dateFormat = mysql_result($result, 0, 10);
示例3: unlink
<html>
<head>
<link rel='stylesheet prefetch' href='inc/jquery-ui.css'>
<link rel="stylesheet" href="inc/style.css">
</head>
<body>
<?php
if (file_exists("install.php")) {
unlink("install.php");
}
include_once "client_functions.php";
include_once "users.php";
include_once "admin_functions.php";
include_once "list.php";
if (admin_logged_in()) {
if (isset($_POST['create'])) {
echo '<div class="login-card">';
echo "<center>Password : " . create_user() . "</center>";
echo '</div>';
direct("admin.php", 3);
} elseif (isset($_POST['log_out'])) {
session_destroy();
direct('admin.php', 0);
} elseif (isset($_POST['update_book'])) {
$list = new BookList(get_pathname());
$list->saveList();
echo '<div class="login-card">';
echo "<center>List has been updated.</center>";
echo '</div>';
direct('admin.php', 3);
示例4: confirm_admin_logged_in
function confirm_admin_logged_in()
{
if (!admin_logged_in()) {
redirect_to("admin.php");
}
}