<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: [Javascript] General design question</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=410390623-16072001><FONT face=Arial color=#0000ff size=2>I've
just designed something like this. I found it better to save the admin variable
in a session. The reason for this is because if the admin is going to be editing
details of other people who can also log in (I don't know if your web site does
this) You don't have to check two records in the DB, it makes things a bit
simpler and probably a bit quicker as well.</FONT></SPAN></DIV>
<DIV><SPAN class=410390623-16072001><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=410390623-16072001></SPAN> </DIV>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> javascript-admin@LaTech.edu
[mailto:javascript-admin@LaTech.edu]<B>On Behalf Of </B>Bill
Marriott<BR><B>Sent:</B> Tuesday, 17 July 2001 6:00 AM<BR><B>To:</B>
javascript@LaTech.edu<BR><B>Subject:</B> Re: [Javascript] General design
question<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Bob,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Do you mean store a list of all the links in a
table and flag them Admin Yes or No?</FONT></DIV>
<DIV><FONT face=Arial size=2>Then use something like:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>if (after SQL in link table) tblLink.fldAdmin
</FONT><FONT face=Arial size=2>= true then<BR><a
href="link.asp">Link</a><BR>end if<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Bill<BR></DIV></FONT>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=filipiab@atsc.army.mil href="mailto:filipiab@atsc.army.mil">Filipiak,
Bob (Contractor)</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu
href="mailto:'javascript@LaTech.edu'">'javascript@LaTech.edu'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, July 16, 2001 10:12
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Javascript] General design
question</DIV>
<DIV><BR></DIV>
<P><FONT size=2>Better yet, since you are using a DB why not modify the table
to have a column with a Admin flag for those links that are for Admin only and
validate the visitor against the db that way you don't have to rely on cookies
being enabled. Just a thought.</FONT></P>
<P><FONT size=2>Bob Filipiak (Contractor)</FONT> <BR><FONT size=2>MCP
</FONT></P>
<P><FONT size=2>-----Original Message-----</FONT> <BR><FONT size=2>From:
Andrew Dunn [<A
href="mailto:adunn@mail.interworx.com.au">mailto:adunn@mail.interworx.com.au</A>]</FONT>
<BR><FONT size=2>Sent: Sunday, July 15, 2001 8:01 PM</FONT> <BR><FONT
size=2>To: javascript@LaTech.edu</FONT> <BR><FONT size=2>Subject: RE:
[Javascript] General design question</FONT> </P><BR>
<P><FONT size=2>if you are using asp why not use a session variable to hold
the user state</FONT> <BR><FONT size=2>(if admin or not)? If the session
variable ie. session("admin") = true then</FONT> <BR><FONT size=2>display
links or not display links.</FONT> </P>
<P><FONT size=2>if session("admin") = true then</FONT>
<BR> <FONT size=2><a
href="link.asp">Link</a></FONT> <BR><FONT size=2>end if</FONT>
<BR><FONT size=2>--------%< Snipped
%<----------------------------------------</FONT>
</P></BLOCKQUOTE></BODY></HTML>