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

📄 admin_user.asp

📁 本人仅业余学习一些基础的ASP知识以供系统设计之用,并非专业人员,相关服务器设置、MSSQL/MySQL数据库方面的专业问题请自行解决。 本人仅提供本系统相关的一些技术问题的解释、解答。
💻 ASP
📖 第 1 页 / 共 5 页
字号:

                if (theform.name.value=="") {
                        alert("请输入昵称!");
                        theform.name.focus();
                        return false;
                }

                var name=theform.name.value;
                if (name.length<1) {
                        alert("你所输入的昵称太短,至少也要输入 1 个字符");
                        theform.name.focus();
                        return false;
                }
                if (name.length>8) {
                        alert("你所输入的昵称太长,最多只能输入 8 个字符");
                        theform.name.focus();
                        return false;
                }

                if (theform.email.value=="") {
                        alert("请输入 Email 地址!");
                        theform.email.focus();
                        return false;
                }

                if (theform.email.value.indexOf("@") == -1) {
                        alert("请输入正确的 Email 地址");
                        theform.email.focus();
                        return false;
                }

                if (theform.email.value!=theform.email2.value) {
                        alert("两次输入的Email不相同,请确认并重新输入!");
                        theform.email.focus();
                        return false;
                }

                if (theform.password.value=="") {
                        alert("请输入登陆密码!");
                        theform.password.focus();
                        return false;
                }

                var password=theform.password.value;
                if (password.length<6) {
                        alert("你所输入的密码太短,至少也要输入 6 个字符");
                        theform.password.value="";
                        theform.password2.value="";
                        theform.password.focus();
                        return false;
                }
                if (password.length>18) {
                        alert("你所输入的密码太长,最多只能输入 18 个字符");
                        theform.password.value="";
                        theform.password2.value="";
                        theform.password.focus();
                        return false;
                }

                if (theform.password.value!=theform.password2.value) {
                        alert("两次输入的密码不相同,请确认并重新输入!");
                        theform.password.value="";
                        theform.password2.value="";
                        theform.password.focus();
                        return false;
                }

                if (theform.question1.value=="") {
                        alert("请输入的第一组密码提示问题!");
                        theform.question1.focus();
                        return false;
                }

                var question1=theform.question1.value;
                if (question1.length<6) {
                        alert("你所输入的第一组密码提示问题太短,至少也要输入 6 个字符");
                        theform.question1.focus();
                        return false;
                }
                if (question1.length>30) {
                        alert("你所输入的第一组密码提示问题太长,最多只能输入 30 个字符");
                        theform.question1.focus();
                        return false;
                }

                if (theform.answer1.value=="") {
                        alert("请输入的第一组密码提示问题答案!");
                        theform.answer1.focus();
                        return false;
                }

                var answer1=theform.answer1.value;
                if (answer1.length<6) {
                        alert("你所输入的第一组密码提示问题答案太短,至少也要输入 6 个字符");
                        theform.answer1.focus();
                        return false;
                }
                if (answer1.length>20) {
                        alert("你所输入的第一组密码提示问题答案太长,最多只能输入 20 个字符");
                        theform.answer1.focus();
                        return false;
                }

                if (theform.question2.value=="") {
                        alert("请输入的第二组密码提示问题!");
                        theform.question2.focus();
                        return false;
                }

                var question2=theform.question2.value;
                if (question2.length<6) {
                        alert("你所输入的第二组密码提示问题太短,至少也要输入 6 个字符");
                        theform.question2.focus();
                        return false;
                }
                if (question2.length>30) {
                        alert("你所输入的第二组密码提示问题太长,最多只能输入 30 个字符");
                        theform.question2.focus();
                        return false;
                }

                if (theform.answer2.value=="") {
                        alert("请输入的第二组密码提示问题答案!");
                        theform.answer2.focus();
                        return false;
                }

                var answer2=theform.answer2.value;
                if (answer2.length<6) {
                        alert("你所输入的第二组密码提示问题答案太短,至少也要输入 6 个字符");
                        theform.answer2.focus();
                        return false;
                }
                if (answer2.length>20) {
                        alert("你所输入的第二组密码提示问题答案太长,最多只能输入 20 个字符");
                        theform.answer2.focus();
                        return false;
                }

}

//-->
</script>
					<input class="button" type="submit" value="提交申请" name="submit">
					<input class="button" type="reset" value="重置表单" name="reset">
					</td>
				</tr>
			</table>
			</td>
		</tr>
	</form>
</table>
<%end sub
sub list()
Const MaxPerPage=20
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if
set rs=server.createobject("adodb.recordset")
sql="select id,Name,GOauthor,GOGXuser,GO_GXuser,IsVipUser,LockUser from userinfo order by id desc" 
'MySQL需要如下语句
conn.CursorLocation=3
rs.open sql,conn,1,1
if rs.eof and rs.bof then
	response.write "<table width=100% border=0 align=center cellpadding=0 cellspacing=2 bgcolor=#FFFFFF><tr align=center><td colspan=4 height=22 class=alt1>暂无任何数据</td></tr></table>"
else
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
	<tr>
		<td class="thead" align="center" height="25" colspan="9"><b>所有会员列表</b></td>
	</tr>
<form name="form" onsubmit="javascript:return cnendb();" target="cnendb" action="admin_Save.asp?info=user_listdel">
	<tr align="center" bgcolor="#1C3566">
		<td width="5%" valign="middle"></td>
                <td width="8%" height=25 align=center><font color="white">ID</font></td>
                <td width="18%" height=25 align=center><font color="white">昵称</font></td>
                <td width="16%" height=25 align=center><font color="white">驻站作家</font></td>
                <td width="16%" height=25 align=center><font color="white">更新员</font></td>
                <td width="18%" height=25 align=center><font color="white">VIP会员</font></td>
                <td width="10%" height=25 align=center><font color="white">锁定</font></td>
                <td width="10%" height=25 align=center><font color="white">删除</font></td>
              </tr>
<%
   Rs.PageSize=MaxPerPage
   Allpage=Rs.PageCount
   If Currentpage>Allpage Then Currentpage=1
   Num=Rs.RecordCount
   Rs.MoveFirst
   Rs.AbsolutePage=CurrentPage
   i=0
do while not rs.eof
%>
              <tr>
		<td align="center" valign="middle"><input type="checkbox" name="checked" value="<%=rs("id")%>"></td>
                <td height="22" align=center><%=rs("id")%> </td>
                <td align=center><a href="admin_User.asp?info=edit&id=<%=rs("id")%>"><%=rs("Name")%></a></td>
                <td align=center><%if rs("GOauthor")=1 then%>已驻站<%else%>非驻站<%end if%></td>
                <td align=center><%if rs("GOGXuser")=1 then%>已注册<%elseif rs("GO_GXuser")=1 then%><input class="button" type=button name=GOGXuser value="申请理由" onclick="javascript:window.open('admin_UserGOGXuser.asp?id=<%=rs("id")%>','_blank','')" style="width: 60; height: 20"></a>
                <input class="button" type=button name=lock value="通过申请" onclick="javascript:window.open('admin_UserSave.asp?id=<%=rs("id")%>&page=<%=currentPage%>&act=GOGXuser','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=300')" style="width: 60; height: 20"><%else%>
                未注册<input class="button" type=button name=lock value="直接通过" onclick="javascript:window.open('admin_UserSave.asp?id=<%=rs("id")%>&page=<%=currentPage%>&act=GOGXuser','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=300')" style="width: 60; height: 20"><%end if%></td>
                <td align=center><input class="button" type=button name=IsVipUser value=<%if rs("IsVipUser")=0 then%>"通过VIP"<%else%>"解除VIP"<%end if%> onclick="javascript:window.open('admin_UserSave.asp?id=<%=rs("id")%>&page=<%=currentPage%>&act=IsVipUser','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=300')" style="width: 60; height: 20"></td>
                <td align=center><input class="button" type=button name=lock value=<%if rs("LockUser")=0 then%>"锁定"<%else%>"开锁"<%end if%> onclick="javascript:window.open('admin_UserSave.asp?id=<%=rs("id")%>&page=<%=currentPage%>&act=lock','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=300')" style="width: 45; height: 20"></td>
                <td align=center><input class="button" type=button name=del value=删除 onclick="javascript:window.open('admin_Save.asp?info=user_del&id=<%=rs("id")%>&page=<%=currentPage%>','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=300')" style="width: 45; height: 20"></td>
              </tr>
