本文整理汇总了PHP中Admin::logout方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::logout方法的具体用法?PHP Admin::logout怎么用?PHP Admin::logout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Admin
的用法示例。
在下文中一共展示了Admin::logout方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Admin
* Project: The Three Little Pigs - Siri Proxy | Web Interface
* Project start date: 21-01-2012
* Author: Wouter De Schuyter
* Website: www.wouterds.be
* E: info[@]wouterds[.]be
* T: www.twitter.com/wouterds
*
* File: admin.php
* Last update: 22-02-2012
******************************************************************/
$admin = new Admin();
$log = new Log();
if ($admin->checkLoggedIn()) {
echo '<h1>Admin Panel | <a href="?page=' . $_GET['page'] . '&logout=true">Logout</a></h1>';
if ($_GET['logout']) {
if ($admin->logout()) {
echo '<p class="notification green">You have successfully logged out. Please wait until the page reloads.</p>';
redirect("?page=" . $_GET['page'], "3");
} else {
echo '<p class="notification red">Something went wrong while logging you out. Please try again.</p>';
}
} else {
// Logged IN Content
echo '<ul id="subNavigation">';
echo '<li><a href="?page=' . $_GET['page'] . '&action=home"';
if ($_GET['action'] == "home" || empty($_GET['action'])) {
echo ' class="current"';
}
echo '>Home</a></li>';
echo '<li><a href="?page=' . $_GET['page'] . '&action=general"';
if ($_GET['action'] == "general") {
示例2: logout
public function logout()
{
Registry::get("session")->erase("member")->erase("organization");
parent::logout();
}
示例3: foreach
<?php
require 'config.php';
$admins = Admin::get("1");
//print_r($admins);
foreach ($admins as $a) {
$a[0];
}
$curdate = new DateTime('l');
$curdate = $curdate->format('d M Y H:i');
$admin = new Admin();
//$admin->admin_id = $a[0];
//$admin->admin_last_login = $curdate;
//$admin->save();
Admin::logout();
header("location: index.php");
示例4: Admin
<?php
ob_start();
//published/unpublished
require_once '../classes/admin.php';
$obj_admin = new Admin();
require_once '../classes/product.php';
$obj_product = new Product();
session_start();
if ($_SESSION['admin_id'] == NULL) {
header("Location:index.php");
}
if (isset($_GET['l_id']) == 'logout') {
$obj_admin->logout();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- start: Meta -->
<meta charset="utf-8">
<title>Bootstrap Metro Dashboard by Dennis Ji for ARM demo</title>
<meta name="description" content="Bootstrap Metro Dashboard">
<meta name="author" content="Dennis Ji">
<meta name="keyword" content="Metro, Metro UI, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
<!-- end: Meta -->
<!-- start: Mobile Specific -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- end: Mobile Specific -->
示例5: Comments
break;
case 'verify':
$check = $obj->verifyUser($_POST);
break;
default:
$check = false;
break;
}
$header = $check === true ? 'Location: /admin/' : "Location: /{$obj->url0}/error/";
}
}
} else {
if ($_POST['action'] == 'cmnt_post') {
$cmnt = new Comments();
$header = $cmnt->postComment();
} else {
if ($_GET['action'] == 'cmnt_delete') {
$cmnt = new Comments();
$header = $cmnt->deleteComment($_GET['bid'], $_GET['cmntid']);
} else {
if ($_GET['action'] == 'logout') {
$admin = new Admin();
$check = $admin->logout();
$header = $check === true ? 'Location: /' : 'Location: /admin/error/';
} else {
$header = "Location: /";
}
}
}
}
header($header);
示例6: doLogout
function doLogout()
{
Admin::logout(__SELF__);
}
示例7: switch
*/
switch ($_GET['admin']) {
case 'login':
$admin->login();
break;
case 'add_site':
$admin->add_site(@$_GET['token']);
break;
case 'delete_site':
$admin->delete_site(@$_GET['id'], @$_GET['token']);
break;
case 'reset_visit':
$admin->reset_visit(@$_GET['token']);
break;
case 'logout':
$admin->logout(@$_GET['token']);
break;
default:
die(header('Location: index.php'));
break;
}
}
?>
</div>
</td>
</tr>
</table>
</div>
<!-- Fine Corpo Pagina -->
示例8: dirname
<?php
/**
* @package iCMS V3.1
* @copyright 2007-2009, iDreamSoft
* @license http://www.idreamsoft.cn iDreamSoft
* @author coolmoo <idreamsoft@qq.com>
*/
header('Content-Type: text/html; charset=utf-8');
require_once dirname(__FILE__) . '/../global.php';
require_once iPATH . "admin/admin.class.php";
require_once iPATH . "admin/function.php";
require_once iPATH . 'admin/admincp.lang.php';
$iCMS->rewrite = false;
unset($_keywords);
$do = $_GET['do'];
$operation = !empty($_GET['operation']) && is_string($_GET['operation']) ? trim($_GET['operation']) : '';
$frames = isset($_GET['frames']) ? $_GET['frames'] : $_POST['frames'];
$action = $_POST['action'];
$Admin = new Admin();
$_GET['do'] == 'logout' && $Admin->logout(__SELF__);
if ($action == "login") {
ckseccode($_POST['seccode']) && alert('验证码错误!');
$username = $_POST['username'];
$password = md5($_POST['password']);
}
$Admin->checklogin($username, $password);
admincp_log();
$Admin->MP("ADMINCP", "ADMINCP_Permission_Denied");
$menu_array = (include iPATH . 'admin/menu.array.php');
示例9:
if ($_POST["action"] == "login") {
$admin->loginUser();
} else {
if ($_POST["action"] == "newpassword") {
$admin->createUser();
}
}
}
//user logged in
} else {
if ($_POST['action'] == "updateconfig") {
$admin->updateConfig();
exit;
}
if ($_GET["action"] == "logout") {
$admin->logout();
}
$auth = $admin->checkLogin();
if ($auth == true && $_POST['action'] == "updategeneral") {
$admin->updateGeneral();
exit;
}
if ($auth == true && $_POST['action'] == "updateuser") {
$admin->updateUser($_POST["id"]);
exit;
}
if ($auth == true && $_POST['action'] == "updatepassword") {
$admin->updatepassword();
exit;
}
if ($auth == true && $_POST["action"] == "updateagreement") {