[SOLVED] Login as Guest Issue. |
6/8/2010 03:51:01 | |
| PHPRunner General questions | ||
|
N
nix386 author
Hi there, I have setup a simple contact form for users to submit a query if they have login issues using my phprunner application. This is a link on the login page that directs them to contact_form_add.php. I have enabled "Login as Guest with read only access" in the security>advanced and then set the appropriate static permissions for <guest> in security>permissions (<guest> only has permissions to add on contact_form_add.php page). Now this all seems to work ok however I noticed if I hit a list page without a login Example: http://www.mysite.com/customer_table_list.php the following error ensues Fatal error: Call to undefined function IsAdmin() in ....\customer_table_list.php on line 25 Hi, you need to set up $_SESSION["UserID"] in the generated files of the pages. Add this code if (!@$_SESSION["UserID"]) $_SESSION["UserID"] = "Guest"; just before this line: if(!@$_SESSION["UserID"]) { $_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; header("Location: login.php?message=expired"); return; }
Fatal error: Call to undefined function IsAdmin() in ....\customer_table_list.php on line 25 Line 25 in customer_table_list.php if(IsAdmin()) echo "<p>"."You don't have permissions to access this table"." <a href=\"admin_rights_list.php\">"."Proceed to Admin Area"."</a> "."to set up user permissions"."</p>"; else echo "<p>"."You don't have permissions to access this table"." <a href=\"login.php\">"."Back to Login Page"."</a></p>"; exit();
|
||
|
A
|
ann 6/8/2010 |
|
Nick, |
|
|
N
|
nix386 author 6/8/2010 |
|
Nick, "Call to undefined function IsAdmin()" error means that generated include/commonfunctions.php file was not uploaded. Try to clean internal directory and re-upload your files again. If it doesn't help please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.
|
|
|
N
|
nix386 author 6/8/2010 |
|
I think I just answered my own question but if I use
|
|