LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Permitting pages
Posted:  16 May 2014 11:13

I created a new page which is a modified version of the search page. I created a new line on the page definitions of index.php to allow access to the page.

I also edited the header1.php to restrict the button (which links to the page) from public access.

It seems to work fine, however if I type in the url direct (i.e. index.php?lc&cP=97) even in public mode the page still shows.

Any sugestion how can I restrict this to only admin or users with post rights?

Posted:  16 May 2014 22:15   Last Edited By: Roel B.
In your new version of the search page, somewhere at the start enter the following code:


if ($privs != 9) { //no admin
    echo "<p class='error'>{$ax['no_way']}</p>n"; exit;

You can find an example at the beginning of the pages/settings.php file.

Instead of $privs != 9, you can also use $privs > 1 for instance. (1: read access, 2: read/write own, 3: read/write all, 4: manager and 9: admin).
Posted:  17 May 2014 16:57
Thanks Roel! :)