📄 adduser.asp
字号:
<!--#include file=../../INC/txlconst.asp-->
<!--#include file=../../INC/txlfun.asp-->
<%
Dim const_txl_HomeUrl,sql,i,GBL_CHK_TempStr
const_txl_HomeUrl = "../../"
%>
<!--#include file=../checkadmin.asp-->
<%
OpenDatabase
txl_SiteHead const_txlname&"- 新增用户"
call online
IF Request.QueryString("action")="addsave" Then
Call addsave
Else
Call main
End If
CloseDatabase
SiteBottom
sub main
dim facewidthmin,facewidthmax,faceheightmin,faceheightmax
facewidthmin=Split(const_FaceWidth,"|")(0)
facewidthmax=Split(const_FaceWidth,"|")(1)
faceheightmin=Split(const_Faceheight,"|")(0)
faceheightmax=Split(const_Faceheight,"|")(1)
%>
<script language="JavaScript" src="../../user/inc/txl_user.js"></script>
<script language="JavaScript">
<!--
function checkfrm(frm){
var obj=frm
var txl_username=Jtrim(obj.txl_username.value)
if(txl_username==""){
alert("用户名不能为空!")
obj.txl_username.focus();
return false;
}
var txl_password1=Jtrim(obj.txl_password1.value)
if(txl_password1==""){
alert("密码不能为空!")
obj.txl_password1.focus();
return false;
}
var txl_password2=Jtrim(obj.txl_password2.value)
if(txl_password2==""){
alert("验证密码不能为空!")
obj.txl_password2.focus();
return false;
}
if(txl_password1.length<4){
alert("密码长度请大于4位!")
obj.txl_password1.focus();
return false;
}
if(txl_password1!=txl_password2){
alert("两次输入的密码不相同!")
obj.txl_password2.focus();
return false;
}var txl_email=Jtrim(obj.txl_email.value)
if(txl_email==""||(!isemail(txl_email))){
alert("邮箱不能为空且必须有效!")
obj.txl_email.focus();
return false;
}
var txl_truename=Jtrim(obj.txl_truename.value)
if(txl_truename==""||(!ischinese(txl_truename))){
alert("用户名不能为空!且必须为中文")
obj.txl_truename.focus();
return false;
}
var txl_question=Jtrim(obj.txl_question.value)
if(txl_question==""){
alert("密码提示不能为空!")
obj.txl_question.focus();
return false;
}
var txl_answer=Jtrim(obj.txl_answer.value)
if(txl_answer==""){
alert("密码提示问题答案不能为空!")
obj.txl_answer.focus();
return false;
}
var txl_FaceUrl=obj.txl_FaceUrl.value
if (txl_FaceUrl.length<3){
alert("请选择头像或者输入网上头像地址!")
obj.txl_FaceUrl.focus();
return false
}
var txl_Underwrite=obj.txl_Underwrite.value
if (txl_Underwrite.length>255){
alert("签名长度不能大于255,当前长度"+txl_Underwrite.length)
obj.txl_Underwrite.focus();
return false
}
obj.send.disabled=true
return true
}
function openScript(url, width, height){
var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',scrollbars=aut爀?敲噴污?紊?D??Θ?Θ?o , resizable=no , copyhistory=no' );
}
function setface()
{
window.open('facelist.asp','','width=500,height=300 scrollbars=auto,status=auto,resizable=yes');
}
function changeface2()
{ var temp,obj;
obj=document.txlfrm;
if(obj.Form_FaceWidth.value!="")
{ if (! isnum(obj.Form_FaceWidth.value))
{
alert("自定义头像宽度必须是数字!\n");
obj.Form_FaceWidth.focus();
return;
}
else
{
if(obj.Form_FaceWidth.value<<%=facewidthmin%> || obj.Form_FaceWidth.value><%=facewidthmax%>)
{
alert("自定义头像宽度必须在<%=facewidthmin%>-<%=facewidthmax%>之间!\n");
obj.Form_FaceWidth.focus();
return;
}
}
}
if(obj.Form_FaceHeight.value!="")
{
if (! isnum(obj.Form_FaceHeight.value))
{
alert("自定义头像高度必须是数字!\n");
obj.Form_FaceHeight.focus();
return;
}
else
{
if(obj.Form_FaceHeight.value<<%=faceheightmin%> || obj.Form_FaceHeight.value><%=faceheightmax%>)
{
alert("自定义头像高度必须在<%=faceheightmin%>-<%=faceheightmax%>之间!\n");
obj.Form_FaceHeight.focus();
return;
}
}
}
temp=obj.txl_FaceUrl.value;
if (temp!="")
{ temp=temp.toLowerCase();
if(temp.indexOf("http:")>-1){
alert(temp)
document.faceimg.src=temp;
document.faceimg.width=obj.Form_FaceWidth.value;
document.faceimg.height=obj.Form_FaceHeight.value;
}
else
{
document.faceimg.src="../"+temp;
document.faceimg.width=obj.Form_FaceWidth.value;
document.faceimg.height=obj.Form_FaceHeight.value;
}
}
else if(document.faceimg.src!="")
{
document.faceimg.width=obj.Form_FaceWidth.value;
document.faceimg.height=obj.Form_FaceHeight.value;
}
}
//-->
</script>
<form name="txlfrm" method="post" action="?action=addsave" onsubmit="return checkfrm(this)">
<TABLE width="779" border=0 align="center" cellpadding="5" cellspacing="0" bgcolor="#FFFFFF" class=font>
<TR>
<TD height="25" colspan="2" align=center><a href="<%=const_txl_HomeUrl&const_txlurl%>"><%=const_txlname%></a>
>>后台管理>><a href="usermanage.asp">用户管理</a>>><b>新增用户</b></TD>
</TR>
<TR>
<TD height="25" colspan="2" class="blu"><B>新用户注册</B></TD>
</TR>
<TR>
<TD height="25" align=center> <p>*用户名称: </TD>
<TD height="25"> <p>
<input maxLength=30 name="txl_username" size=15>
(<font color="gray">用户名只能是字母,数字,下划线和中文</font>) </TD>
</TR>
<TR>
<TD height="25" align=center> <p>*你的密码: </TD>
<TD height="25"> <input name="txl_password1" type=password class=fminpt id="txl_password1" size=15 maxLength=15>
(<font color="gray">区分大小写,两端空格无效,大于4位</font>) </TD>
</TR>
<TR>
<TD height="25" align=center> <p>*验证密码: </TD>
<TD height="25"> <input name="txl_password2" type=password class=fminpt id="txl_password2" size=15 maxlength=15>
(<font color="gray">请填入刚才输入的密码</font>) </TD>
</TR>
<TR>
<TD height="25" align=center> <p>*电子邮件: </TD>
<TD height="25"> <input name=txl_email class=fminpt id="txl_email" size=36 maxLength=40>
(<font color="gray">请填入常用的邮箱,这个将是您的密码保密邮箱</font>) </TD>
</TR>
<TR>
<TD height="25" align=center>*真实姓名:</TD>
<TD height="25"><input name="txl_truename" type=text class=fminpt id="txl_truename" size=14 maxlength=20>
(<font color="gray">真实姓名请填写中文</font>) </TD>
</TR>
<TR>
<TD height="25" align=center> <p>*密码提示: </TD>
<TD height="25"> <input name=txl_question class=fminpt id="txl_questi爀?敲噴污?紊?D??Θ?Θ?on" size=36 maxLength=30>
</TD>
</TR>
<TR>
<TD height="25" align=center> <p>*提示答案: </TD>
<TD height="25"> <input name=txl_answer class=fminpt id="txl_answer" size=36 maxlength=30>
</TD>
</TR>
<TR>
<TD height="25" align=center> <p>QQ号码: </TD>
<TD height="25"> <input name=txl_oicq class=fminpt id="txl_oicq" size=15 maxlength=15 onkeyup='this.value=this.value.replace(/\D/gi,"")'>
(<font color="gray">如果没有QQ号码请填入8个0</font>) </TD>
</TR>
<TR bgcolor="#D8D6ED">
<TD height="25" colspan="2" align=center bgcolor="#CCCCCC"><font color="#000000">为了联系方便,请仔细填写以下信息,此信息对班级好友及游客保密</font></TD>
</TR>
<TR>
<TD height="25" align=center>家庭电话:</TD>
<TD height="25"><input name=txl_homephone class=fminpt id="txl_homeaddr3" size=15 maxlength=20></TD>
</TR>
<TR>
<TD height="25" align=center> <p>家庭地址: </TD>
<TD height="25"> <input name=txl_homeaddr class=fminpt id="txl_homeaddr" size=36 maxlength=50>
</TD>
</TR>
<TR>
<TD height="25" align=center>家庭邮编:</TD>
<TD height="25"><input name=txl_homezip class=fminpt id="txl_homezip" size=6 maxlength=6 onKeyUp='this.value=this.value.replace(/\D/gi,"")'></TD>
</TR>
<TR>
<TD height="25" align=center>目前联系号码:</TD>
<TD height="25"><input name=txl_newphone class=fminpt size=15 maxlength=20></TD>
</TR>
<TR>
<TD height="25" align=center> <p>目前地址: </TD>
<TD height="25"> <input name=txl_newaddr class=fminpt size=36 maxlength=50>
</TD>
</TR>
<TR>
<TD height="25" align=center>目前邮编:</TD>
<TD height="25"><input name=txl_newzip class=fminpt size=6 maxlength=6 onkeyup='this.value=this.value.replace(/\D/gi,"")'></TD>
</TR>
<TR>
<TD height="25" align=center> <p>你的性别: </TD>
<TD height="25"> <select name="txl_sex" id="txl_sex">
爀?敲噴污?紊?D??Θ?Θ?
<option value="男" selected>男</option>
<option value="女">女</option>
</select> </TD>
</TR>
<TR>
<TD height="25" align=center> <p>用户头像: </TD>
<TD height="25"> <select name="select" onChange="document.txlfrm.txl_FaceUrl.value=this.options[this.selectedIndex].value;document.all('faceimg').src='../../'+this.options[this.selectedIndex].value">
<% Call DisplayFaceSelect%>
</select> <img name=faceimg id=faceimg src=<%=const_txl_HomeUrl%>images/null.gif align=absmiddle>
</TD>
</TR>
<TR>
<TD height="25" align=center> <p>头像地址: </TD>
<TD height="25"> <input name=txl_FaceUrl class=fminpt id="txl_FaceUrl" onchange="javascript:changeface2();" size=36 maxlength=100>
<font color="gray">(网上图片填入完整的URL路径) </font></TD>
</TR>
<TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -