ÕâÊÇÔÚ 20CNÍøÂ簲ȫС×éµÚÒ»´úÂÛ̳ µÄÂÛ̳ ÍøÕ¾½¨Éè ÖеÄÖ÷Ìâ Ò»¸ö¶Ä³¡£¨²»ÊÇÎÒдµÄ£©¡£


Òª²é¿´Õâ¸öÖ÷Ì⣬ÇëʹÓÃÕâ¸ö URL:
http://www.20cn.net/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic;f=4;t=000183

ÓÉ TomyChen ·¢±íÓÚ :
 
#!/usr/bin/perl
###ÉèÖò¿·Ö######################################

$userhead = "user"; #²»¼Ó /
$playfile = "."; #²»¼Ó /
$imagurl = "http://djfsys.51.net/chat/image"; #²»¼Ó /

###ÒÔϲ»±ØÐÞ¸Ä##################################


&get_form;
&set_var;

open(DUCHANG,"$userhead/$username.cgi") || &error("Óû§ $username ²»´æÔÚ");
$data=<DUCHANG>;
close(DUCHANG);
($chkuserdata,$chkusername,$chkaddpassword,$jibie,$chkaddemail,$chkaddphotourl,$chkaddcomment,$chknoway2,$chkpoint,$chkdaten,$chknone,$chkend)=split(/¡¬/,$data);

($sec,$min,$hour,$mday,$mon,$year,$wday,$yday)= localtime(time+(3600*$time_hour));
$mon=$mon+1;
if($mon <10){$mon="0".$mon;}
if($mday<10){$mday="0".$mday;}
if($hour<10){$hour="0".$hour;}
if($min<10){$min="0".$min;}
if($sec<10){$sec="0".$sec;}
$year=$year+1900;
$thistime="$hour:$min:$sec $mon/$mday/$year";
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/<!--(.|\n)*-->//g;
$value =~ s/\t/--/g;
$value =~ s/<([^>]|\n)*>/ /g;
$FORM{$name} = $value;
}
############
$menu = $FORM{'menu'};
$qqq = $FORM{'qqq'};
$dddimg = $FORM{'dddimg'};

if($menu eq "sz"){&sz;exit;}
if($menu eq "szover"){&szover;exit;}
if($menu eq "dx"){&dx;exit;}
if($menu eq "dxover"){&dxover;exit;}
if($menu eq "ds"){&ds;exit;}
if($menu eq "dsover"){&dsover;exit;}

print "Content-type: text/html\n\n";
print<<EOF;
<html><head><title>¶Ä³¡</title></head><body bgcolor="#FFCC66"><p align="center">¶Ä³¡</p><div align="center"><center>
<table border="1" width="100%" height="250" bordercolorlight="#808080" cellspacing="0" cellpadding="2" bordercolordark="#FFFFFF">
<tr><td width="100%" height="13">¡¤<font size="2"><b><a href="$playfile/play.cgi?$userinfo&menu=sz">¶Ä÷»×Ó</a></b></font></td>
</tr><tr><td width="100%" height="84" valign="top"><p style="margin-top: 2; margin-bottom: 2">
<font size="2">ÓÎÏ·¹æÔò£º×¯¼ÒËæ»ú³öÈý¸ö<font class="c"><b>÷»×Ó</b>£¬Íæ¼ÒÒ²Ëæ»ú³öÈý¸ö<b>÷»×Ó</b>£¬Ë­´ó£¬Ë­Ó®¡£</font></font></p>
<p style="margin-top: 2; margin-bottom: 2"><font class="c" size="2">ÅâÂÊ£º<b>£±Å⣱</b></font></p>
<p style="margin-top: 2; margin-bottom: 2"></p><p style="margin-top: 2; margin-bottom: 2"></p></center>
<p style="margin-top: 2; margin-bottom: 2" align="right"><font class="c" size="2">
<a href="$playfile/play.cgi?$userinfo&menu=sz">ÏÖÔÚ½øÈë>>></a></font></td>
</tr><center><tr><td width="100%" height="17" align="left">¡¤<b><a href="$playfile/play.cgi?$userinfo&menu=dx"><font size="2">¶Ä´óС</font></a></b></td>
</tr><tr><td width="100%" height="66" valign="top" align="left"><p style="margin-top: 2; margin-bottom: 2"><font size="2">ÓÎÏ·¹æÔò£ºµçÄÔËæ»ú³öÈý¸ö<font class="c">
<b>÷»×Ó</b>£¬ÄãÑ¡Ôñ¿ª´ó»¹ÊÇС£¬Èç¹û<b>÷»×Ó</b>¼ÓÆðÀ´´óÓÚµÈÓÚ£±£°Îª´ó£¬·´Ö®ÎªÐ¡¡£</font></font></p><p style="margin-top: 2; margin-bottom: 2">
<font class="c" size="2">ÅâÂÊ£º<b>£±Å⣱</b></font></p><p style="margin-top: 2; margin-bottom: 2"></p></center><p style="margin-top: 2; margin-bottom: 2" align="right">
<font class="c" size="2"><a href="$playfile/play.cgi?$userinfo&menu=dx">ÏÖÔÚ½øÈë>>></a></font></td></tr><center><tr>
<td width="100%" height="21" align="left">¡¤<b><a href="$playfile/play.cgi?$userinfo&menu=ds"><font size="2">²ÂµãÊý</font></a></b></td></tr><tr>
<td width="100%" height="72" valign="top" align="left"><p style="margin-top: 2; margin-bottom: 2"><font size="2">ÓÎÏ·¹æÔò£ºµçÄÔËæ»ú³öÒ»¸ö<font class="c">
<b>÷»×Ó</b>£¬ÄãÑ¡Ôñ÷»×ӵĵãÊý£¬Èç¹û<b>÷»×Ó</b>µÄµãÊýºÍÄãÑ¡µÄµãÊýÒ»Ñù£¬Äú¾ÍÓ®ÁË¡£</font></font></p>
<p style="margin-top: 2; margin-bottom: 2"><font class="c" size="2">ÅâÂÊ£º<b>£±Å⣵</b></font></p><p style="margin-top: 2; margin-bottom: 2"></p>
</center><p style="margin-top: 2; margin-bottom: 2" align="right"><font class="c" size="2">
<a href="$playfile/play.cgi?$userinfo&menu=ds">ÏÖÔÚ½øÈë>>></a></font></td></tr></table></div></body></html>
EOF
exit;

