Charles J. Brabec, Ph.D. Web Systems Programmer - OIT - NCSU
% if ($auth) { Bookmarks | Leave Forms | Server Stats % } else { My Software | Misc Links % }
Photo Gallery
<& mypic.html &>
<& newsitems/cruisnews.html &> <& newsitems/jimhill.html &>
% if ($auth) {
My Calendar
% }
Local Weather Forecast
<& nws/forecast.html &>
<& newsitems/sysnews.html &> % if ($auth) { <& newsitems/oitiso.html &> <& newsitems/webdev.html &> % } % unless ($auth) { <& newsitems/perlnews.html &> % } <& newsitems/slashdot.html &> <& newsitems/thinkgeek.html &> <& newsitems/dpreview.html &>
<%args> $auth=>0 $wrap=>0 <%once> use Wrap::Cookie qw(ReadPrivateKeyFile); <%init> $m->comp('check_wrap_id'); $auth=1 if ($ENV{'REMOTE_USER'} eq 'brabec'); if ( $wrap && $ENV{'REMOTE_ADDR'} eq '152.1.4.173' && !$ENV{'REMOTE_USER'} ) { ReadPrivateKeyFile('/home/apache/conf/wrap16.priv'); my $expire = sprintf( "%010d", time() + 12 * 3600 ); my $cookie = new Wrap::Cookie; $cookie->userid('brabec'); $cookie->affil('ncsu.edu'); $cookie->expdate($expire); $cookie->address('152.1.4.173'); $cookie->onproxy('N'); my $cookie16 = $cookie->Encrypt(); $r->headers_out->add( 'Set-Cookie' => "WRAP16=$cookie16; path=/; domain=.ncsu.edu" ); $auth = 1; }