<%
      i=i+1
      If i>=MaxPerPage Then  Exit  Do
      Rs.MoveNext
   Loop
%>
<td height="24" align="center" colspan="8"><input name="info" type="hidden" value="user_listdel">
									<input class="button" type="button" onclick="CheckAll(this.form)"  value="全选" name="chkall" style="width: 45; height: 20"> 
									<input class="button" type="button" onclick="CheckOthers(this.form)" value="反选" name="chkOthers" style="width: 45; height: 20"> 
									<input class="button" type="submit" value="删除" name="listdel" style="width: 45; height: 20">
									</td>
                            </tr>
        </form>
            </table>
<%End If
Rs.Close
Set  Rs=Nothing
%>                        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td height="24" align="center"><%Response.Write ShowPage("Admin_user.asp?info=list",CurrentPage,Num,MaxPerPage,True,True," 个项目")%></td>
                            </tr>
                        </table>

<%end sub

sub gxlist()
Const MaxPerPage=20
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if
set rs=server.createobject("adodb.recordset")
sql="select id,Name,UserName,LockUser from userinfo where GOGXuser=1 order by id desc" 
'MySQL需要如下语句
conn.CursorLocation=3
rs.open sql,conn,1,1
if rs.eof and rs.bof then
	response.write "<table width=100% border=0 align=center cellpadding=0 cellspacing=2 bgcolor=#FFFFFF><tr align=center><td colspan=4 height=22 class=alt1>暂无任何数据</td></tr></table>"
else%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
	<tr>
		<td class="thead" align="center" height="25" colspan="9"><b>更新员列表</b></td>
	</tr>
<form name="lform" onsubmit="javascript:return cnendb();" target="cnendb" action="admin_save.asp?info=user_listdel">
	<tr align="center" bgcolor="#1C3566">
		<td width="5%" valign="middle"></td>
                <td width="10%" height=25 align=center><font color="white">ID</font></td>
                <td width="25%" height=25 align=center><font color="white">用户名</font></td>
                <td width="25%" height=25 align=center><font color="white">昵称</font></td>
                <td width="20%" height=25 align=center><font color="white">更新员</font></td>
                <td width="10%" height=25 align=center><font color="white">锁定</font></td>
                <td width="10%" height=25 align=center><font color="white">删除</font></td>
              </tr>
<%
   Rs.PageSize=MaxPerPage
   Allpage=Rs.PageCount
   If Currentpage>Allpage Then Currentpage=1
   Num=Rs.RecordCount
   Rs.MoveFirst
   Rs.AbsolutePage=CurrentPage
   i=0
do while not rs.eof
%>
              <tr>
		<td align="center" valign="middle"><input type="checkbox" name="checked" value="<%=rs("id")%>"></td>
                <td height="22" align=center><%=rs("id")%> </td>
                <td align=center><a href="admin_User.asp?info=edit&id=<%=rs("id")%>"><%=rs("UserName")%></a></td>
                <td align=center><a href="admin_User.asp?info=edit&id=<%=rs("id")%>"><%=rs("Name")%></a></td>
                <td align=cen

⌨️ 快捷键说明

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