Gossamer Forum
Home : Products : DBMan : Installation :

How to make parts of your db visible only to admins?

Quote Reply
How to make parts of your db visible only to admins?
Is there any way I can make parts of the html code in my db visible only to those who log in as admins? ie I want to make some fields only visible/editable by admins, and also some custom links in the footer. Please let me know how this is done. Thank you.
Quote Reply
Re: How to make parts of your db visible only to admins? In reply to
Let's say you want a field to be hidden from users, but editable by admin. Assuming you're not using autogenerate, put something like the following in html_record_form:

Code:
if ($per_admin) {
print qq|<TR><TD>Fieldname:</TD>
<TD><input type="text" name="Fieldname" value="$rec{'Fieldname'}></TD></TR>|;
}
else {
print qq|<input type="hidden" name="Fieldname" value=$rec{'Fieldname'}>|;
}

Same thing with custom links.



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


[This message has been edited by JPDeni (edited February 07, 1999).]