Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
sub getCookieValues { require "cgi-lib.pl"; $called_by_admin = shift; $remVal = shift; $eventChoice = shift; $path = "../home/home.pl"; local($IDENTITY); my @UserInfo; my $sProjName; my $eventVal; if($IDENTITY = &parseCookie()){ #print &PrintHeader; @UserInfo = split(/\|/, $IDENTITY); if(($remVal ne "")||($eventChoice ne "")) { if($remVal ne "") { $eventVal = pop @UserInfo; $tempVal = pop @UserInfo; if($tempVal ne $remVal) { push @UserInfo,$remVal; push @UserInfo,$eventVal; $IDENTITY = join("|", @UserInfo); print "set-cookie: WBSession=$IDENTITY; p +ath=/cgi-bin;\n\n"; } else { push @UserInfo,$tempVal; push @UserInfo,$eventVal; $IDENTITY = join("|", @UserInfo); print "set-cookie: WBSession=$IDENTITY; p +ath=/cgi-bin;\n\n"; } } if($eventChoice ne "") { $eventVal = pop @UserInfo; if($eventVal ne $eventChoice) { push @UserInfo,$eventChoice; $IDENTITY = join("|", @UserInfo); print "set-cookie: WBSession=$IDENTIT +Y; path=/cgi-bin;\n\n"; } else { push @UserInfo,$eventVal; $IDENTITY = join("|", @UserIn +fo); print "set-cookie: WBSession= +$IDENTITY; path=/cgi-bin;\n\n"; } } } else { print &PrintHeader; } } else { $username = $in{'Username'}; $password = $in{'Password'}; $sProjName = $in{'Project'}; if($username && $password){ $IDENTITY = &setCookie($username, $password, $path, $sProj +Name,"rem","ALL EVENTS"); @UserInfo = split(/\|/, $IDENTITY); } else{ &login($path); } } $username = $UserInfo[1]; unless ($called_by_admin){ verifyUser($username); } return @UserInfo; } # end getCookieValues sub routine
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: where is the error ??
by TrekNoid (Pilgrim) on Jul 22, 2004 at 19:03 UTC | |
by Fletch (Bishop) on Jul 22, 2004 at 19:07 UTC | |
by TrekNoid (Pilgrim) on Jul 22, 2004 at 19:47 UTC | |
by Anonymous Monk on Jul 22, 2004 at 19:24 UTC |