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

📄 add.asp

📁 ASP原码
💻 ASP
字号:
<!--#include file="../../System/Const.asp"-->
<!--#include file="../../System/misc.asp"-->
<%
	user_schoolid = clng(request("user_schoolid"))

	set cn=server.CreateObject("ADODB.connection")
	cn.Open DSN_ACLASS

	set rs=server.CreateObject("ADODB.recordset")
%>

<HTML>
<BODY bgcolor="#CFC9CD" leftmargin="0" topmargin="10" >
<!--#include file="Header.asp"-->

<table width="770" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" align="center" height="70%">
  <tr> 
    <td bgcolor="#8C9A8C" width="3"></td>
    <td width="764" bgcolor="#EFEFEF" height="20" valign="bottom"> 你现在的位置:单收用户管理-添加用户</td>
    <td bgcolor="#8C9A8C" width="3"></td>
  </tr>
  <tr> 
    <td bgcolor="#8C9A8C" width="3"></td>
    <td width="764">&nbsp; </td>
    <td bgcolor="#8C9A8C" width="3"></td>
  </tr>
  <tr> 
    <td bgcolor="#8C9A8C" width="3"></td>
    <td width="764" valign="top"> 
      <form name="form1" method="post" action="add2.asp">
        <table width="75%" border="1" align="center" bgcolor="#E3E3E3">
          <tr bgcolor="EFEFEF"> 
            <td width="32%">所属公司</td>
            <td width="68%" bgcolor="EFEFEF"> 
              <select name="user_schoolid" onChange="OnClassSchoolIDChanged(this.options[this.selectedIndex].value)">
                <option <%=SELECTED(user_schoolid, 0)%> value=0 >-- 不属于任何公司 --</option>
                <% 
				rs.Open "select * from SCHOOL where ID in (select SID from TBL_ASADMIN_SCHOOL where UID="&session("userid")&") ",cn
			   do while not rs.eof %>
                <option <%=SELECTED(user_schoolid, rs("ID"))%> value=<%=rs("ID")%>> 
                <%=rs("NAME")%> </option>
                <% rs.movenext
			   loop
				rs.close
				%>
              </select>
            </td>
          </tr>
          <tr bgcolor="EFEFEF"> 
            <td width="32%">用户名</td>
            <td width="68%" bgcolor="EFEFEF"> 
              <input alt="用户名***" type=text name=user_username value="<%=request("user_username")%>" maxlength="20">
              *** (不超过20个字符) </td>
          </tr>
          <tr bgcolor="EFEFEF"> 
            <td width="32%">密码</td>
            <td width="68%" bgcolor="EFEFEF"> 
              <input type=text name=user_password value="<%=request("user_password")%>" maxlength="20">
              (不超过20个字符) </td>
          </tr>
          <tr bgcolor="EFEFEF"> 
            <td width="32%">用户硬件ID</td>
            <td width="68%"> 
              <input alt="用户硬件ID###" type=text name=user_uid value="<%=request("user_uid")%>" maxlength="10">
              *** </td>
          </tr>
          <tr bgcolor="EFEFEF"> 
            <td width="32%">赋予会议室的单收权限</td>
            <td width="68%"> 
              <%if user_schoolid = 0 then 
					rs.Open "select * from CLASS order by NAME", cn, adOpenStatic
				else
					rs.Open "select * from CLASS where SCHOOLID="&user_schoolid&" order by NAME", cn, adOpenStatic
				end if
				cur_class=0
				%>
              <table width="100%" border="0">
                <tr> 
                  <td valign="top"> 
                    <%do while not rs.eof and cur_class<rs.RecordCount/2%>
                    <input type="checkbox" name="class_id" value=<%=rs("id")%> unchecked>
                    <% =rs("name")%>
                    <br>
                    <% rs.movenext
					cur_class=cur_class+1
				   loop%>
                  </td>
                  <td valign="top"> 
                    <%do while not rs.eof and cur_class<=rs.RecordCount%>
                    <input type="checkbox" name="class_id" value=<%=rs("id")%> unchecked>
                    <% =rs("name")%>
                    <br>
                    <% rs.movenext
					cur_class=cur_class+1
				   loop%>
                  </td>
                </tr>
              </table>
              <% rs.Close %>
            </td>
          </tr>
          <tr bgcolor="EFEFEF"> 
            <td colspan="2"> 
              <div align="center"> 
                <input type="button" value="确定" onClick="jscript:OnSubmitGeneral(form1)" name="buttonsubmit">
                <input type="button" value="返回" onClick="jscript:OnReturn()" name="button">
              </div>
            </td>
          </tr>
        </table>
        </form>
    </td>
    <td bgcolor="#8C9A8C" width="3"></td>
  </tr>
  <tr> 
    <td bgcolor="#8C9A8C" width="3" height="21"></td>
    <td width="764" bgcolor="EFEFEF" height="21"> 
      <div align="center"><%=COMPANY%></div>
    </td>
    <td bgcolor="#8C9A8C" width="3" height="21"></td>
  </tr>
</table>

<table width="770" border="0" cellspacing="0" cellpadding="0" bgcolor="#8C9A8C" align="center">
  <tr> 
    <td height="4"></td>
  </tr>
</table>

<SCRIPT LANGUAGE=javascript>
	function OnClassSchoolIDChanged(value)
	{
		//alert(value);
		form1.action="add.asp";
	    form1.submit();
	}
</SCRIPT>

<!--#include file="../../System/miscJScript.asp"-->

</BODY>
</HTML>

⌨️ 快捷键说明

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