frameset.pl
上传用户:dostar
上传日期:2007-01-04
资源大小:21k
文件大小:3k
- #!/usr/local/bin/perl
- BEGIN { $APP_PATH=$0; $APP_PATH=~s/(/*)[^/]+$/$1/g; }
- # @
- # ----------------------------------------------------------------------------------------------------------
- # @ This code is (c) 1999 Alexandre Aufrere and NikoSoft.
- # @ Published under NPL rights, meaning you have the right
- # @ to use and modify this code freely, provided it
- # @ remains available and free. Any modified code should be
- # @ submitted to Nikopol Software Corp. or Alexandre Aufrere.
- # @ This code is protected by the French laws on Copyright.
- # @ Please note that there it comes with NO WARRANTY of any kind,
- # @ and especially for any damagbe it could cause to your computer
- # @ or network.
- # @ Using this code means you agree to this license agreement.
- # @ Further information at http://aufrere.citeweb.net/nsc/
- # @
- # ----------------------------------------------------------------------------------------------------------
- # @
- # @ Project NS WebMail
- # @
- # @ Filename inbox.pl
- # @
- # @ Description inbox manager for NS WebMail
- # @
- # @ Version 1.0
- # @
- # @
- # ----------------------------------------------------------------------------------------------------------
- use Mail::POP3Client;
- require $APP_PATH."config.pl";
- require $APP_PATH."common.pl";
- #use the $cgi object method param() to
- #acquire the FORM variables passed by
- #the client browser.
- &ReadParse;
- $loginname = $in{'loginname'};
- $password = $in{'password'};
- $POPserver = $in{'POPserver'};
- $cache = "No";
- print "Content-type:text/htmlnn";
- print "<html>";
- print "<frameset cols=90,* border=0 marginwidth=0>
- <frame
- src="$CGI_PATH_NSWM/menu.pl?loginname=$loginname&POPserver=$POPserver&cache=$cache&password=".cryptit($password)."" name=menu>
- <frame
- src="$CGI_PATH_NSWM/inbox.pl?loginname=$loginname&POPserver=$POPserver&cache=$cache&password=".cryptit($password)."" name=main>
- </frameset>";
- print "</html>";
- exit;
- ###############################################################################
- sub ReadParse {
- local(*in)=@_ if @_;
- local ($i,$key,$val);
- if ($ENV{'REQUEST_METHOD'} eq "GET") {
- $in=$ENV{'QUERY_STRING'};
- }
- elsif ($ENV{'REQUEST_METHOD'} eq "POST") {
- read(STDIN,$in,$ENV{'CONTENT_LENGTH'});
- }
- @in=split(/&/,$in);
- foreach $i (0 .. $#in) {
- $in[$i] =~ s/+/ /g;
- ($key,$val)=split(/=/,$in[$i],2);
- $key =~ s/%(..)/pack("c",hex($1))/ge;
- $val =~ s/%(..)/pack("c",hex($1))/ge;
- $in{$key} .= "