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

📄 mb_add.asp

📁 视频点播系统
💻 ASP
📖 第 1 页 / 共 4 页
字号:
<!--#include file="chklogin.asp"-->
<%

call myobj.chkrq()
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>增加新用户</title>
<link href="images/style2.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #000000;
}
a:link {
	color: #0000FF;
	text-decoration: none;
}
a:visited {
	color: #0000FF;
	text-decoration: none;
}
a:hover {
	color: #FF0000;
	text-decoration: underline;
}
a:active {
	text-decoration: none;
}
-->
</style></head>

<body leftMargin="0" topMargin="0" bgcolor="#FFFFFF">
<%
action_e=request.QueryString("action")
Select Case action_e
	Case ""
	  Call main()
	Case "chk_userid"
	  Call chk_userid()
	Case "chk_info"
	  Call chk_info()
end select
%>
<%sub main%>
<form name="form1" method="post" action="<%=filename%>?action=chk_userid">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong class="font1">增加新用户-</strong>请输入新用户的账号并选择用户的类型</td>
  </tr>
</table>
<table width="550" height="200" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
  <tr>
    <td align="center" bgcolor="#F7F7F7"><table width="420" height="30" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">用户账号只能是数字、字母(不区分大小写)或下划线,长度为3-12个字符</td>
        </tr>
      </table>
      <table width="350" height="120" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center">          <p>
            <input name="userid" type="text" class="input1" id="userid" style="ime-mode:disabled" onkeydown="if(event.keyCode==13)event.keyCode=9" onkeyup="value=value.replace(/[\W]/g,'') " size="30" maxlength="12"onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))">
</p>
            <p>
              <input type="radio" name="u_type" value="1">
              个人计点用户 
              <input type="radio" name="u_type" value="2">
              个人包月用户 
              <input type="radio" name="u_type" value="3">
              网吧包月用户
            </p>
            <p>
              <input name="Submit" type="submit" class="button1" value="下一步"> 
              </p></td>
        </tr>
      </table>
      </td>
  </tr>
</table>
</form>
<%end sub%>
<%
sub chk_userid()
if request.Form("userid")="" or myobj.ChkID(request.Form("userid"))=false or myobj.ChkLen(request.form("userid"))<3 or myobj.ChkLen(request.form("userid"))>12 then
response.write"<script language=javascript>alert('用户账号格式不正确,请重新填写');history.back();</Script>"
response.end
end if
if request.Form("u_type")="" then
response.write"<script language=javascript>alert('请选择用户的类型');history.back();</Script>"
response.end
end if
if myobj.ChkNum(request.Form("u_type"))=false or request.Form("u_type")<1 or request.Form("u_type")>3 then
response.write"<script language=javascript>alert('用户类型值非法');history.back();</Script>"
response.end
end if

set rs=server.createobject("adodb.recordset")
rs.open "select * from member where userid = '"&request.Form("userid")&"'",conn,1,1
if not rs.eof then '该账号存在
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write"<script language=javascript>alert('该用户账号已经有人使用,请重新填写');history.back();</Script>"
response.end
end if

set rs=server.createobject("adodb.recordset")
rs.open "select * from member where u_type="&request.Form("u_type")&"",conn,1,1
u_count=rs.recordcount '当前用户类型总数
rs.close
set rs=server.createobject("adodb.recordset")
rs.open "select max_ps1,max_ps2,max_pb from setup",conn,1,1
max_ps1=rs("max_ps1")
max_ps2=rs("max_ps2")
max_pb=rs("max_pb")
rs.close
set rs=nothing
conn.close
set conn=nothing
if request.form("u_type")=1 then
	if cint(u_count)>=cint(max_ps1) then
	response.write"<script language=javascript>alert('允许注册的个人计点用户数量已达到上限');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_type")=2 then
	if cint(u_count)>=cint(max_ps2) then
	response.write"<script language=javascript>alert('允许注册的个人包月用户数量已达到上限');history.back();</Script>"
	response.end
	end if
