Gossamer Forum
Home : Products : DBMan : Installation :

Admin views vs. user views / Radio Button

Quote Reply
Admin views vs. user views / Radio Button
I've looked through the archives but couldn't find the post I thought I'd seen here about this:

I'd like to elminate the Home|Add|View|Edit|etc. for all "searchers" except the administrators. Is this done in the html.pl file? If so couls someone please explain how?

Also, I'd like to create a checkbox or radio button that when clicked will only bring up records that are marked Yes. For instance, if the field CREDIT CARDS ACCEPTED?: is marked YES, when this radio button is checked it will only return those records where the field is marked yes.

Thanks!


Quote Reply
Re: Admin views vs. user views / Radio Button In reply to
To eliminate the menu bar for anyone who does not have admin status, go to html_footer in html.pl and change all the permissions to $per_admin. The permissions are at the ends of the lines.

You can just copy the code below, if you want

Code:
print qq!<P align=center><$font>!;
print qq!| <A HREF="$db_script_link_url">Home</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&add_form=1">Add</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&view_search=1">View</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&delete_search=1">Delete</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&modify_search=1">Modify</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&view_records=1&$db_key=*">List All</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&admin_display=1">Admin</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&logoff=1">Log Off</A> |! if ($per_admin);
print qq!</font></p>!;

As for your checkbox/radio button, I'm assuming that you are wanting that to be within a search form. You can use

<input type=checkbox name="CreditCard" value="Yes">

Change CreditCard to match the field name in your database.


------------------
JPD