|
We've edited our code
file to look like this:
<SCRIPT LANGUAGE=vortex>
<A NAME=look EXPORT title="">
<IF $title neq "">
<HEAD><TITLE>$title</TITLE></HEAD>
</IF>
<BODY BGCOLOR=yellow>
<IF $title neq "">
<H1>$title</H1><P>
</IF>
</A>
<A NAME=/look EXPORT>
<P><HR>
<A HREF="$url/">Home page</A>
<whaturl>
<A HREF="$ret">Other stuff</A>
</BODY>
</A>
<A NAME=whaturl PRIVATE>
<rex ">>=111\.222\.333\.=" $REMOTE_ADDR>
<IF $ret neq "">
<RETURN "/some/internal/admin/page/">
<ELSE>
<RETURN "/some/public/page/">
</IF>
</A>
</SCRIPT>
|
We've added a default value to the title
parameter. We
also changed the background color to yellow.
We also added a second link to the bottom of the page. If the
user is from our local private net, we want give them a link to our
protected admin page as well. But if they're not, we want to link
to a public page.
We put this logic in the whaturl
function to avoid
cluttering /look
; it determines which URL by checking $REMOTE_ADDR
. We made it a PRIVATE
function because no
other script will ever need to use it, only the /look
function
does.
Static Revisions
Note that during our editing, the library module lookfeel
in use by applications hasn't changed a whisker: we're editing
the file code
, and not until we're done will it
become part of the library. Thus any typos won't affect live
applications.
Check in
Now we check in our revised lookfeel
module (next page):
|