user-pic

[半灌水]改了数据结构的代价。。

Vote 0 Votes


sub getmember {
   my ($nametocheck, $readtype) = @_;
   $readtype = ($readtype ne 'no') ?  1 :0;

   &fixname(\$nametocheck);
   $userregistered = '';

   my $filetoopen = "${lbdir}$memdir/$nametocheck.cgi";
   &checkmemfile($filetoopen) ;

   if ((-e $filetoopen)&&($nametocheck !~ /^guest/)&&($nametocheck ne "")) {

       my $filedata = $query ->read_file($filetoopen,$readtype);

       if ($filedata =~ /^\%esb\#/ )
       {
         $filedata =~ s/^\%esb\#//;
       (
         $membername,  $password,  $membercode,
         $joineddate,  $ipaddress,
         $rating,

         $privateforums, $moforums,

         $rank, $money, $bankmoney,


         $postnum,  $replynum,  $goodpost, $postdel,
         $lastpostdate,
         $lastgone, $visitno,$onlinetime,

         $userquestion, $timedifference,

         $useravatar, $emailaddress,
         $homepage,      # 网站
         $oicqnumber,    # QQ
         $icqnumber,     # ICQ
         $location ,     # 来自

         $membertitle,   # 头衔
         $signature,     # 签名
         $jhmp,          # 门派

         $interests,
         $userflag,
         $userxz,
         $usersx,
         $sex,
         $education,
         $marry,
         $work,
         $born,


         ) = split(/\t/,$filedata);

         }
         else
         {
           ($membername, $password, $membertitle, $membercode,
            my $numberofposts, $emailaddress, my $showemail,
            $ipaddress, $homepage, $oicqnumber, $icqnumber ,
            $location ,$interests, $joineddate, $lastpostdate,
            $signature, $timedifference, $privateforums,
            $useravatar, $userflag, $userxz, $usersx,

            my $personalavatar, my $personalwidth, my $personalheight,

            $rating, $lastgone, $visitno, $addjy, $meili, $mymoney, $postdel, $sex, $education, $marry, $work, $born, $chatlevel, $chattime,
            $jhmp, $useradd3,$ebankdata,$onlinetime,$userquestion,$goodpost,$useradd7,$useradd8
            ) = split(/\t/,$filedata);


            ($postnum,$replynum) = split(/\|/,$numberofposts);
            $showemail = $showemail eq 'no' ? 0
                   : $showemail eq 'popo' ? 2
                   : $showemail eq 'msn' ? 3
                   : 1;
            $emailaddress = $showemail.','.$emailaddress;

            if (($personalavatar)&&($personalwidth)&&($personalheight))
            {
                $personalavatar =~ s/\$uploadurl/${uploadurl}/o;
                $useravatar = '2,'.$personalavatar.','.$personalheight.','.$personalwidth;
            }
            elsif (($useravatar ne "noavatar") && ($useravatar))
            {
                $useravatar = '0,'.$useravatar.',,,';
            }
            else {$useravatar = '-1,,,,';}
            $rank = $postnum * 2 + $replynum + $goodpost *5 - $postdel*5;
            ($signature, $signaturehtml) = split(/aShDFSiod/,$signature);
         }

       $membername =~ s/[\a\f\n\e\0\r\t\`\~\!\@\#\$\%\^\&\*\(\)\+\=\\\{\}\;\'\:\"\,\.\/\<\>\?]//isg;
       $password =~ s/[\a\f\n\e\0\r\t\|\@\;\#\{\}\$]//isg;

       $membercode ||= 0;  $rank ||= 0;
       $onlinetime = "3000" if ($onlinetime < 0);


       $postnum = int($postnum); #发帖子
       $replynum = int($replynum); #回帖子
       $goodpost = int($goodpost);  #精华
       $postdel = int($postdel);   #删除帖子



       chomp $privateforums;
       if ($privateforums) {
           my @private = split(/&/,$privateforums);
           foreach (@private) {
               chomp $_;
               ($access, $value) = split(/=/,$_);
               $allowedentry{$access} = $value;
           }
       }
   }
   else { $userregistered = 'no'; $membercode ='no'; }
}



-_-bbbbb  :em06:  :em06:
以后不干这样的事情了。晕

19 Replies

| Add a Reply

Add a Reply

Forum Groups

Good Perl Books

Perl 學習手札

作者:簡信昌

Perl 學習手札 , 一本优秀的中文Perl在线学习资料。

Perl 程序讨论区

12 50

Last Topic: [注意]本区文章归档区 by 路杨 on Oct 16, 2006

事物处理及其他

113 1410

Last Topic: 踩个脚印 by 眼睛oo on Dec 4, 2010

测试私密区

测试私密区

18 88

Notice: 用于测试程序或者不可告人之秘密。不要问我要密码哦。。[此为原LB_ES论坛系统保留项,只限原有权限朋友进入,不再接受注册]

OpenID accepted here Learn more about OpenID