www.pudn.com > bbs3000afree.zip > search.cgi


#!/usr/bin/perl 
#------------------------------------------------------# 
#         本程序为Yuzi工作室提供        # 
#        Yuzi论坛3000(BBS3000)v4.00      # 
#------------------------------------------------------# 
$cgipa=".";  # CGI程序文件的绝对路径 
###################### 
## 以下部分不需修改 ## 
###################### 
require "$cgipa/setup.cgi"; 
&GetCookies; 
########## 
if ($ENV{'REQUEST_METHOD'} eq "POST") { 
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); 
} else { 
$buffer = $ENV{'QUERY_STRING'}; 
} 
@pairs = split(/&/, $buffer); 
foreach $pair (@pairs) { 
($name, $value) = split(/=/, $pair); 
$value=~tr/+/ /; 
$value=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; 
$value=~s///g; 
$value=~s/\t/    /g; 
$value=~s/>/>/g; 
$value=~s/; 
close(ROOM); 
&css; 
print <
搜索资料


检索关键字:
搜索的论坛:
搜索范围:
按时间范围检索:

 

EOF exit; ######## sub add{ if($username eq ""){ print "Content-type: text/html\n\n"; } open(PSD,"$filepath/favorites/$Cookies{username}.cgi"); @lines=; close(PSD); $fno=@lines; foreach $line (@lines) { ($id)=split(/\t/,$line); if($id eq $add){print "Content-type: text/html\n\n";exit;} open (CHAT,"$filepath/list/$id.cgi"); $linei=; close(CHAT); ($bzmc,$secret,$bzrmail,$outurl,$bbsname)=split(/\t/,$linei); if($id ne "" && $bbsname ne ""){ $zliao="$zliao$id\t$bbsname\n"; }} open (CHAT,"$filepath/list/$add.cgi"); $linei=; close(CHAT); ($bzmc,$secret,$bzrmail,$outurl,$bbsname)=split(/\t/,$linei); if (length($bbsname) > 10){$bbsname=substr($bbsname,0,10);$bbsname.="...";} $zliao="$zliao$add\t$bbsname\n"; open(PSD,">$filepath/favorites/$Cookies{username}.cgi"); print PSD $zliao; close(PSD); print "Content-type: text/html\n\n"; print < 您已经成功地将该论坛添加到您的私人珍藏,请稍候,系统将自动返回...... EOF exit; } ######## sub del{ if($username eq ""){ print "Content-type: text/html\n\n"; } open(TITLES5,"$filepath/favorites/$Cookies{username}.cgi"); @hastitles5=; close(TITLES5); open(TITLES5,">$filepath/favorites/$Cookies{username}.cgi"); foreach $m5 (@hastitles5){ chomp($m5); if($m5 ne ""){ ($rthistime5)=split(/\t/,$m5); if($rthistime5 ne $add){ print TITLES5 $m5."\n"; }} } close(TITLES5); print "Content-type: text/html\n\n"; print < 您已经成功地将该论坛从您的私人珍藏删除,请稍候,系统将自动返回..... EOF exit; } sub index{ open(TMP,"$filepath/data/fixindex"); $fixindex=; close(TMP); if($fixindex eq $min){&errorview("系统正在自动进行维护,请稍后访问!");exit;} open(TMP,">$filepath/data/fixindex"); print TMP $min; close(TMP); chmod(0777,"$filepath/list/$id"); unless(-f "$filepath/list/$id/00000000000000"){ open(TMP,">$filepath/list/$id/00000000000000"); print TMP "欢迎使用 BBS3000\t$thistime\t$admname\t感谢您选择了 BBS3000

Yuzi工作室
\t$from\t0\t1\t--\t$thistime\t00000000000000b\t0"; close(TMP); chmod(0666,"$filepath/list/$id/00000000000000"); } unless(-f "$filepath/list/$id/00000000000001"){ open(TMP,">$filepath/list/$id/00000000000001"); print TMP "欢迎使用 BBS3000\t$thistime\t$admname\t感谢您选择了 BBS3000

Yuzi工作室
\t$from\t0\t1\t--\t$thistime\t00000000000000b\t0"; close(TMP); chmod(0666,"$filepath/list/$id/00000000000001"); } chmod(0666,"$filepath/list/$id/bbs"); open(TITLES,"$filepath/list/$id/bbs")||open(TITLES,">$filepath/list/$id/bbs"); @hastitles=; close(TITLES); $size=@hastitles; if ($size < 2){ opendir (MEMBERDIR2, "$filepath/list/$id"); @members2 = readdir(MEMBERDIR2); closedir (MEMBERDIR2); @b=reverse sort @members2; foreach $m (@b){if(length($m) eq 14 ){$top="$top$m\n";}} open(PSD,">$filepath/list/$id/bbs"); print PSD $top; close(PSD); chmod(0666,"$filepath/list/$id/bbs"); } print "Content-type: text/html\n\n正在生成索引文件...";exit; } ######################### END OF SCRIPT #########################