end if
if request.form("u_type")=3 then
	if cint(u_count)>=cint(max_pb) then
	response.write"<script language=javascript>alert('允许注册的网吧包月用户数量已达到上限');history.back();</Script>"
	response.end
	end if
end if
%>
<form name="form1" method="post" action="<%=filename%>?action=chk_info">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="550" height="25" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#3975CE">
  <tr>
    <td align="center" class="font1"><strong class="font1">增加新用户-</strong>填写用户详细信息</td>
  </tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top">
        <table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
          <tr>
            <td bgcolor="#FFFFFF"><table width="550" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="130" height="30" align="right" bgcolor="#F7F7F7">用户账号:</td>
                  <td width="170" align="left" bgcolor="#F7F7F7"><%=LCase(request.Form("userid"))%></td>
                  <td align="center" bgcolor="#F7F7F7">&nbsp;</td>
                </tr>
            </table>
              <table width="550" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="130" height="40" align="right" bgcolor="#F7F7F7"><span class="font3">*</span>用户密码:</td>
                  <td width="170" bgcolor="#F7F7F7"><input name="u_pwd" type="password" class="input1" id="u_pwd" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[\W]/g,'') " size="20" maxlength="24"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></td>
                  <td rowspan="2" align="center" bgcolor="#F7F7F7"><table width="220" border="0" cellspacing="0" cellpadding="5">
                      <tr>
                        <td bgcolor="#F7F7F7">只能填写a~z的英文字母<span class="font3">(区分大小写)</span>、0~9的数字或下划线,长度为6-24个字符。两次输入的密码必须相同</td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="40" align="right" bgcolor="#F7F7F7"><span class="font3">*</span>再次输入用户密码:</td>
                  <td bgcolor="#F7F7F7"><input name="re_u_pwd" type="password" class="input1" id="re_u_pwd" style="ime-mode:disabled" onkeydown="javascript:if(event.keyCode==13)event.keyCode=9" onkeyup="javascript:value=value.replace(/[\W]/g,'') " size="20" maxlength="24"onbeforepaste="javascript:clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"></td>
                </tr>
              </table></td>
          </tr>
      </table></td>
  </tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
        <tr>
          <td bgcolor="#FFFFFF"><table width="550" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="130" height="40" align="right" bgcolor="#F7F7F7"><span class="font3">*</span>密码提示问题:</td>
                  <td width="170" bgcolor="#F7F7F7"><input name="pwd_qu" type="text" class="input1" id="pwd_qu" size="20"></td>
                  <td rowspan="2" align="center" bgcolor="#F7F7F7"><table width="220" border="0" cellspacing="0" cellpadding="5">
                      <tr>
                        <td bgcolor="#F7F7F7">密码提示问题和答案只能填写汉字、字母、数字,长度为8-50个字符,汉字占两个字符。</td>
                      </tr>
                  </table></td>
                </tr>
                <tr>
                  <td height="40" align="right" bgcolor="#F7F7F7"><span class="font3">*</span>密码提示答案:</td>
                  <td bgcolor="#F7F7F7"><input name="pwd_an" type="text" class="input1" id="pwd_an" size="20"></td>
                </tr>
            </table></td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">
        <tr>
          <td bgcolor="#FFFFFF"><table width="550" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="130" height="30" align="right" bgcolor="#F7F7F7">用户类型:</td>
                <td width="170" bgcolor="#F7F7F7"><%if request.Form("u_type")=1 then%>个人计点用户<%end if%><%if request.Form("u_type")=2 then%>个人包月用户<%end if%><%if request.Form("u_type")=3 then%>网吧包月用户<%end if%></td>
                <td align="center" bgcolor="#F7F7F7"><table width="220" border="0" cellspacing="0" cellpadding="5">
                    <tr>
                      <td bgcolor="#F7F7F7">用户类型的详细信息请查看[帮助文件]</td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="550" border="0" cellpadding="0" cellspacing="1" bgcolor="#E7E7E7">

⌨️ 快捷键说明

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