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

📄 admin_user.asp

📁 一个比较完整的企业erp系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	  	response.write "正常"
	  end if
	  %>
            </td>
            <td width="100" align="center">
              <%
		response.write "<a href='Admin_User.asp?Action=Modify&school_id=" & rs("school_id") & "'>修改</a>&nbsp;"
		if rs("LockUser")=False then
			response.write "<a href='Admin_User.asp?Action=Lock&school_id=" & rs("school_id") & "'>锁定</a>&nbsp;"
		else
            response.write "<a href='Admin_User.asp?Action=UnLock&school_id=" & rs("school_id") & "'>解锁</a>&nbsp;"
		end if
        response.write "<a href='Admin_User.asp?Action=Del&school_id=" & rs("school_id") & "' onClick='return confirm(""确定要删除此用户吗?"");'>删除</a>"
		%>
            </td>
          </tr>
          <%
	i=i+1
	if i>=MaxPerPage then exit do
	rs.movenext
loop
%>
        </table>  
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="200" height="30"><input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">
              选中本页显示的所有用户</td>
            <td> <strong>操作:</strong> 
              <input name="Action" type="radio" value="Del" checked>删除&nbsp;&nbsp;&nbsp;&nbsp;
              <input name="Action" type="radio" value="Lock">锁定 &nbsp;&nbsp;&nbsp;
              <input name="Action" type="radio" value="UnLock">解锁 &nbsp;&nbsp;&nbsp; 
              <input name="Action" type="radio" value="Move">移动到
              <select name="UserLevel" id="UserLevel">
                <option value="0">学校用户</option>
                <option value="1">学区用户</option>
				  <option value="2">管理员</option>
              </select>
              &nbsp;&nbsp; 
              <input type="submit" name="Submit" value=" 执 行 " disabled> </td>
  </tr>
</table>
</td>
</form></tr></table>
<%
end sub

sub AddUser()
%>
<form action="Admin_User.asp" method="post">
  <table width=100% border=0 cellpadding=2 cellspacing=1 class="border">
    <TR align=center class='title'> 
      <TD height=22 colSpan=2><font class=en><b>添 加 新 用 户</b></font></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><b>用户名:</b><BR>
        不能超过14个字符(7个汉字)</TD>
      <TD width="60%"> <INPUT   maxLength=14 size=30 name=school> <font color="#FF0000">*</font></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><B>密码(至少6位):</B><BR>
        请输入密码,区分大小写。 请不要使用任何类似 '*'、' ' 或 HTML 字符 </TD>
      <TD width="60%"> <INPUT   type=password maxLength=12 size=30 name=Password> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>确认密码(至少6位):</strong><BR>
        请再输一遍确认</TD>
      <TD width="60%"> <INPUT   type=password maxLength=12 size=30 name=PwdConfirm> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>密码问题:</strong><BR>
        忘记密码的提示问题</TD>
      <TD width="60%"> <INPUT   type=text maxLength=50 size=30 name="Question"> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>问题答案:</strong><BR>
        忘记密码的提示问题答案,用于取回密码</TD>
      <TD width="60%"> <INPUT   type=text maxLength=20 size=30 name="Answer"> 
        <font color="#FF0000">*</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>Email地址:</strong></TD>
      <TD width="60%"> <INPUT   maxLength=50 size=30 name=Email> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>系统负责人:</strong></TD>
      <TD width="60%"> <INPUT maxLength=20 size=30 name=School_User></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>系统负责电话:</strong></TD>
      <TD width="60%"> <INPUT maxLength=50 size=30 name=Tel></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>所属用户组:</strong></TD>
      <TD width="60%"><select name="UserLevel" id="UserLevel">
                <option value="0">学校用户</option>
                <option value="1">学区用户</option>
				<option value="2">管理员</option>
        </select></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>用户状态:</strong></TD>
      <TD width="60%"><input name="LockUser" type="radio" value="False" checked>
        正常&nbsp;&nbsp; <input type="radio" name="LockUser" value="True">
        锁定</TD>
    </TR>
    <TR align="center" class="tdbg" > 
      <TD colspan="2"><input name="Action" type="hidden" id="Action" value="SaveAdd"> 
        <input type="submit" name="Submit" value=" 添 加 " disabled></TD>
    </TR>
  </TABLE>
</form>
<%
end sub

sub Modify()
	dim school_id
	dim rsUser,sqlUser
	school_id=trim(request("school_id"))
	if school_id="" then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>参数不足!</li>"
		exit sub
	else
		school_id=Clng(school_id)
	end if
	Set rsUser=Server.CreateObject("Adodb.RecordSet")
	sqlUser="select * from [School_data] where school_id=" & school_id
	rsUser.Open sqlUser,conn,1,3
	if rsUser.bof and rsUser.eof then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>找不到指定的用户!</li>"
		rsUser.close
		set rsUser=nothing
		exit sub
	end if
%>
<FORM name="Form1" action="Admin_User.asp" method="post">
  <table width="100%" border="0" cellspacing="1" cellpadding="2" class="border">
    <TR class='title'> 
      <TD height=22 colSpan=2 align="center"><b>修改注册用户信息</b></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><b>用户名:</b></TD>
      <TD width="60%"><%=rsUser("school")%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><B>密码(至少6位):</B><BR>
        请输入密码,区分大小写。 请不要使用任何类似 '*'、' ' 或 HTML 字符 </TD>
      <TD width="60%"> <INPUT   type=password maxLength=16 size=30 name=Password> 
        <font color="#FF0000">如果不想修改,请留空</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD><strong>确认密码(至少6位):</strong><br>
        请再输一遍确认</TD>
      <TD><INPUT name=PwdConfirm   type=password id="PwdConfirm" size=30 maxLength=12> 
        <font color="#FF0000">如果不想修改,请留空</font> </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>密码问题:</strong><br>
        忘记密码的提示问题</TD>
      <TD width="60%"> <INPUT name="Question"   type=text value="<%=rsUser("Question")%>" size=30> 
      </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>问题答案:</strong><BR>
        忘记密码的提示问题答案,用于取回密码</TD>
      <TD width="60%"> <INPUT   type=text size=30 name="Answer"> <font color="#FF0000">如果不想修改,请留空</font></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>Email地址:</strong></TD>
      <TD width="60%"> <INPUT name=Email value="<%=rsUser("Email")%>" size=30   maxLength=50> 
      </TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>系统负责人:</strong></TD>
      <TD width="60%"> <INPUT name=School_User value="<%=rsUser("School_User")%>" size=30 maxLength=20></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>系统负责电话:</strong></TD>
      <TD width="60%"> <INPUT name=tel value="<%=rsUser("tel")%>" size=30 maxLength=50></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>所属用户组:</strong></TD>
      <TD width="60%"><select name="UserLevel" id="UserLevel">
          <option value="0" <%if rsUser("UserLevel")=0 then response.write " selected"%>>学校用户</option>
          <option value="1" <%if rsUser("UserLevel")=1 then response.write " selected"%>>学区用户</option>
             <option value="2" <%if rsUser("UserLevel")=2 then response.write " selected"%>>管理员</option>

        </select></TD>
    </TR>
    <TR class="tdbg" > 
      <TD width="40%"><strong>用户状态:</strong></TD>
      <TD width="60%"><input type="radio" name="LockUser" value="False" <%if rsUser("LockUser")=False then response.write "checked"%>>
        正常&nbsp;&nbsp; <input type="radio" name="LockUser" value="True" <%if rsUser("LockUser")=True then response.write "checked"%>>
        锁定</TD>
    </TR>
    <TR class="tdbg" > 
      <TD height="40" colspan="2" align="center"><input name="Action" type="hidden" id="Action" value="SaveModify"> 
        <input name=Submit   type=submit id="Submit" value="保存修改结果"disabled> <input name="school_id" type="hidden" id="school_id" value="<%=rsUser("school_id")%>"></TD>
    </TR>
  </TABLE>
</form>
<%
	rsUser.close
	set rsUser=nothing
end sub


%>
</body>
</html>
<%
sub SaveAdd()
	dim school,Password,PwdConfirm,Question,Answer,Email,School_User,Tel,UserLevel,LockUser
	school=trim(request("school"))
	Password=trim(request("Password"))
	PwdConfirm=trim(request("PwdConfirm"))
	Question=trim(request("Question"))
	Answer=trim(request("Answer"))
	Email=trim(request("Email"))
	School_User=trim(request("School_User"))
	Tel=trim(request("Tel"))
	UserLevel=trim(request("UserLevel"))
	LockUser=trim(request("LockUser"))
	
	if school="" or strLength(school)>14 or strLength(school)<4 then
		founderr=true
		errmsg=errmsg & "<br><li>请输入用户名(不能大于14小于4)</li>"
	else
  		if Instr(school,"=")>0 or Instr(school,"%")>0 or Instr(school,chr(32))>0 or Instr(school,"?")>0 or Instr(school,"&")>0 or Instr(school,";")>0 or Instr(school,",")>0 or Instr(school,"'")>0 or Instr(school,",")>0 or Instr(school,chr(34))>0 or Instr(school,chr(9))>0 or Instr(school,"

⌨️ 快捷键说明

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