Beispiel #1
0
 * 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'] . '&amp;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'] . '&amp;action=home"';
        if ($_GET['action'] == "home" || empty($_GET['action'])) {
            echo ' class="current"';
        }
        echo '>Home</a></li>';
        echo '<li><a href="?page=' . $_GET['page'] . '&amp;action=general"';
        if ($_GET['action'] == "general") {
Beispiel #2
0
 public function logout()
 {
     Registry::get("session")->erase("member")->erase("organization");
     parent::logout();
 }
Beispiel #3
0
<?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");
Beispiel #4
0
<?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 -->
Beispiel #5
0
                    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);
Beispiel #6
0
 function doLogout()
 {
     Admin::logout(__SELF__);
 }
Beispiel #7
0
     */
    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 -->
Beispiel #8
0
<?php

/**
 * @package iCMS V3.1
 * @copyright 2007-2009, iDreamSoft
 * @license http://www.idreamsoft.cn iDreamSoft
 * @author coolmoo <*****@*****.**>
 */
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');
Beispiel #9
0
        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") {