#!/usr/bin/perl # # pmdss.pl - retrieve pmdss cookie info and construct the menu page from pieces # use CGI; use CGI::Cookie; use HTML::Entities; $n = ""; $w = ""; $o = ""; $r = ""; $p = ""; $e = ""; $x = ""; sub retrieve_pmoss_cookie { # Get all available cookies my(%cookies) = fetch CGI::Cookie; my($q)=new CGI; print $q->header; $k = "PMOSSWEB"; if( defined $cookies{$k} ) { ($F1,$F2,$F3,$F4,$F5,$F6,$F7)= split(':',$cookies{$k}->value); ($junk, $UID) = split('=', $F1); ($junk, $NAME) = split('=', $F2); ($junk, $ORG) = split('=', $F3); ($junk, $REST) = split('=', $F4); ($junk, $PRIVS) = split('=', $F5); ($junk, $ENVIRON) = split('=', $F6); ($junk, $EXPIRES) = split('=', $F7); $w=$UID; $n=$NAME; $o=$ORG; $r=$REST; $p=$PRIVS; $e=$ENVIRON; $x=$EXPIRES; return(1); } else { print "The PMOSSWEB cookie not found\n"; return(0); } } chomp($utcnow=`/usr/5bin/date +%Y%m%d%H%M%S`); $i = retrieve_pmoss_cookie(); if ($i > 0) { if ($e ne "PROD") { print "The PMOSSWEB cookie is NOT a production cookie\n"; } else { if (($x - $utcnow) > 0) {