Gossamer Forum
Home : Products : DBMan : Customization :

Different Page Layout for Admin Facility

Quote Reply
Different Page Layout for Admin Facility
Hope I can explain this ok. I have a recruitment site, split in to 4 content sections. One of them is vacancies which is set up to list all current records and one of the content sections is admin. The admin section takes the user to the main dbman login screen (http://blahblah.com/cgi-bin/db.cgi)

All pages use a standard layout with a top nav bar. For example when the users are reading through vacancies they see the vacancies nav bar. Is it possible to have a different nav bar at the top of the page when the user clicks on the admin link? Frames is not an option here, sorry.

Any help is appreciated. http://www.zionhill.co.uk/dbcd/company.htm takes you to the main page of the site so far. I think looking at this should make things clearer.

Thank you in advance.

----------------------------------
http://www.andrew-banks.co.uk

Last edited by:

c0052372: Jul 15, 2002, 8:54 AM
Quote Reply
Re: [c0052372] Different Page Layout for Admin Facility In reply to
Within the sub where you have your naviagation setup you can use:

if ($db_userid eq "default") {
LIST YOUR MENU ITEMS
}

if ($per_admin) {
LIST YOUR MENU ITEMS
}

Is that what you were looking for?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Different Page Layout for Admin Facility In reply to
That looks like it will do the job. I don't have access to the script in question at the moment as it's on the office's server and i'm at home. I'll give it a go tomorrow.

The only issue I can see is that when the user initially clicks on the admin section, they will still be classed as a default user and will be presented with the deafault nav bar as opposed to the one for the admin section.

Thanks for the help

----------------------------------
http://www.andrew-banks.co.uk
Quote Reply
Re: [c0052372] Different Page Layout for Admin Facility In reply to
The admin would need to be logged in to be able to see the other navigation menu. The link to login would need to be available for the default user.

You can also set up other permission levels. Have you seen the "Add permission" mod?

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: [LoisC] Different Page Layout for Admin Facility In reply to
I've got it working reasonably well, and have modified your code sample so the userid must = admin as opposed to the user must have admin permissions to see the admin nav. I have one last problem, when the user clicks on the admin link on my nav bar (taking them to db.cgi to login) they are presented with no nav bar. This is obviously because they are neither a default or admin user. Therefore I am looking for a way of running

if user id doesn't = admin or default then {
INSERT MENU HERE
}

Thanks for all your help so far, this is my first dip into CGI and it's a valuable learning experience. Talk about hitting the deep end.


EDIT>> Looking at this now it may be better to have

if user id = not specified{
INSERT MENU HERE
}

EDIT 2>>

Another way I've just thought of

if the current documents url = http://fadsffdfdsfafds/cgi-bin/db.cgi{
INSERT MENU HERE
}

I know what I want to do, just don't have a clue how to do it in perl at the minute

----------------------------------
http://www.andrew-banks.co.uk

Last edited by:

c0052372: Jul 16, 2002, 1:55 AM
Quote Reply
Re: [c0052372] Different Page Layout for Admin Facility In reply to
got it sussed,

a little bit of research into if/else statements got the job don

if ($db_userid eq "default") {
MENU CODE
} else {
MENU CODE
}

----------------------------------
http://www.andrew-banks.co.uk