Ejemplo n.º 1
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/access_user_class.php";
// call this page to test referer function
// test this page like "testpage.php?var=test" if you are using a querystring
$test_page_protect = new Access_user();
// $test_page_protect->login_page = "login.php"; // change this only if your login is on another page
$test_page_protect->access_page($_SERVER['PHP_SELF'], $_SERVER['QUERY_STRING']);
// set this  method, including the server vars to protect your page and get redirected to here after login
$hello_name = $test_page_protect->user_full_name != "" ? $test_page_protect->user_full_name : $test_page_protect->user;
if (isset($_GET['action']) && $_GET['action'] == "log_out") {
    $test_page_protect->log_out();
    // the method to log off
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test page "access_user Class"</title>
</head>

<body>
<?php 
include_once "analyticstracking.php";
?>
<h2><?php 
echo "Hello " . $hello_name . " !";
?>
</h2>
<p>Now you have access to this testpage.</p>
Ejemplo n.º 2
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/access_user_class.php";
// this simple example will show you the access level functionality
$test_access_level = new Access_user();
$test_access_level->access_page($_SERVER['PHP_SELF'], "", 5);
// change this value to test differnet access levels (default: 1 = low and 10 high)
$hello_name = $test_access_level->user_full_name != "" ? $test_access_level->user_full_name : $test_access_level->user;
if (isset($_GET['action']) && $_GET['action'] == "log_out") {
    $test_access_level->log_out();
    // the method to log off
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test page "access levels"</title>
</head>

<body>


<h2><?php 
echo "Hello " . $hello_name . " !";
?>
</h2>
<p>According the access level from your account it's allowed to view this page!</p>
<p>&nbsp;</p>
<p><a href="<?php 
echo START_PAGE;
Ejemplo n.º 3
0
<?php

include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/access_user_class.php";
$page_protect = new Access_user();
// $page_protect->login_page = "login.php"; // change this only if your login is on another page
$page_protect->access_page();
// only set this this method to protect your page
$page_protect->get_user_info();
$hello_name = $page_protect->user_full_name != "" ? $page_protect->user_full_name : $page_protect->user;
if (isset($_GET['action']) && $_GET['action'] == "log_out") {
    $page_protect->log_out();
    // the method to log off
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Account page</title>
<link rel="stylesheet" type="text/css" href="/css/main.css"/>
</head>

<body>
<?php 
include_once "analyticstracking.php";
?>
<div id="main-con">
  <div id="header-con">
    <div id="img"></div>
    <div id="title"><h1>mirador</h1></div>
  </div>