📄 sreg.cgi
字号:
#!/usr/bin/perl
$dirname=&mypath;
##################################################################
## ##
## 本版使用于WINDOWS和Unix/Linux等操作系统版 ##
##################################################################
require "$dirname/setup2002.pl";
require "$dirname/svote.lib";
&read_form;
&GetCookies;
$pwdtemp=$FORM{'pwdtemp'};
$pwdsb=$FORM{'pwdsb'};
$passd=$FORM{'password'};
$ursname=$FORM{'ursname'};
$ursname=~ tr/A-Z/a-z/;
if($action eq "newreg"){ &newreg;}
elsif($action eq "yhdl"){ &admin;}
elsif($action eq "change"){ &change;}
elsif($action eq "delpwd"){ &delpwd;}
elsif($action eq "regid"){&new;}
elsif($action eq "register"){®ister;}
elsif($action eq "regadmin"){®admin;}
elsif($action eq "editid"){&editid;}
elsif($action eq "Newedit"){&Newedit;}
else {&admin;}
exit;
###申请
sub new {
if($CONFIG{'yhreg'}){
if(($name ne $CONFIG{'name'})||($CONFIG{'pass'} ne $password)){&error("错误","已停止新账号申请"); }
}
&Header;
print<<EOF;
<form method="post" name="FORM" onsubmit="return form_Check();" action="$CGI{'reg'}"><input type=hidden name="action" value="newreg">
<table border="0" cellpadding="5" cellspacing="5" width="770" bgColor="#000084"><tr height="420"><td width="370"><font color="fffff0"><center><img src=$CONFIG{'img_url'}/vote1.gif></center><p>
您是否也曾为自己的主页缺乏内容而发愁?<br> 本调查系统支持多主题多项目调查,并可设置调查截止时间。创新的票数自选统计、参投者计分排行、关注结果通知。每一调查项目独立记录票数,防止调查数据丢失!使您的网站真正扭一扭!!
<p> 每个调查建立后周到的为你提供了四种不同的链接方式,懂HTML源码的可再次编辑色彩,真正实现个性化!
<p> 赶快申请并使用<a href=$CONFIG{'url'}>$CONFIG{'vote'}</a>提供专业选票调查系统,您将可以得到最优秀的选票调查系统,以增加贵网站的互动性。
<p> 申请本调查引擎使用时,必须遵守以下规定:<p>不得违反国家法律法规;<br>严禁自行设置一切有关邪教组织,反动组织的内容;<br>不得包含一切反动政治或违法言论、信息宣传;
<br>不得包含一切色情和黄色文字或内容;<br>违反者后果自负,本站并保留追究一切刑事责任的权利。
<br>所有调查数据,本站不负其真实调查结果。
</font><td width="400"><table border="0" cellpadding="0" cellspacing="0" width="370" bgcolor="#efefef">
<tr><td height="350" valign="top"><div align="center"><table border="0" cellpadding="2" width="390" cellspacing="3" height="350">
<tr><td bgcolor=#FFD7C>登记后,您就拥有了一个属于自己的全功能调查引擎了!
<tr><td>如还没注册为会员,请先<A href="$CGI{'reg'}?action=register&id=$id">注册登陆</a>后申请
<tr><td align="center">
<p>登陆账号:<input type="text" name="id" size="14" maxlength="10" class="form">
<p>登陆密码:<input type="password" name="pwd" size="14" maxlength="10" class="form">
<tr><td align="center"><input type="submit" value="提交信息" onClick="bs();" class="form1"> <input type="reset" value="重 填" class="form1">
</table></div>
<tr><td colspan="2"><center><p><a href="javascript:window.close()" class="1">关闭窗口</a>
<p>COPYRIGHT 2002-2004 ©<a href="http://hk666b.126.com" class="1">CK联合小组</a> 《CKvote_h》V2.0 </font>
</form></div></TABLE></table>
EOF
}
##
sub newreg {
if($CONFIG{'yhreg'}){
if(($name ne $CONFIG{'name'})||($CONFIG{'pass'} ne $password)){&error("错误","已停止新账号申请"); }
}
$pwd=$FORM{'pwd'};
open(PASS,"$dirname/$FILE{'ursid'}/$id.cgi");
$PASS=<PASS>;
close(PASS);
($ursid,$urspwd,$question,$answer,$email,$url,$oicq,$date_no,$home)=split(/\t/,$PASS);
if(($pwd ne $urspwd)||($id ne $ursid)){ &error("账号无效"," $id不存在或密码无效");}
if(-e "$dirname/$FILE{'poll'}/$id"){ &error("账号已申请调查"," $ursid调查已存在,请另用新账号");}
mkdir("$dirname/$FILE{'poll'}/$id",0777)|| &error("错误","创建目录不能写入!");
&Header("申请成功");
&Top;
print<<EOF;
<SCRIPT>
expireDate=new Date;
expireDate.setYear(expireDate.getYear()+1);
document.cookie="$Cookname="+"$id"+";expires="+expireDate.toGMTString()+";";
document.cookie="$Cookpass="+"$pwd"+";expires="+expireDate.toGMTString()+";";
</SCRIPT>
<p align="center"><a href="$CGI{'poll'}?id=$id">进入管理区</a><hr>
EOF
&Tailer;
}
####
sub register {
if($CONFIG{'regid'}){
if(($name ne $CONFIG{'name'})||($CONFIG{'pass'} ne $password)){&error("错误","已停止新用户注册"); }
}
open(PASS,"$dirname/$FILE{'ursid'}/$id.cgi");
$PASS=<PASS>;
close(PASS);
($ursid,$pwd,$question,$answer,$email,$url,$oicq,$date_no,$home)=split(/\t/,$PASS);
&Header("用户注册");
&Top;
print<<EOF;
<SCRIPT language=javascript>
function bs() {
document.FORM.questiontmp.focus();
document.FORM.answertmp.focus();
document.FORM.ursidtmp.focus();
}
function form_Check() {
if (document.FORM.ursidtmp.value==""){return false; }
if(document.FORM.pwd.value==""){ return false; }
if(document.FORM.cpwd.value==""){ return false; }
if(document.FORM.questiontmp.value==""){ return false; }
if(document.FORM.answertmp.value==""){ return false; }
if(document.FORM.email.value==""){ return false; }
document.FORM.ursid.value=document.FORM.ursidtmp.value;
document.FORM.ursidtmp.value="";
document.FORM.question.value=document.FORM.questiontmp.value;
document.FORM.questiontmp.value="";
document.FORM.answer.value=document.FORM.answertmp.value;
document.FORM.answertmp.value="";
return true;
}
// --></script>
<form method="post" name="FORM" onsubmit="return form_Check();" action="$CGI{'reg'}">
<input type=hidden name="question" value="">
<input type=hidden name="answer" value="">
<input type=hidden name="ursid" value="">
<input type=hidden name="action" value="regadmin">
<input type=hidden name="id" value="$id">
<table border="0" cellpadding="0" cellspacing="0" width="370" bgcolor="#efefef">
<tr><td height="370" valign="top"><div align="center"><table border="0" cellpadding="2" width="390" cellspacing="3" height="370">
<tr><td width="100%" colspan="2" bgcolor=#FFD7C>会员注册(系统将过滤名字中的特殊字符和空格)<tr><td width="25%" align="right">
登陆账号:<td width="75%"><input type="text" name="ursidtmp" size="14" maxlength="10" class="form"> 登陆时使用的账号<tr><td width="25%" align="right">
登陆密码:<td width="75%"><input type="password" name="pwd" size="14" maxlength="10" class="form"> 登陆时使用的密码<tr><td width="25%" align="right">
验证密码:<td width="75%"><input type="password" name="cpwd" size="14" maxlength="10" class="form"> 验证输入的密码<tr><td width="25%" align="right">
密码提示问题:<td width="75%"><input type="text" name="questiontmp" size="20" maxlength="50" class="form"> 忘记密码时要用到<tr><td width="25%" align="right">
问题的答案:<td width="75%"><input type="text" name="answertmp" size="20" maxlength="30" class="form"> 此问题的答案<tr><td width="25%" align="right">
E-Mail 地址:<td width="75%"><input type="text" name="email" size="20" maxlength="30" class="form"> 务必填写常用的信箱<tr><td width="25%" align="right">
您的网站名称:<td width="75%"><input type="text" name="home" size="20" maxlength="15" class="form"><tr><td width="25%" align="right">
您的网站地址:<td width="75%"><input type="text" name="url" size="20" maxlength="90" value="http://" class="form"><tr><td width="25%" align="right">
您的OICQ号码:<td width="75%"><input type="text" name="oicq" size="20" maxlength="20" class="form">
<tr><td colspan="2" align="center"><input type="submit" value="提交信息" onClick="bs();" class="form1"> <input type="reset" value="重 填" class="form1">
</table></div><tr><td height="14" colspan="2"><center><p><a href="javascript:window.close()" class="1">关闭窗口</a></form></div></TABLE>
EOF
&Tailer;
}
####
sub regadmin {
if($CONFIG{'regid'}){
if(($name ne $CONFIG{'name'})||($CONFIG{'pass'} ne $password)){&error("错误","已停止新用户注册"); }
}
$ursid=$FORM{'ursid'};
$ursid=~ tr/A-Z/a-z/;
$ursid=~ s/\s//g;
$ursid=~ s/setup//ig;
$ursid=~ s/exit//ig;
$ursid=~ s/\ \;//ig;
$ursid=~ s/CONFIG//ig;
$ursid=~ s/ / /g;
$ursid=~ s/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -