Topic: if access level is > than User, an error page appears (Read 2129 times)
Kill the googlebot
Posts: 6
44 credits Members referred : 0
« on: May 13, 2006, 11:13:37 pm »
hi Olaf,
why if a user has a level 1 and page is set up for level 2 to granted access, instead of appearing a message or returning to same page when user is rejected, this situation appears http://192.168.0.1/classes/access_user/2 and the error message "the page can not be found" appears. its possible to change something looking to send the user to an alternative page to explain the problem, or show a message with the problem?.
thank you so much sebastian
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: May 14, 2006, 05:37:00 pm »
You don't need to add something but the path to the deny access file be OK.
what is the application path in your case and where is the deny access file located?
Kill the googlebot
Posts: 6
44 credits Members referred : 0
« Reply #4 on: May 14, 2006, 05:45:46 pm »
hi olaf,
I used the standard path.. This file is located inside classes/access_user/deny_access.php and in the same folder is classes/access_user/db_config.php
i will check again.
In the other post I forgot to put, this is the first part of the page <?php include($_SERVER['DOCUMENT_ROOT']."/classes/access_user/access_user_class.php");
$page_protect = new Access_user; // $page_protect->login_page = "/classes/access_user/login.php"; // change this only if your login is on another page $page_protect->access_page(2); // 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 } ?>
and then I have this..
<p><a href="<?php echo $_SERVER['PHP_SELF']; ?>?action=log_out">Click here to log out.</a></p> <?PHP echo $_SESSION['user'] ?>