⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yhreg.cgi

📁 BBS3000 sourceCode
💻 CGI
📖 第 1 页 / 共 3 页
字号:
foreach $line (@lines) {
$line=~ s/\n//g;
($rip,$r1,$r2,$r3,$r4,$rtime,$rname,$rid)=split(/,/,$line);
$roomname="";
if ( -e "$filepath/list/$rid.cgi"){
open(ROOM,"$filepath/list/$rid.cgi");
@lines1=<ROOM>;
close(ROOM);
foreach $line (@lines1){
$line1=~ s/\n//g;
($rusername,$roopass,$mail,$homeurl,$roomname,$lasttime,$lasttime)=split(/\t/,$line);
}
}
if ( -e "$filepath/yhzl/$rname.cgi"){
open(TITLES,"$filepath/yhzl/$rname.cgi");
@a=<TITLES>;
close(TITLES);
foreach $m (@a){
$m=~ s/\n//g;
if($m ne ""){
($rdpassword,$rdname,$rdmail,$rdhome,$rdlasttime,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rdfy,$rdhf)=split(/\t/,$m);
}
}
}
if ($roomname eq ""){$roomname="社区首页"};
if ($rdcity eq ""){$rdcity="未知"};
($ip1,$ip2,$ip3,$ip4)=split(/\./,$rip);
$rip  = "$ip1.$ip2.$ip3.*";
if ($rid eq ""){$rid="<a href=list.cgi target=_top>"
}else {
$rid="<a href=bbs.cgi?id=$rid>";
}
if ($rname eq ""){
print <<LLL;
<tr BGCOLOR="#FFF5E1" align="center">
<td width=20%>$rip</td>
<td width=20%>访客</td>
<td width=20%>$rtime</td>
<td width=20%>$rid$roomname</a></td>
<td width=20%>未知</td>
</tr>
LLL
}else {
print <<LLL;
<tr BGCOLOR="#FFF5E1" align="center">
<td width=20%>$rip</td>
<td width=20%><a href=yhreg.cgi?menu=viewuser&username=$rname target=_blank>$rname</a></td>
<td width=20%>$rtime</td>
<td width=20%>$rid$roomname</a></td>
<td width=20%>$rdcity</td>
</tr>
LLL
}
}
print "</table><br>[ <a href=javascript:history.back()> 返 回 </a> ]</body></html>\n";
exit;}
sub guoke {
&GetCookies;
if ($username eq ""){$username=$Cookies{username}};
$guokepm="$filepath/data/$id.pm";
$peo="$filepath/data/$id.top$topdata";
#排名
unlink($guokepm);
unless(-f $guokepm){
open(TMP,">$guokepm");
close(TMP);
chmod(0666,$guokepm);
}
open (PEO,"$peo");
@lines=<PEO>;
$size=@lines;
close (PEO);
$hasusers=@lines;
foreach $line (@lines) {
$line=~ s/\n//g;
($rip,$r1,$rtime,$rname,$tlsj)=split(/,/,$line);
$mc[$tlsj]=$tlsj;
$i=$i+1;
if ($old < $tlsj) { $old=$tlsj;}
}
$mc[$old]=1;
$s1=$old;
$s[1]=$s1;
for ($k=2;$k<=$i;$k++){
$thr=0;
for ($j=1;$j<$s[$k-1];$j++)
{
if ($mc[$j] > 0){
if ($thr < $mc[$j]) {$thr=$mc[$j];$s[$k]=$j;}
}
}
$mc[$s[$k]]=$k;
}
for ($iii=1;$iii<=$i;$iii++){
for ($jjj=0;$jjj<=$old;$jjj++){
if ($mc[$jjj]==$iii){
open(PSD,">>$guokepm");
foreach $line (@lines) {
$line=~ s/\n//g;
($rip,$r1,$rtime,$rname,$tlsj1)=split(/,/,$line);
if ($mc[$tlsj1]==$mc[$jjj]){
print PSD $line."\n";
}
}
}
}
}
close(PSD);
#排名end
open (PEO,"$guokepm");
@lines=<PEO>;
$size=@lines;
close (PEO);
$ii=0;
$j=$size;
while ($j>0) {
$j=$j-$perpage;
$ii++;
}
&send_html;
print <<EOF;
<HTML><HEAD>
<TITLE>用户排行榜</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</HEAD>
<body background=$imagurl/bg.jpg>
<br><p class=pt10 align=center><b>用 户 排 行 榜 </b><br><br>
<style type="text/css">
<!--
a:link {  font-family: "宋体", "serif"; font-size: 9pt; color: #004080; text-decoration: none}
a:hover {  color: #004080; text-decoration: underline; background-color: #CCCC99}
a:visited {  text-decoration: none}
body {  font-family: "宋体", "serif"; font-size: 9pt}
td {  font-family: "宋体", "serif"; font-size: 9pt}
input {  font-size: 9pt}
p {  font-size: 9pt}
br {  font-size: 9pt}
tr {  font-size: 9pt}
table {  font-size: 9pt}
-->
</style>
<table border="1" align="center" width="80%" cellpadding="0" cellspacing="0" bordercolorlight="#008000" bordercolordark="#FFFFFF">
<tr align=center>
<td background=$imagurl/tablebg.gif width=20%>IP地址</font></td>
<td background=$imagurl/tablebg.gif width=20%>姓名</FONT></td>
<td background=$imagurl/tablebg.gif width=30%>最后来访时间</FONT></td>
<td background=$imagurl/tablebg.gif width=15%>发表文章</td>
<td background=$imagurl/tablebg.gif width=15%>本月来访</td>
</tr>
EOF
$ridname=$bbsname;
if($page eq ""){$page=1;}
$pages=$page-1;
$pages=$page*$perpage-$perpage;
for($i=$pages; $i<$pages+$perpage; $i++) {
$line=@lines[$i];
$line=~ s/\n//g;
($rip,$r1,$rtime,$rname,$rtlsj)=split(/,/,$line);
($ip1,$ip2,$ip3,$ip4)=split(/\./,$rip);
$rip  = "$ip1.$ip2.$ip3.*";
if ($rname ne ""){
unless(-f "$filepath/yhzl/$rname.cgi"){
open(TMP,">$filepath/yhzl/$rname.cgi");
close(TMP);
chmod(0666,"$filepath/yhzl/$rname.cgi");
}
open(TITLES,"$filepath/yhzl/$rname.cgi");
$m=<TITLES>;
close(TITLES);
$m=~ s/\n//g;
($rdpassword,$rdname,$rdmail,$rdhome,$rdlasttime,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rdfy,$rdhf)=split(/\t/,$m);
$fbwz=$rdfy+$rdhf;
print <<EOF;
<tr align="center">
<td width=20%>$rip</td>
<td width=20%><a href=yhreg.cgi?menu=viewuser&username=$rname target=_blank>$rname</a></td>
<td width=30%>$rtime</td>
<td width=15%><font color=#FF0000>$fbwz</font>篇</td>
<td width=15%><font color=#FF0000>$rtlsj</font>次</td>
</tr>
EOF
}
}
print <<EOF;
<tr>
<td align="center" width="100%" colspan="5" bgcolor="#FFF5E1">免费论坛服务由<font color=#cc0033>
</font><font color=#ff6633><b><font Helvetica, sans-serif><a href=$zyurl>$zyname</a></font></b></font><font color=#cc0033>
</font>提供 程序制作:<b><a href="http://www.yuzi.net" target="_blank">Yuzi工作室</a></td></tr>
<tr>
<td colspan="5">
EOF
#$i=1;
$j=$size;
while ($j>0) {
print "<a href=yhreg.cgi?menu=guoke&page=$ii&id=$id>" if ($page != $ii);
print "[$ii]";
print "</a>" if ($page != $ii);
$j=$j-$perpage;
$ii--;
}
print "</td>
</tr></table></body></html>\n";
exit;}
##########
sub mail{
if ( -e "$filepath/yhzl/$username.cgi"){
open(PSD,"$filepath/yhzl/$username.cgi");
@lines=<PSD>;
close(PSD);
foreach $line (@lines) {
$line=~ s/\n//g;
($rdpassword,$rdname,$rdmail,$rdhome,$rdlasttime,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rdfy,$rdhf,$tu,$jiao)=split(/\t/,$line);
}
open (OUTMAIL,"| $mailprg") || die "Mail system error";
print OUTMAIL "To: $rdmail\n";
print OUTMAIL "Subject: 遗忘密码通知\n";
print OUTMAIL "  您的帐号是:$rdname 密码是:$rdpassword\n\n\n";
print OUTMAIL "免费论坛服务由 $zyname($zyurl) 提供 程序制作:Yuzi工作室(http://www.yuzi.net)\n";
print OUTMAIL "\n\n";
close(OUTMAIL);
&errorview("密码已经发送到 $rdmail 信箱了,请去收信!");exit;
}else{
&errorview("对不起,系统中没有此用户的资料!");exit;
}
exit;
}
sub email {
open(TITLES,"$filepath/list/$id/$index");
@hastitles=<TITLES>;
close(TITLES);
open(TITLES,"$filepath/list/$id/$index");
foreach $m (@hastitles){
$m=~ s/\n//g;
($rtitles,$rthistime,$rusername,$rcomment,$rfrom,$rhasreply,$remote,$rlastname,$rlasttime,$re,$djj)=split(/\t/,$m);
}
if($username ne ""){
open(PSD,"$filepath/yhzl/$username.cgi");
@lines=<PSD>;
close(PSD);
open(PSD,"$filepath/yhzl/$username.cgi");
foreach $line (@lines) {
$line=~ s/\n//g;
($rdpassword,$rdname,$rdmail,$rdhome,$rlast,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rdfy,$rdhf,$tu,$jiao)=split(/\t/,$line);
}
}
&send_html;
print <<EOF;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Send to a friend</title>
<STYLE>.90V {
FONT-SIZE: 9pt; FONT-FAMILY: 宋体
}
</STYLE>
</head>
<body>
<center>
<form ACTION="yhreg.cgi" METHOD="POST" align="center">
<input type="hidden" name="menu" value="mailfriend">
<input type="hidden" name="id" value="$id">
<input type="hidden" name="titles" value="$rtitles">
<input type="hidden" name="index" value="$index">
<TABLE cellSpacing=0 cellPadding=0 width=458 border=0>
<TR>
<TD vAlign=top width=458 colSpan=4>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top width=12 background="$imagurl/bckgrnd_tile.gif">&nbsp;&nbsp;</TD>
<TD vAlign=top width="100%" background="$imagurl/bckgrnd_tile.gif" colSpan=3 height=30><BR><FONT class=90v style="COLOR: #ffffff; LETTER-SPACING: 1mm"><B>将此页发给您的朋友</B></FONT></TD>
<TD vAlign=bottom width=71><IMG height=30 src="$imagurl/email_icon01.gif" width=70></TD>
<TD vAlign=top width=18 background="$imagurl/bckgrnd_tile.gif">&nbsp;&nbsp;&nbsp;</TD></TR>
<TR>
<TD vAlign=top width=12>&nbsp;&nbsp;</TD>
<TD vAlign=bottom noWrap width=370 colSpan=3><FONT class=90v>如果您认为您的朋友同样对这篇文章感兴趣的话,您只需填写几个简单的信息后点“发送”即可将此文的地址发送给您的朋友</FONT></TD>
<TD vAlign=top width=71><IMG height=31 src="$imagurl/email_icon02.gif" width=70></TD>
<TD vAlign=top width=18>&nbsp;&nbsp;</TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD width=12 rowSpan=3>&nbsp;&nbsp;</TD></TR>
<TR>
<TD vAlign=top width=270><FONT class=90v color=#3366cc>注释(可选项)</FONT> <TEXTAREA name=comment rows=8 wrap=hard cols=35></TEXTAREA><BR clear=all><FONT class=90v>请您填写姓名及E-mail只是为了您的朋友方便的了解此条信息的来源!</FONT></TD>
<TD width=12>&nbsp;&nbsp;</TD>
<TD vAlign=top width=185><FONT class=90v color=#3366cc>你朋友的姓名</FONT>
<INPUT size=22 name=Friend_name><BR><FONT class=90v color=#3366cc>您朋友的E-mail地址</FONT> <INPUT size=22 name=Friend_email><BR><FONT class=90v color=#3366cc>您的姓名</FONT><BR><INPUT size=22 name=username value="$username"><BR><FONT class=90v color=#3366cc>您的E-mail地址</FONT>
<INPUT size=22 name=mail value="$rdmail"><BR>&nbsp; <NOBR><INPUT title=Send style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体" type=submit value=" 发送 " name=CheckSubmit>&nbsp;&nbsp;<INPUT title=Cancel style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体" type=reset value=' 取消 '>
</NOBR></TD></TR></form><tr><TD></TD></TR><tr><TD bgColor=#3366cc colSpan=4 height=7></TD></TR></TABLE>
</body>
</html>
EOF
exit;
}
sub mailfriend{
if(!($Friend_email=~ /.*\@.*\..*/)){&errorview("您朋友的Email输入错误!");exit(0);}
$comment=~ s/<([^>]|\n)*>/\n/g;
open (OUTMAIL,"| $mailprg") || die "Mail system error";
print OUTMAIL "To: $Friend_email\n";
print OUTMAIL "From: $mail\n";
print OUTMAIL "Subject: $titles\n";
print OUTMAIL "$Friend_name,您好!\n\n";
print OUTMAIL "我想你可能会喜欢看这内容的,所以我发给你这网页的链接\n\n";
print OUTMAIL "$ym/bbs.cgi?menu=show&slttitle=$index&id=$id\n\n";
print OUTMAIL "============================================================\n";
print OUTMAIL "$comment\n";
print OUTMAIL "============================================================\n";
print OUTMAIL "                    您的朋友:$username\n\n";
print OUTMAIL "免费论坛服务由 $zyname($zyurl) 提供 程序制作:Yuzi工作室(http://www.yuzi.net)\n";
print OUTMAIL "\n\n";
close(OUTMAIL);
&send_html;
print <<EOF;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<title>Send to a friend</title>
<style>
.90V         {font-size: 9pt; font-family: 宋体;}
</style>
<body>
<center>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="458">
<TR>
<TD VALIGN="TOP" COLSPAN="4" WIDTH="458">
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
<TR>
<TD VALIGN="TOP" WIDTH="12" BACKGROUND="$imagurl/bckgrnd_tile.gif">&nbsp;&nbsp;</TD>
<TD VALIGN="TOP" WIDTH="100%" BACKGROUND="$imagurl/bckgrnd_tile.gif" HEIGHT="30" COLSPAN="3"><br><FONT class="90v" STYLE="letter-spacing:1mm;color:#FFFFFF;"><b>谢谢使用</b></FONT></TD>
<TD VALIGN="BOTTOM" WIDTH="71"><IMG SRC="$imagurl/email_icon01.gif" HEIGHT="30" WIDTH="70"></TD>
<TD VALIGN="TOP" WIDTH="18" BACKGROUND="$imagurl/bckgrnd_tile.gif">&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR>
<TD VALIGN="TOP" WIDTH="12">&nbsp;&nbsp;</TD>
<TD NOWRAP VALIGN="BOTTOM" WIDTH="370" COLSPAN="3"></TD>
<TD VALIGN="TOP" WIDTH="71"><IMG SRC="$imagurl/email_icon02.gif" HEIGHT="31" WIDTH="70"></TD>
<TD VALIGN="TOP" WIDTH="18">&nbsp;&nbsp;</TD>
</TR>
</TABLE>
</TD>
</TR>
<TR><TD COLSPAN="2"><IMG SRC="$imagurl/Trans.gif" HEIGHT="80" WIDTH="1" BORDER="0"></TD></TR>
<TR><TD VALIGN="BOTTOM" ALIGN="LEFT"><IMG SRC="$imagurl/Trans.gif" HEIGHT="1" WIDTH="140" BORDER="0"><FONT class="90v"><b>您的信息已经被发送致</b><BR><IMG SRC="$imagurl/Trans.gif" HEIGHT="1" WIDTH="140" BORDER="0">$Friend_email</FONT></TD></TR>
<TR><TD><IMG SRC="$imagurl/Trans.gif" HEIGHT="77" WIDTH="280" BORDER="0"></TD><TD VALIGN="BOTTOM"><INPUT TYPE="BUTTON" STYLE="font-family:宋体;font-size:9pt" VALUE=" 关闭 " OnClick="self.close();" ID="button1" NAME="button1" TITLE="Close"></TD></TR>
<TR><TD><IMG SRC="$imagurl/Trans.gif" HEIGHT="7" WIDTH="1" BORDER="0"></TD></TR>
<TR><TD HEIGHT="7" BGCOLOR="#3366CC" COLSPAN="3"></TD></TR>
</TABLE>
</body>
</html>
EOF
exit;
}
######################### END OF SCRIPT #########################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -