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
In reply to where is the error ?? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |