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

📄 qq_zc.asp

📁 国产亿人多用户在线聊天系统
💻 ASP
字号:
<!--#include file="conn.asp"-->
<htm>

<head>
<script language='javascript'>
function xgjc(mm,nc)
{
if(mm=="")
	{alert('密码不能为空!');
	document.de.mm.focus();
	return false;}

if(nc=="")
	{alert('昵称不能为空!');
	document.de.nc.focus();
	return false;}

if(mm.indexOf("'")>=0 ||mm.indexOf("<")>=0 ||mm.indexOf(">")>=0 ||mm.indexOf(".")>=0)
{
	alert('不能有乱码!');
	document.de.mm.focus();
	return false;
}}

function zcjc(yhm,mm,nc)
{
if(yhm=="")
	{alert('用户名不能为空!');
	document.zc.yhm.focus();
	return false;}
var aa ="";
aa = yhm.substring(0,1);
if((aa<='z'&&aa>='a')||(aa<='Z'&&aa>='A'))
{}
else
	{alert('首位不是字母!');
	document.zc.yhm.focus();
	return false;}
if(yhm.indexOf("'")>=0 ||yhm.indexOf("<")>=0 ||yhm.indexOf(">")>=0 ||yhm.indexOf(".")>=0)
	{alert('用户名不能有乱码!');
	document.zc.yhm.focus();
	return false;}

if(mm=="")
	{alert('密码不能为空!');
	document.zc.mm.focus();
	return false;}
if(mm.indexOf("'")>=0 ||mm.indexOf("<")>=0 ||mm.indexOf(">")>=0 ||mm.indexOf(".")>=0)
	{alert('不能有乱码!');
	document.zc.mm.focus();
	return false;}
if(nc=="")
	{alert('昵称不能为空!');
	document.zc.nc.focus();
	return false;}
}
</script>
<link rel="stylesheet" href="style.css" type="text/css">
<title>注册</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<!--#include file="qq_wjt.asp"-->
<%cz=request.querystring("cz")
mm=request.form("mm")
yhm=request.form("yhm")
nc=request.form("nc")
xb=request.form("xb")

if cz="xgxg" and mm<>"" and yhm<>"" then
	exec="update admin set pass='"+setpwd(mm)+"',nc='"+nc+"',xb='"+xb+"' where yhm='"+yhm+"'"
	conn.execute exec
	conn.close
	session("qqpass") = mm
	session("qqnc") = nc
	session("qqxb")= xb%>
	<script language='javascript'>
		alert('恭喜,修改成功!');
		window.location="qq.asp";
	</script>
<%end if
if cz="zccg" and mm<>"" and yhm<>"" then
''判断是否重复
	set rs=server.createobject("adodb.recordset")
	exec="select * from admin where yhm='"+yhm+"'"
	rs.open exec,conn,1,1 
	if rs.eof then
		yhm=xrzh(yhm)
		exec="insert into admin (xb,yhm,pass,jb,sj,nc) values ('"+xb+"','"+yhm+"','"+setpwd(mm)+"','1','"+cstr(date())+"','"+nc+"')"
		conn.execute exec
		conn.close
		session("qqyhm") = yhm
		session("qqxb") = xb
		session("qqjb") = "1"
		session("qqpass") = mm
		session("qqnc") = nc%>
		<script language='javascript'>
		alert('恭喜,申请成功!');
		window.location="qq.asp";
		</script>
      <%else%>
		  <script language='javascript'>
		alert('抱歉,此用户名已经有人用了,请换名后重新申请!');
		window.location="qq_zc.asp?cz=zc";
		</script>
      <%end if
end if%>
<p>&nbsp;</p>
<%if cz="" then%>
<form name="zc" action="qq_zc.asp?cz=zccg" method="post">
<table align="center"> 
	<tr height="25">
    <td>用户名</td>
	<td><input name="yhm" type="text" size="10" maxlength="10"></td>
	</tr>
	<tr height="25">
    <td>密  码</td>
	<td><input name="mm" type="password" size="10" maxlength="10">
	</td></tr>
	<tr height="25">
    <td>昵 称</td>
	<td><input name="nc" type="text" size="10" maxlength="10">
	</td></tr>
	<tr height="25"><td headers="25">性别</td>
	<td><input type="radio" value="男" name="xb" checked>男
	<input type="radio" value="女" name="xb">女</td></tr>
	<tr height="25"><td align="center" colspan="2">
    <input type="submit" name="sdfsd" value="注   册" onclick="javascript:return zcjc(yhm.value,mm.value,nc.value);">
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="button" value="返   回" onClick="javascript:window.location='qq.asp';">
</td></tr>
</table>
</form>
<%else%>
<form name="de" action="qq_zc.asp?cz=xgxg" method="post">
<table align="center">
	<tr height="25">
    <td align="center" >用户名:</td>
	<td><input name="yhm" type="text" size="10" maxlength="10" value="<%=session("qqyhm")%>" readonly=""></td>
	</tr>
	<tr height="25">
    <td align="center">新密码:</td>
	<td><input name="mm" type="password" size="10" maxlength="10" value="<%=setpwd(session("qqpass"))%>">
	</td></tr>
	<tr height="25"><td>昵 称</td><td><input name="nc" type="text" size="10" maxlength="10" value="<%=session("qqnc")%>"></td></tr>
	<tr height="25">
	<td headers="25">性别</td>
	<td><input type="radio" value="男" name="xb" <%if session("qqxb")="男" then response.write "checked"%>>男
	<input type="radio" value="女" name="xb" <%if session("qqxb")="女" then response.write "checked"%>>女</td></tr>
	<tr height="25"><td align="center" colspan="2">
	<input type="submit" name="sdfsd" value="修   改" onclick="javascript:return xgjc(mm.value,nc.value);">
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="button" value="返   回" onClick="javascript:window.location='qq.asp';">
</td></tr>
</table>
</form>
<%end if%>
</body>
</htm>

⌨️ 快捷键说明

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