############

sub sz{
print "Content-type: text/html\n\n";
print <<EOF;
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>
function check(theForm) {
if(theForm.qqq.value > 10 || theForm.qqq.value < 1) {
alert("×îÉÙÏÂעΪ 1 µã £¬×î¶àÏÂעΪ 10 µã £¡");
return false;
}
}
</SCRIPT>
<style type=text/css>
<!--
body,table {font-size: 9pt; font-family: ËÎÌå}
input { font-size: 9pt; color: #000000; background-color: #f7f7f7; padding-top: 3px}
..c { font-family: ËÎÌå; font-size: 9pt; font-style: normal; line-height: 12pt; font-weight: normal; font-variant: normal; text-decoration: none}
--></style>
</HEAD>
<BODY text=#000000 vLink=#0099cc aLink=#0099cc link=#0099cc bgColor=#ffffff leftMargin=0 background="$imagurl/bg.gif" topMargin=0 rightMargin=0 marginwidth="0" marginheight="0">
<p> ¡¡
</p>
<div align=center>
<p><font size="2" class=c><font size="3"><b>¶Ä³¡ - ¶Ä÷»×Ó<br>
<br>
</b></font></font></p>
<p>- ×î´óÏÂעΪ <b><font color="#CC0000">10</font> µã</b> -</p>
<form method="POST" action="$playfile/play.cgi?$userinfo"><input type="hidden" name=menu value=szover>
<table border=1 cellspacing=0 cellpadding=3 align="center" width="400" bordercolordark="#FFFFFF">
<tr>
<td bgcolor="#F2D9B3" width="320"><font size="2" class=c><b>  ÇëÏÂ×¢</b></font></td>
</tr>
<tr bgcolor=#FAF0E2>
<td align=center>ÄãÏÖÔÚÒ»¹²ÓÐ <b><font color="#CC0000">$chkpoint</font>
µã¾­ÑéÖµ</b> ¿ÉÒÔ×÷Ϊ¶Ä×¢</td>
</tr>
<tr>
<td align=center bgcolor="#FAF0E2">ÎÒÒªÏÂ×¢£º
<input type="text" name="qqq" size="10" value="0">
 <b>µã</b></td>
</tr>
<tr>
<td align=center bgcolor=#F2D9B3><input type="submit" value="ÏÂ×¢À²£¡£¡£¡" name="B1" style="font-size: 12px" onclick="return check(this.form)"><input type="reset" value="ÎÒÒª¿¼ÂÇһϣº£©" name="B2" style="font-size: 12px"></td>
</tr>
</table>
</form>
[ <a href=javascript:history.back()> ᵠȯ </a> ]
</div>
</BODY>
</HTML>
EOF
exit;
}

#################

sub szover{
if($chkpoint < $qqq){&error("¶Ô²»Æð£¬ÄúµÄ»õ±Ò²»¹»£¬ÎÞ·¨½øÐжIJ©£¡");exit;}
if($qqq < 0){&error("ÊäÈë´íÎó£¡");exit;}
if($qqq > 10){&error("¶Ô²»Æð£¬×î¶àÏÂ×¢²»Äܳ¬¹ý 10 µã £¡");exit;}
srand;
@b=(1,2,3,4,5,6);
$a1=$b[rand (@b)];
$a2=$b[rand (@b)];
$a3=$b[rand (@b)];
$b1=$b[rand (@b)];
$b2=$b[rand (@b)];
$b3=$b[rand (@b)];
$zhuang=$a1+$a2+$a3;
$me=$b1+$b2+$b3;
if($zhuang >= $me){$chkpoint=$chkpoint-$qqq;}
if($zhuang < $me){$chkpoint=$chkpoint+$qqq;}
open(NUMBER,">$userhead/$username.cgi");
print NUMBER "userdata¡¬$chkusername¡¬$chkaddpassword¡¬$jibie¡¬$chkaddemail¡¬$chkaddphotourl¡¬$chkaddcomment¡¬1¡¬$chkpoint¡¬$chkdaten¡¬$chknone¡¬end\n";
close(NUMBER);
print "Content-type: text/html\n\n";
print <<EOF;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<BODY background="$imagurl/bg.gif">
<style type="text/css">
body,table {font-size: 9pt; font-family: ËÎÌå}
input { font-size: 9pt; color: #000000; background-color: #f7f7f7; padding-top: 3px}
..c { font-family: ËÎÌå; font-size: 9pt; font-style: normal; line-height: 12pt; font-weight: normal; font-variant: normal; text-decoration: none}
</style>
</head>
<div align="center">
<p><font size="2" class="c"><font size="3"><b>¶Ä ³¡ - ¶Ä ÷» ×Ó</b></font></font></p>
<table border="1" cellspacing="0" cellpadding="3" align="center" width="400" bordercolordark="#FFFFFF">
<tr>
<td width="320" colspan="3" bgcolor="#F2D9B3"><font size="2" class="c"><b>  ½á
¹û</b></font></td>
</tr>
<tr>
<td colspan="3" align="center" bgcolor="#FAF0E2"><font color="#0000CC">¡õ-ׯ¼Ò÷»×Ó£º</font>$zhuang
µã </td>
</tr>
<tr>
<td width="33%" align="center"><img src="$imagurl/dice$a1.gif"></td>
<td width="33%" align="center"><img src="$imagurl/dice$a2.gif"></td>
<td width="34%" align="center"><img src="$imagurl/dice$a3.gif"></td>
</tr>
<tr>
<td colspan="3" align="center" bgcolor="#FAF0E2"><font color="#CC0000">¡õ-ÄãµÄ÷»×Ó£º</font>$me
µã </td>
</tr>
<tr>
<td width="33%" align="center"><img src="$imagurl/dice$b1.gif"></td>
<td width="33%" align="center"><img src="$imagurl/dice$b2.gif"></td>
<td width="34%" align="center"><img src="$imagurl/dice$b3.gif"></td>
</tr>
<tr bgcolor="#FAF0E2">
<td colspan="3" align="center"> <br>
EOF
if($zhuang >= $me){
print <<EOF;
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td height="50"> </td>
<td colspan="2" height="50">
<p><font size="3"><img src="$imagurl/face3.gif" width="20" height="20" align="absmiddle">
Õ浹ù£¬ÊäÁË£º <b><font color="#CC0000">$qqq </font>µã</b></font></p>
</td>
</tr>
<tr>
<td align="right"><b><font color="#000099"> ׯ¼Ò£º</font></b></td>
<td colspan="2"><b><font color="#000099"><img src="$imagurl/face4.gif" width="20" height="20" align="absmiddle"></font></b>
ºÇºÇ~»¹ÒªÀ´Â𣿠ÓжÄδ±ØÊäŶ~£¡</td>
</tr>
<tr>
<td align="right" rowspan="2"><b><font color="#CC0000"> ÎÒÒª£º</font></b></td>
<td colspan="2"><b><font color="#CC0000"><img src="$imagurl/face8.gif" width="20" height="20" align="absmiddle"></font></b>
<a href="$playfile/play.cgi?$userinfo&menu=sz">ÔÙÀ´£¬ÅÞ£¬ÎҾͲ»ÏàÐÅÕâôµ¹Ã¹~£¡</a></td>
</tr>
<tr>
<td colspan="2"><img src="$imagurl/face19.gif" width="20" height="20" align="absmiddle">
<a href="$playfile/play.cgi?$userinfo" target=_top>½ñÌìÕ浹ù£¬×ß~ÁË£¬Ï´ÎÔÙÍæ~£¡</a></td>
</tr>
</table>
EOF
}else{
print <<EOF;
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right" height="50"> </td>
<td colspan="2" height="50">
<p><font size="3"><img src="$imagurl/face1.gif" width="20" height="20" align="absmiddle">
ÎûÎû~£¬Ó®ÁË£º<b><font color="#CC0000">$qqq </font>µã</b></font></p>
</td>
</tr>
<tr>
<td align="right"><b><font color="#000099"> ׯ¼Ò£º</font></b></td>
<td colspan="2"><b><font color="#000099"><img src="$imagurl/face6.gif" width="20" height="20" align="absmiddle"></font></b>
ÄãÕæÀ÷º¦Ñ½~£¡»¹ÒªÀ´Â𣿠</td>
</tr>
<tr>
<td align="right"><b><font color="#CC0000">ÎÒÒª£º</font></b></td>
<td colspan="2"><img src="$imagurl/face4.gif" width="20" height="20" align="absmiddle">
<a href="$playfile/play.cgi?$userinfo&menu=sz">ÔÙÀ´£¬ÎÒ½ñÌìÔËÆø²»´íÒ®~£¡</a></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><img src="$imagurl/face2.gif" width="20" height="20" align="absmiddle">
<a href="$playfile/play.cgi?$userinfo" target=_top>¼ûºÃ¾ÍÊÕ£¬ºÇºÇ£¬×ßÈË¿©~£¡</a></td>
</tr>
</table>
EOF
}
print <<EOF;
<hr size="1" width="250">
ÄãÏÖÔÚÓо­ÑéÖµ£º<font color="#CC0000"><b><font color="#CC0000">$chkpoint</font>
</b></font><b>µã</b>
<hr size="1" width="250">
</td>
</tr>
<tr>
<td bgcolor="#F2D9B3" align="right" colspan="3"><a href="$playfile/play.cgi?$userinfo">¶Ä³¡Ê×Ò³</a></td>
</tr>
</table>
</div>
</body>
</html>
EOF
exit;
}

################

sub dx{
print "Content-type: text/html\n\n";
print <<EOF;
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>
function check(theForm) {
if(theForm.qqq.value > 10 || theForm.qqq.value < 1) {
alert("×îÉÙÏÂעΪ 1 µã £¬×î¶àÏÂעΪ 10 µã £¡");
return false;
}
}
</SCRIPT>
<style type=text/css>
body,table {font-size: 9pt; font-family: ËÎÌå}
input { font-size: 9pt; color: #000000; background-color: #f7f7f7; padding-top: 3px}
..c { font-family: ËÎÌå; font-size: 9pt; font-style: normal; line-height: 12pt; font-weight: normal; font-variant: normal; text-decoration: none}
</style>
</HEAD>
<BODY text=#000000 vLink=#0099cc aLink=#0099cc link=#0099cc bgColor=#ffffff leftMargin=0 background="$imagurl/bg.gif" topMargin=0 rightMargin=0 marginwidth="0" marginheight="0">
<br>
<p align="center"> <font size="2" class=c><font size="3"><b>¶Ä ³¡ - ¶Ä ´ó С</b></font></font></p>
<div align=center>
<hr width="180" size="1">
<p>×î´óÏÂעΪ <b><font color="#CC0000">10</font> µã</b></p>

<p>ÄãÏÖÔÚÒ»¹²ÓÐ <b><font color="#CC0000">$chkpoint</font> µã¾­ÑéÖµ</b> ¿ÉÒÔ×÷Ϊ¶Ä×¢</p>
<form method="POST" action="$playfile/play.cgi?$userinfo"><input type="hidden" name=menu value=dxover>
<table border=1 cellspacing=0 cellpadding=3 align="center" width="350" bordercolordark="#FFFFFF">
<tr align="center">
<td width="33%"><img src="$imagurl/run.gif" width="38" height="36"></td>
<td width="33%"><img src="$imagurl/run.gif" width="38" height="36"></td>
<td width="33%"><img src="$imagurl/run.gif" width="38" height="36"></td>
</tr>
<tr>
<td bgcolor="#F2D9B3" width="960" colspan="3"><font size="2" class=c><b>  ÇëÑ¡Ôñ</b></font></td>
</tr>
<tr>
<td align=center colspan="3">
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td width="50%"><img src="$imagurl/big.gif" width="46" height="40"></td>
<td width="50%"><img src="$imagurl/small.gif" width="46" height="40"></td>
</tr>
<tr align="center">
<td width="50%">
<input type="radio" name="dddimg" value="big" checked>
</td>
<td width="50%">
<input type="radio" name="dddimg" value="small">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align=center colspan="3">ÎÒÒªÏÂ×¢£º
<input type="text" name="qqq" size="10" value="0">
 <b>µã</b></td>
</tr>
<tr>
<td align=center bgcolor=#F2D9B3 colspan="3">
<input type="submit" value="ÏÂ×¢À²£¡£¡£¡" name="B1" style="font-size: 12px" onclick="return check(this.form)">
<input type="reset" value="ÎÒÒª¿¼ÂÇһϣº£©" name="B2" style="font-size: 12px">
</td>
</tr>
</table>
</form>
[ <a href=javascript:history.back()> ᵠȯ </a> ]
</div>
</BODY>
</HTML>
EOF
exit;
}

################

sub dxover{
if($chkpoint < $qqq){&error("¶Ô²»Æð£¬ÄúµÄ»õ±Ò²»¹»£¬ÎÞ·¨½øÐжIJ©£¡");exit;}
if($qqq < 0){&error("ÊäÈë´íÎó£¡");exit;}
if($qqq > 10){&error("¶Ô²»Æð£¬×î¶àÏÂ×¢²»Äܳ¬¹ý 10 µã £¡");exit;}
srand;
@b=(1,2,3,4,5,6);
$a1=$b[rand (@b)];
$a2=$b[rand (@b)];
$a3=$b[rand (@b)];
$zhuang=$a1+$a2+$a3;
if($zhuang > 10){$ddd="big";$ttt="´ó"}
if($zhuang <= 10){$ddd="small";$ttt="С"}
if($dddimg eq $ddd){$chkpoint=$chkpoint+$qqq;}
if($dddimg ne $ddd){$chkpoint=$chkpoint-$qqq;}
open(NUMBER,">$userhead/$username.cgi");
print NUMBER "userdata¡¬$chkusername¡¬$chkaddpassword¡¬$jibie¡¬$chkaddemail¡¬$chkaddphotourl¡¬$chkaddcomment¡¬1¡¬$chkpoint¡¬$chkdaten¡¬$chknone¡¬end\n";
close(NUMBER);
print "Content-type: text/html\n\n";
print <<EOF;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type=text/css>
body,table {font-size: 9pt; font-family: ËÎÌå}
input { font-size: 9pt; color: #000000; background-color: #f7f7f7; padding-top: 3px}
..c { font-family: ËÎÌå; font-size: 9pt; font-style: normal; line-height: 12pt; font-weight: normal; font-variant: normal; text-decoration: none}
</style>
<BODY background="$imagurl/bg.gif">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" text="#000000" link="#0033CC" vlink="#003399">
<br>
<div align="center">
<p><font size="2" class="c"><font size="3"><b>¶Ä ³¡ - ¶Ä ´ó С</b></font></font></p>
<p><font size="2" class="c"><b><font color="#0000CC">ÄãѺµÄÊÇ</font><br>
<font color="#CC0000"></font><font color="#CC0000">
</font></b></font><img src="$imagurl/$dddimg.gif" width="46" height="40"><font size="2" class="c"><b><font color="#CC0000"></font></b></font>
<table border="1" cellspacing="0" cellpadding="3" align="center" width="400" bordercolordark="#FFFFFF">
<tr bgcolor="#F2D9B3">
<td colspan="3" align="center"><font class="c"><b>½á¹û:</b></font><b>$zhuangµã£¬$ttt</b></td>
</tr>
<tr>
<td width="33%" align="center"><img src="$imagurl/dice$a1.gif"></td>
<td width="33%" align="center"><img src="$imagurl/dice$a2.gif"></td>
<td width="34%" align="center"><img src="$imagurl/dice$a3.gif"></td>
</tr>
EOF
if($dddimg eq $ddd){
print <<EOF;
<tr>
<td colspan="3" align="center" bgcolor="#FAF0E2"> <br>
<p><font size="3"><img src="$imagurl/face1.gif" width="20" height="20" align="absmiddle">ÎûÎû£¬Ó®ÁË£º<b><font color="#CC0000">$qqq </font>µã</b></font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right"><b><font color="#000099">ׯ¼Ò£º</font></b></td>
<td colspan="2"><img src="$imagurl/face10.gif" width="20" height="20" align="absmiddle">ÄãÕæÀ÷º¦Ñ½~£¡»¹ÒªÀ´Âð£¿</td>
</tr>
<tr>
<td align="right"><b><font color="#CC0000">ÎÒ˵£º</font></b></td>
<td colspan="2"><img src="$imagurl/face4.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo&menu=dx">ÔÙÀ´£¬ÎÒ½ñÌìÔËÆø²»´íÒ®~£¡</a></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><img src="$imagurl/face2.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo" target=_top>¼ûºÃ¾ÍÊÕ£¬ºÇºÇ£¬×ßÈËà¶~£¡</a></td>
</tr>
</table>
EOF
}else{
print <<EOF;
<tr>
<td colspan="3" align="center" bgcolor="#FAF0E2"> <br>
<p><font size="3"><img src="$imagurl/face3.gif" width="20" height="20" align="absmiddle">Õ浹ù£¬ÊäÁË£º<b><font color="#CC0000">$qqq </font>µã</b></font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right"><b><font color="#000099">ׯ¼Ò£º</font></b></td>
<td colspan="2"><img src="$imagurl/face4.gif" width="20" height="20" align="absmiddle">ºÇºÇ»¹ÒªÀ´Â𣿠ÓжÄδΪÊäŶ~£¡</td>
</tr>
<tr>
<td align="right"><b><font color="#CC0000">ÎÒ˵£º</font></b></td>
<td colspan="2"><img src="$imagurl/face12.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo&menu=dx">ÔÙÀ´£¬ÅÞ£¬ÎҾͲ»ÏàÐÅÕâôµ¹Ã¹~£¡</a></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><img src="$imagurl/face19.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo" target=_top>½ñÌìÕ浹ù£¬²»À´ÁË£¬Ï´ÎÔÙÍæ~£¡</a></td>
</tr>
</table>
EOF
}
print <<EOF;
<hr width="250" SIZE="1">
ÄãÏÖÔÚÓо­ÑéÖµ£º<b><font color="#CC0000"><b>$chkpoint</b>
</font>µã </b>
<hr width="250" SIZE="1">
</td>
</tr>
<tr>
<td bgcolor="#F2D9B3" align="right" colspan="3"><a href="$playfile/play.cgi?$userinfo">¶Ä³¡Ê×Ò³</a></td>
</tr>
</table>
<font size="3">
</div>
</body>
</html>
EOF
exit;
}

##############

sub ds{
print "Content-type: text/html\n\n";
print <<EOF;
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=JavaScript>
function check(theForm) {
if(theForm.qqq.value > 10 || theForm.qqq.value < 1) {
alert("×îÉÙÏÂעΪ 1 µã £¬×î¶àÏÂעΪ 10 µã £¡");
return false;
}
}
</SCRIPT>
<style type=text/css>
body,table {font-size: 9pt; font-family: ËÎÌå}
input { font-size: 9pt; color: #000000; background-color: #f7f7f7; padding-top: 3px}
..c { font-family: ËÎÌå; font-size: 9pt; font-style: normal; line-height: 12pt; font-weight: normal; font-variant: normal; text-decoration: none}
</style>
</HEAD>
<BODY text=#000000 vLink=#0099cc aLink=#0099cc link=#0099cc bgColor=#ffffff leftMargin=0 background="$imagurl/bg.gif" topMargin=0 rightMargin=0 marginwidth="0" marginheight="0">
<br>
<p align="center"> <font size="2" class=c><font size="3"><b>¶Ä ³¡ - ²Â µã Êý</b></font></font></p>
<div align=center>
<hr width="180" size="1">
<p>×î´óÏÂעΪ <b><font color="#CC0000">10</font> µã</b></p>
<p>ÄãÏÖÔÚÒ»¹²ÓÐ <b><font color="#CC0000">$chkpoint</font> µã¾­ÑéÖµ</b> ¿ÉÒÔ×÷Ϊ¶Ä×¢</p>
<form method="POST" action="$playfile/play.cgi?$userinfo"><input type="hidden" name=menu value=dsover>
<table border=1 cellspacing=0 cellpadding=3 align="center" width="350" bordercolordark="#FFFFFF">
<tr align="center">
<td width="33%"><img src="$imagurl/run.gif"></td>
</tr>
<tr>
<td bgcolor="#F2D9B3" width="960"><font size="2" class=c><b>  ÇëÑ¡Ôñ</b></font></td>
</tr>
<tr>
<td align=center>
<table border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td width="17%"><img src="$imagurl/dice1.gif"></td>
<td width="17%"><img src="$imagurl/dice2.gif"></td>
<td width="16%"><img src="$imagurl/dice3.gif"></td>
<td width="17%"><img src="$imagurl/dice4.gif"></td>
<td width="17%"><img src="$imagurl/dice5.gif"></td>
<td width="16%"><img src="$imagurl/dice6.gif"></td>
</tr>
<tr align="center">
<td width="17%">
<input type="radio" name="dddimg" value="1" checked>
</td>
<td width="17%">
<input type="radio" name="dddimg" value="2">
</td>
<td width="16%">
<input type="radio" name="dddimg" value="3">
</td>
<td width="17%">
<input type="radio" name="dddimg" value="4">
</td>
<td width="17%">
<input type="radio" name="dddimg" value="5">
</td>
<td width="16%">
<input type="radio" name="dddimg" value="6">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align=center>ÎÒÒªÏÂ×¢£º
<input type="text" name="qqq" size="10" value="0">
 <b>µã</b></td>
</tr>
<tr>
<td align=center bgcolor=#F2D9B3>
<input type="submit" value="ÏÂ×¢À²£¡£¡£¡" name="B1" style="font-size: 12px" onclick="return check(this.form)">
<input type="reset" value="ÎÒÒª¿¼ÂÇһϣº£©" name="B2" style="font-size: 12px">
</td>
</tr>
</table>
</form>
[ <a href=javascript:history.back()> ᵠȯ </a> ]
</div>
</BODY>
</HTML>
EOF
exit;
}

#################

sub dsover{
if($chkpoint < $qqq){&error("¶Ô²»Æð£¬ÄúµÄ»õ±Ò²»¹»£¬ÎÞ·¨½øÐжIJ©£¡");exit;}
if($qqq < 0){&error("ÊäÈë´íÎó£¡");exit;}
if($qqq > 10){&error("¶Ô²»Æð£¬×î¶àÏÂ×¢²»Äܳ¬¹ý 10 µã £¡");exit;}
srand;
@b=(1,2,3,4,5,6);
$a1=$b[rand (@b)];
if($dddimg eq $a1){$qqq=$qqq*5;$chkpoint=$chkpoint+$qqq;}
if($dddimg ne $a1){$chkpoint=$chkpoint-$qqq;}
open(NUMBER,">$userhead/$username.cgi");
print NUMBER "userdata¡¬$chkusername¡¬$chkaddpassword¡¬$jibie¡¬$chkaddemail¡¬$chkaddphotourl¡¬$chkaddcomment¡¬1¡¬$chkpoint¡¬$chkdaten¡¬$chknone¡¬end\n";
close(NUMBER);
print "Content-type: text/html\n\n";
print <<EOF;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type=text/css>
body,table {font-size: 9pt; font-family: ËÎÌå}
input { font-size: 9pt; color: #000000; background-color: #f7f7f7; padding-top: 3px}
..c { font-family: ËÎÌå; font-size: 9pt; font-style: normal; line-height: 12pt; font-weight: normal; font-variant: normal; text-decoration: none}
</style>
</head>
<BODY background="$imagurl/bg.gif">
<br>
<div align="center">
<p><font size="2" class="c"><font size="3"><b>¶Ä ³¡ - ²Â µã Êý</b></font></font></p>
<p><font size="2" class="c"><b><font color="#0000CC">ÄãѺµÄÊÇ</font><br>
<font color="#CC0000"></font><font color="#CC0000">
</font></b></font><img src="$imagurl/dice$dddimg.gif" width="40" height="40">
<table border="1" cellspacing="0" cellpadding="3" align="center" width="400" bordercolordark="#FFFFFF">
<tr bgcolor="#F2D9B3">
<td align="center"><font class="c"><b>½á¹û:</b></font><b>$a1</b><b>µã</b></td>
</tr>
<tr>
<td width="33%" align="center"> <span id="s1" style = "width : 100">
<a onmouseover="img.style.width='80';" onmouseout="img.style.height= '80';">
<Img src="$imagurl/dice$a1.gif" id="img" width="40" height="40">
</span></a></td>
</tr>
EOF
if($dddimg eq $a1){
print <<EOF;
<tr>
<td colspan="3" align="center" bgcolor="#FAF0E2"> <br>
<p><font size="3"><img src="$imagurl/face1.gif" width="20" height="20" align="absmiddle">ÎûÎû~£¬Ó®ÁË£º <b><font color="#CC0000">$qqq </font>µã</b></font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right"><b><font color="#000099">ׯ¼Ò£º</font></b></td>
<td colspan="2"><img src="$imagurl/face13.gif" width="20" height="20" align="absmiddle">ÄãÕæÀ÷º¦Ñ½~£¡»¹ÒªÀ´Âð£¿</td>
</tr>
<tr>
<td align="right"><b><font color="#CC0000">ÎÒ˵£º</font></b></td>
<td colspan="2"><img src="$imagurl/face4.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo&menu=ds">ÔÙÀ´£¬ÎÒ½ñÌìÔËÆø²»´íÒ®~£¡</a></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><img src="$imagurl/face2.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo" target=_top>¼ûºÃ¾ÍÊÕ£¬ºÇºÇ£¬×ßÈËà¶~£¡</a></td>
</tr>
</table>
EOF
}else{
print <<EOF;
<tr>
<td colspan="3" align="center" bgcolor="#FAF0E2"> <br>
<p><font size="3"><img src="$imagurl/face3.gif" width="20" height="20" align="absmiddle">Õ浹ù£¬ÊäÁË£º <b><font color="#CC0000">$qqq </font>µã</b></font></p>
<table width="80%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right"><b><font color="#000099">ׯ¼Ò£º</font></b></td>
<td colspan="2"><img src="$imagurl/face14.gif" width="20" height="20" align="absmiddle">ºÇºÇ»¹ÒªÀ´Â𣿠ÓжÄδΪÊäŶ~£¡</td>
</tr>
<tr>
<td align="right"><b><font color="#CC0000">ÎÒ˵£º</font></b></td>
<td colspan="2"><img src="$imagurl/face12.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo&menu=ds">ÔÙÀ´£¬ÅÞ£¬ÎҾͲ»ÏàÐÅÕâôµ¹Ã¹~£¡</a></td>
</tr>
<tr>
<td align="right"> </td>
<td colspan="2"><img src="$imagurl/face19.gif" width="20" height="20" align="absmiddle"><a href="$playfile/play.cgi?$userinfo" target=_top>½ñÌìÕ浹ù£¬²»À´ÁË£¬Ï´ÎÔÙÍæ~£¡</a></td>
</tr>
</table>
EOF
}
print <<EOF;
<hr width="250" SIZE="1">
ÄãÏÖÔÚÓо­ÑéÖµ£º<b><font color="#CC0000"><b>$chkpoint</b>
</font>µã </b>
<hr width="250" SIZE="1">
</td>
</tr>
<tr>
<td bgcolor="#F2D9B3" align="right"><a href="$playfile/play.cgi?$userinfo">¶Ä³¡Ê×Ò³</a></td>
</tr>
</table>
<font size="3">
</div>
</body>
</html>
EOF
exit;
}
######################### END OF SCRIPT #########################

sub get_form {
@querys = split(/&/, $ENV{'QUERY_STRING'});
foreach (@querys) {
($name,$value) = split(/=/, $_);
$value = &filterhtml($value);
&setvaluetoform($name, $value);
if ($name eq "userpassword") {&check_password;}

}

read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach (@pairs) {
($name, $value) = split(/=/, $_);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value = &filterhtml($value);
&setvaluetoform($name, $value);
if ($name eq "userpassword") {&check_password;}
}

$userpassword =&get_var('userpassword','\n|"|<|>|\&|;| |\?|¡¬');
unless ($userpassword ne "") {&check_password;}

}
##########
sub filterhtml {
local($return)=$_[0];
$return =~ s/<!--(.|\n)*-->//g;
$return =~ s/\¡¬/~~/og if ($name ne "delgbook");
$return =~ s/\|%|`|ÿ//og;
#$return =~ s/$censorword/¡Á¡Á¡Á/iog;

$return =~ s/<([^>]|\n)*>//g;
$return =~ s/<//g;
$return =~ s/:\s*{.*|<\s*script.*|\\|iframe.*|frame.*|meta.*|javascript\s*:.*|onerror.*|onclick.*|onmouse.*|\&.*\#.*|vbscript.*|onload\s*=.*|prompt\s*=.*|style\s*=.*|js\s*:.*|do\s*{.*|while\s*\(.*|window\..*//ig;
return $return;
}
##########
sub setvaluetoform {
if (($FORM{$_[0]}) && ($_[0] ne "username")) {
$FORM{$_[0]}="$FORM{$_[0]}¡ì$_[1]";
}
else {
$FORM{$_[0]}=$_[1];
}
}
##########
sub check_password {
$username =&get_var('username' ,'\n|"|<|>|\&|;| |\?|¡¬');
$userpassword =&get_var('userpassword','\n|"|<|>|\&|;| |\?|¡¬');
$pid =&get_var("pid" ,"\n|¡¬");

if (($username ne "") && (-e "$userhead/$username.cgi")) {

$userdata=&readuserfile($username);
($mark,$chkusername,$chkuserpassword,$chkuserlevel,$chkemail,$chkphotourl,$chkcomment,$chknotice,$chkpoint,$chkactive,$chkstats,$end)= split (/\¡¬/,$userdata);

($chkstatus,$chkno)=split(/_/,$chkstats);
$cryptword=$cword if ($cword ne "");
$cryptword=substr($chkno,7,2) unless ($cword ne "");
$chkuserpassword=crypt($chkuserpassword,$cryptword);
# $chkpid=crypt($chkno,$cryptword);
# if ($chkpid ne $pid){
# &error("½ø³ÌºÅ²»·û");
# }

# if ($chkuserpassword eq $userpassword) {
# $userlevel=$chkuserlevel ;
# }
# else {
# &error('ÄãÊäÈëÁ˲»ÕýÈ·µÄÃÜÂë');
# }

}
}

##########
sub set_var {
$job =&get_var('job' ,'\n|¡¬');
$username =&get_var('username' ,'\n|"|<|>|\&|;| |\?|¡¬|¡ì');
$usersex =&get_var('usersex' ,'\n|¡¬');
$pid =&get_var("pid" ,"\n|¡¬");
$autocls =&get_var('autocls' ,'\n|¡¬');
$towhoway =&get_var('towhoway' ,'\n|¡¬');
$towho =&get_var('towho' ,'\n|¡¬');
$says =&get_var('says' ,'\n|¡¬');
$addwordcolor =&get_var('addwordcolor' ,'\n|=|¡¬');
$addsays =&get_var('addsays' ,'\n|=|¡¬');
$addsign =&get_var('addsign' ,'\n|=|¡¬');
$changelogouturl =&get_var('changelogouturl' ,'\n|¡¬');
$kickoutuser =&get_var('kickoutuser' ,'\n');
$kickoutway =&get_var('kickoutway' ,'\n');
$midiurl =&get_var('midiurl' ,'\n|¡¬');
$filteruser =&get_var('filteruser' ,'\n|¡¬');
$smode =&get_var('smode' ,'\n|¡¬');
if ($smode ne "down") {$smode = "up";}
if ($username eq "") { &error("ûÓÐÖ¸¶¨Óû§Ãû£¡"); }
if (length($username) > 14) { &error("Óû§ÃûÌ«³¤£¡"); }
#if (length($usersex) > 4) { &error("Òì³£ÐÔ±ð£¡"); }
if (length($says) > 200) { &error("Ò쳣̸»°ÄÚÈÝ£¡"); }
if (length($addwordcolor) > 10) { &error("Òì³££¡"); }


#&checkempty($job ,"ûÓй¤×÷ָʾ");
$autocls = "yes" if (!$autocls);

$userip=$ENV{'REMOTE_ADDR'};

($secn,$minn,$hourn,$dayn,$monn,$yearn,$weekn,$yeardayn,$isdst) = localtime(time+(3600*$time_miss));
$monn=$monn+1;
if ($monn<10) {$monn="0$monn";}
if ($dayn<10) {$dayn="0$dayn";}
if ($hourn<10) {$hourn="0$hourn";}
if ($minn<10) {$minn="0$minn";}
if ($secn<10) {$secn="0$secn";}
$yearn +=1900;
$daten="$yearn/$monn/$dayn";
$timen="$hourn\:$minn\:$secn";
$messnod="$yearn$monn$dayn$hourn$minn$secn";
$messno=$messnod.sprintf("%03d",int(rand(999)));
$secn=$hourn*60*60+$minn*60+$secn;
$reloadtimes=4;
$reloadxx=$reloadx*$reloadtimes;
$reloadxxx=$reloadxx*$reloadtimes;
$bekick3_sec =$secn-($kicktime);
$bekick4_sec =$secn+($kicktime);
$statsno=time+(3600*$time_miss);

$userinfo="&username=$username";
$userinfo="$userinfo&smode=$smode";
$userinfo="$userinfo&usersex=$usersex" if ($usersex ne "");
$userinfo="$userinfo&pid=$pid" if ($pid ne "");
$userinfo="$userinfo&filteruser=$filteruser" if (($filteruser ne "") && ($job ne "filterlist"));
$userinfo="$userinfo&userpassword=$userpassword" if (($userpassword) && ($userpassword ne ""));
if (($job !~/look/) && ( (-s "$filehead$kickfile")>0)) { do "$cgihead/kick.cgi"; &check_kick;}
}

#########
sub get_var {
local($return)="";
$return="$FORM{$_[0]}" if ($FORM{$_[0]});
$return=~ s/$_[1]//g;
if (($return =~ /\¡¬/) && ($_[0] ne "delgbook")) { &error("·Ç·¨×Ö·û");}
return $return;
}
#############
sub readuserfile {
open(READUSERFILE,"$userhead/$_[0].cgi");
flock(READUSERFILE,1) unless (!$use_flock);
@readuserfile=<READUSERFILE>;
flock(READUSERFILE,8) unless (!$use_flock);
close(READUSERFILE);
return $readuserfile[0];
}

sub checkempty {
local($chkval)=$_[0];
$chkval =~ s/ |<br>|\n//g;
&error($_[1]) if ($chkval eq "");
}
##########
sub error {
print "Content-type: text/html\n\n";
print qq~<html><head><title>$roomtitle ERROR</title></head><body bgcolor="#FFFFFF">~;
print "<META HTTP-EQUIV=REFRESH CONTENT='$_[1];URL=$_[2]'>\n" if (($_[1]) && ($_[2]));
print qq~<table width="90%" border="1" bordercolorlight="#CCFFFF" bordercolordark="#000000" bordercolor="#33CCFF" align="center" bgcolor="#99CCFF">
<tr bgcolor="#0000CC" bordercolor="#33CCFF" align="center">
<td><font color="#FFFFFF" size="2">¡õ</font><font color="#FFFFFF">¡õ <b><font size="5">ERROR</font></b> ¡õ<font size="2">¡õ</font></font></td>
</tr><tr bordercolor="#003399"><td align=center><br><br><h2>$_[0]</h2><br></td></tr></table></body></html>
~;
exit 0;
}
sub notify {
print "Content-type: text/html\n\n";
print qq~<html><head><title>$roomtitle: $_[0]</title></head><body bgcolor="#FFFFFF">~;
$olmtarget ="mess";
if ($multishow==1) { $olmtarget ="me";}

print qq~<table width="90%" border="1" bordercolorlight="#CCFFFF" bordercolordark="#000000" bordercolor="#33CCFF" align="center" bgcolor="#99CCFF">
<tr bgcolor="#0000CC" bordercolor="#33CCFF" align="center">
<td><font color="#FFFFFF" size="2">¡õ</font><font color="#FFFFFF">¡õ <b><font size="5">$_[0]</font></b> ¡õ<font size="2">¡õ</font></font></td>
</tr><tr bordercolor="#003399"><td align=center><br><br><h2>$_[1]</h2><br></td></tr><tr><td>
<SCRIPT LANGUAGE="JavaScript">
<!--
if (window != window.top) {
document.write("<center><form><input type=button value='µãÕâÀï·µ»Ø̸»°Çø' onClick=\\"parent.sHEAD=true;parent.$olmtarget.location.href='$cgiurl?job=look$userinfo&lastno='+top.lastno+'&filteruser='+top.filteruser\\" ></form></center>");
}
else {
document.write("<center><form><input type=button value='¹Ø±Õ±¾´°¿Ú' onClick=\\"javascript:window.close();\\" ></form></center>");
}
// -->
</SCRIPT>
</td></tr></table></body></html>
~;
exit 0;
} #


------------------
ÈËÉú¾ÍÏñÒ»¸ö·½³Ì£º
Ò»ÊÇÓн⣻
Ò»ÊÇÎ޽⣻
ÎÒ¾ÍÊÇÊôÓÚÎÞ½âµÄ¡£
»¶Ó­µÇ½ÎÒµÄÂÛ̳
 


ÓÉ ÐÇÖ®³¾ ·¢±íÓÚ :
 
ÄÄÀïÓÐÑÝʾµÄ¿´£¬ÎÒÒ²½øÈ¥¶Ä¶Ä°¡£¬ºÇºÇ¡«

------------------
¡ï°éÐÇÖ®³¾£¬Î¢²»×ãµ½¡ï
¶¯ÂþÎÄѧ²£Á§ÐÄ http://poli.at.china.com »¶Ó­Äú
 






Powered by Infopop Corporation
UBB.classic™ 6.5.0
NetDemonÐ޸İæ 1.5.0, 20CNÍøÂ簲ȫС×é °æȨËùÓС£