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

📄 yhxiu.cgi

📁 BBS3000 sourceCode
💻 CGI
📖 第 1 页 / 共 2 页
字号:
#!/usr/bin/perl
#------------------------------------------------------#
#                 本程序为Yuzi工作室提供	       #
#                Yuzi论坛3000 v3.20 免费版             #
#------------------------------------------------------#
require "setup.cgi";
######################
## 以下部分不需修改 ##
######################
$cgiurl    = "yhxiu.cgi";
$from    = $ENV{'REMOTE_ADDR'};
($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;}
$year=$year+1900;
$thistime=$year."-".$mon."-".$mday.".".$hour.":".$min.":".$sec;
$lasttime=$year."-".$mon."-".$mday;
##########
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/\ //g;
$value =~ s/\t/--/g;
$value =~ s/>/&gt;/g;
$value =~ s/</&lt;/g;
$FORM{$name} = $value;
$FORM{'qm'}=~s/\n/<br>/g;
$FORM{'jiao'}=~s/\n/<br>/g;
}
##########
$username = $FORM{'username'};
$newpsd   = $FORM{'newpsd'};
$userpsd  = $FORM{'userpsd'};
$titles   = $FORM{'titles'};
$comment  = $FORM{'comment'};
$jiao     = $FORM{'jiao'};
$mail     = $FORM{'mail'};
$home     = $FORM{'home'};
$city     = $FORM{'city'};
$work     = $FORM{'work'};
$love     = $FORM{'love'};
$qm     = $FORM{'qm'};
$sex     = $FORM{'sex'};
$oicq   = $FORM{'oicq'};
$tu     = $FORM{'tu'};
$title    = $FORM{'title'};
$menu = $FORM{'menu'};
$newpsd   = $FORM{'newpsd'};
$photo   = $FORM{'photo'};
$password   = $FORM{'password'};
&GetCookies;
if ($xgusername eq ""){$xgusername=$Cookies{username}};
if($menu eq "reguser"){&reguser; exit;}
if($menu eq "reg"){&reg;exit;}
if($username eq ""){&bzgl;exit;}
&reg;
exit;
##########
sub send_html {
if ($has_send ne "1") {
print "Content-type: text/html\n\n";
$has_send = "1";
}
}
##########
sub reg{
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,$iewin,$oicq,$photo)=split(/\t/,$line);
$jiao=~s/<br>//g;
$rdqm=~ s/<([^>]|\n)*>//g;
if($userpsd ne "$rdpassword"){&errorview("您的密码错误!");exit;}
&send_html;
print <<EOF;
<HTML><HEAD><TITLE>用户资料修改</TITLE>
<body background=$imagurl/bg.jpg>
<STYLE type=text/css>TD {
FONT-FAMILY: Arial; FONT-SIZE: 9pt; LINE-HEIGHT: 20px
}
.pt9 {
FONT-FAMILY: "宋体", "Arial", "Times New Roman"; FONT-SIZE: 9pt; LINE-HEIGHT: 13pt
}
.pt9w {
COLOR: #ffffff; FONT-FAMILY: "宋体", "Arial", "Times New Roman"; FONT-SIZE: 9pt; LINE-HEIGHT: 13pt
}
.pt9b {
FONT-FAMILY: "宋体", "Arial", "Times New Roman"; FONT-SIZE: 9pt; FONT-WEIGHT: bold; LINE-HEIGHT: 13pt
}
.pt10 {
FONT-FAMILY: 黑体, "Arial", "Times New Roman"; FONT-SIZE: 16px; LINE-HEIGHT: 21px
}
A:link {
COLOR: rgb(152,78,50); CURSOR: hand; FONT-STYLE: normal; TEXT-DECORATION: none
}
A:visited {
COLOR: #666666; FONT-STYLE: normal; TEXT-DECORATION: none
}
A:active {
COLOR: rgb(198,198,198); FONT-STYLE: normal; TEXT-DECORATION: none
}
A:hover {
COLOR: rgb(72,105,191); TEXT-DECORATION: none
}
</STYLE>
<SCRIPT LANGUAGE="JavaScript">
function openWindow(url) {
  popupWin = window.open('$imagurl/ybb.htm','','resizable,scrollbars')
}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style><!--  .ourfont{font-size: 12px;line-height: 17px;}
A:link {text-decoration: none; color: #ffffff}       A:visited {text-decoration: none; color:#8080FF }      A:active {text-decoration: none}      A:hover {text-decoration: none; color: #FF0000}   --></style>
</HEAD>
<BODY bgColor=#ffffff textcolor="000000">
<form method="post" action="$cgiurl">
<input type="hidden" name="menu" value="reguser">
<input type="hidden" name="photo" value="$photo">
<div align="center">
<table border="1" cellpadding="3" cellspacing="0" width="310" bgcolor="#FFCC66" bordercolorlight="#008000" bordercolordark="#FFFFFF">
<tr>
<TD><center><p><b>用户资料修改</b></p></TD>
</tr>
<tr>
<TD>
<P class=pt9>●
带<FONT color=red>*</FONT>为必填 </P></TD>
</tr>
<tr>
<TD>
<TABLE bgColor=#bbbbbb width="627">
<TBODY>
<TR bgcolor="#b7c4e2">
<TD align=right class=pt9 width="186"><FONT color=red>*</FONT>
网上尊称:</TD>
<TD class=pt9 width="466"><INPUT readOnly name=username value=$username> </TD></TR>
<TR bgcolor="#dedfdf">
<TD align=right class=pt9 width="186"><FONT color=red>*</FONT>
您的密码:</TD>
<TD class=pt9 width="466"><INPUT name=userpsd type=password value=$userpsd></TD></TR>
<TR bgcolor="#b7c4e2">
<TD align=right class=pt9 width="186">您的新密码:</TD>
<TD class=pt9 width="466"><input type="password" size=20 maxlength=12 name="newpsd" value=><FONT color=red> 如果您不打算更改密码,此处请留空!</TD></TR>
<TR bgcolor="#dedfdf">
<TD align=right class=pt9 width="186"><FONT color=red>*</FONT>  您的Email地址:</TD>
<TD class=pt9 width="466"><INPUT maxLength=80 name=mail size=50 value=$rdmail></TD></TR>
<TR bgcolor="#b7c4e2">
<TD align=right class=pt9 width="186">性别:</TD>
<TD class=pt9 width="466"><input type="radio" value="男" name="sex" checked>男<input
type="radio" value="女" name="sex">女</TD></TR>
<TR bgcolor="#dedfdf">
<TD align=right class=pt9 width="186">职业:</TD>
<TD class=pt9 width="466"><INPUT maxLength=80 name=work value=$rdwork></TD></TR>
<TR bgcolor="#b7c4e2">
<TD align=right class=pt9 width="186">
爱好:</TD>
<TD class=pt9 width="466"><INPUT maxLength=20 name=love value=$rdlove> </TD></TR>
<TR bgcolor="#dedfdf">
<TD align=right class=pt9 width="186">
OICQ:</TD>
<TD class=pt9 width="466"><INPUT maxLength=20 name=oicq value=$oicq> </TD></TR>
<TR bgcolor="#b7c4e2">
<TD align=right class=pt9 width="186">您的主页的URL:</TD>
<TD class=pt9 width="466"><INPUT maxLength=80 name=home size=65 value=$rdhome> </textarea> </TD></TR>
<TR bgcolor="#dedfdf">
<TD align=right class=pt9 width="186">
个人简介:<br></TD>
<TD class=pt9 width="466"><textarea name=jiao cols=60 rows=5>$jiao</textarea> </TD></TR>
<TR bgcolor="#b7c4e2">
<TD align=right class=pt9 width="186">
您的签名档:<br>
EOF
if ($YBBCodeAllow eq "is") {
print <<EOF;
<FONT color=red>(支持 <a href=javascript:openWindow()>YBB 代码</a>)</FONT>
EOF
}
print <<EOF;
</TD>
<TD class=pt9 width="466"><textarea name=qm cols=60 rows=5>$rdqm</textarea> </TD></TR>
<TR bgcolor="#dedfdf">
<TD align=right class=pt9 width="186">您所在的省份:</TD>
<TD class=pt9 width="466"><INPUT maxLength=20 name=city size=65 value=$rdcity></TD></TR>
  <TR bgcolor="#b7c4e2">
<TD align=right class=pt9 width="186">请选择您的头像:</TD>
<TD class=pt9 width="466">
<input type=radio name=tu value=0><img src=$imagurl/Image0.gif>
<input type=radio name=tu value=1><img src=$imagurl/Image1.gif>
<input type=radio name=tu value=2><img src=$imagurl/Image2.gif>
<input type=radio name=tu value=3><img src=$imagurl/Image3.gif>
<input type=radio name=tu value=4><img src=$imagurl/Image4.gif>

⌨️ 快捷键说明

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