<?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> </p> <p><a href="<?php echo START_PAGE;
<?php include $_SERVER['DOCUMENT_ROOT'] . "/classes/access_user/access_user_class.php"; $update_member = new Access_user(); // $new_member->language = "de"; // use this selector to get messages in other languages $update_member->access_page(); // protect this page too. $update_member->get_user_info(); // call this method to get all other information if (isset($_POST['Submit'])) { $update_member->update_user($_POST['password'], $_POST['confirm'], $_POST['name'], $_POST['info'], $_POST['email']); // the update method } $error = $update_member->the_msg; // error message ?> <!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>Update page example</title> <style type="text/css"> <!-- label { display: block; float: left; width: 120px; } --> </style> </head>
<?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>
<?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>