当前位置: 首页>>代码示例>>PHP>>正文


PHP admin::logout方法代码示例

本文整理汇总了PHP中admin::logout方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::logout方法的具体用法?PHP admin::logout怎么用?PHP admin::logout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在admin的用法示例。


在下文中一共展示了admin::logout方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load

 function load($user_id)
 {
     if (self::$user) {
         return true;
     }
     db::table('admin_users');
     db::where('user_id', $user_id);
     db::where('user_pub', 1);
     db::limit(1);
     self::$user = db::assoc();
     if (db::rows() == 0) {
         admin::logout();
     }
     define("ADMIN_USER_ID", $user_id);
     define("ADMIN_USER_SITE_ID", self::get('site_id'));
     define("ADMIN_USER_GROUP_ID", self::get('group_id'));
     s::set('ADMIN_USER_LOGIN', self::get('user_login'));
     s::set('ADMIN_USER_ID', $user_id);
     return true;
 }
开发者ID:rigidus,项目名称:ea,代码行数:20,代码来源:adminUser.php

示例2: header

     break;
 case "login":
     if ($ps->login()) {
         if ($_POST['forward_url']) {
             header("Location: " . $_POST['forward_url']);
         }
         $ps->select_gallery($_POST['gallery']);
         $adminMessage = "Welcome to Organize";
         $includeFile = "view";
     } else {
         $adminMessage = $ps->last_error();
         $includeFile = "login";
     }
     break;
 case "logout":
     $ps->logout();
     $adminMessage = "Thank you and goodbye!";
     $includeFile = "login";
     break;
 case "manageusers":
     if (!$ps->is_admin()) {
         $ps->select_gallery();
         $adminMessage = "You do not have permission to perform this operation.";
         $includeFile = "view";
     } else {
         $includeFile = "manageusers";
     }
     break;
 case "newuser":
     if (!$ps->is_admin()) {
         $ps->select_gallery();
开发者ID:noeljackson,项目名称:PhotoStack,代码行数:31,代码来源:organize.php

示例3: load_class

<?php

/**
 * Load required classes
 */
load_class(array('login', 'admin'));
$login_obj = new login();
if (isset($_GET["logout"])) {
    admin::logout();
}
if (isset($_POST["method"]) && $_POST["method"] == 'change_password') {
    $current_password = $_POST["current_password"];
    $new_password = $_POST["new_password"];
    $user_id = $_SESSION["admin_data"]["user_id"];
    $data_array = array("password" => $new_password, "modified" => currentDate());
    $login_obj->db->where("user_id", $user_id);
    $login_obj->db->where("password", $current_password);
    $row = $login_obj->db->get($login_obj->tableName, null, 'user_id');
    if ($row) {
        $login_obj->db->where("user_id", $user_id);
        $row = $login_obj->db->update($login_obj->tableName, $data_array);
        echo "success";
    } else {
        echo "invaild";
    }
    die;
}
开发者ID:sarbjit399,项目名称:timeshare-code,代码行数:27,代码来源:change_password_code.php


注:本文中的admin::logout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。