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

📄 admin_editconnect.asp

📁 在线学生成绩管理系统的功能包括:所在班级,所修科目,成绩记录,家长管理.......
💻 ASP
字号:
<!--#include file="conn.asp" -->
<!--#include file="login_menu.asp" -->
<!--#include file="error.asp" -->
<html>
<head>
<title><%=site_name%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="25175com_221.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (25175_sub2.psd) -->
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="images/index_02.gif"><table width="898" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
<!--#include file="topadmin_kcs.asp" -->
<table width="898" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="202" valign="top"><%call login()%></td>
    <td width="696" valign="top"><table width="695" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/index_15.gif" width="695" height="48" alt=""></td>
      </tr>
      <tr>
        <td><table width="695" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="32"><img src="images/index_17.gif" width="32" height="579" alt=""></td>
            <td valign="top" bgcolor="#FFFFFF"><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <tr>
                <td><table width="619" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                  <tr>
                    <td width="340">&nbsp;</td>
                    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="4%"><div align="right"><img src="images/index_19.gif" width="6" height="20" alt=""></div></td>
                        <td width="93%" bgcolor="#E4E7DB">&nbsp;&nbsp;<a href="index.asp">首页</a> &gt; <a href="admin_connect.asp">任课管理</a> &gt; 任课修改</td>
                        <td width="3%"><img src="images/index_21.gif" width="7" height="20" alt=""></td>
                      </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="80" valign="bottom"><table width="97%"  border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><img src="images/index_30.gif" width="6" height="70" alt=""></div></td>
                    <td width="600" background="images/index_31.gif">
<%
  dim rank
  if admin25175="" then
      errmsg="<li>你还没有登陆,请先登陆"
	  call errormsg()
  else
      set rs=conn.execute("select rank from manager where mname='"&admin25175&"'")
	  rank=rs("rank")
	  set rs=nothing
	  
	  if rank<=1 then
	      errmsg="<li>你没有操作权限"
	      call errormsg()
	  else
	      response.write"任课关系对教师而言非常重要,教师可以凭此对所授班级成绩进行管理,请务必输入完整"
	  end if
  end if
%>                    <td>
                    <td><div align="center"><img src="images/index_34.gif" height="70" alt=""></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td height="429" valign="top">
<%
  if rank>=2 then
      select case request("action")
	  case "edit"
	      call edit()
	  case "del"
	      call del()
	  case "save"
	      call save()
	  end select
	  
	  sub edit()
	      dim ts_tea_user,ts_cla_id,ts_sub_id,ts_ter_id
	      set rs=conn.execute("select ts_tea_user,ts_cla_id,ts_sub_id,ts_ter_id from tea_sub where tsid="&request("id")&"")
		  if rs.eof and rs.bof then
			  errmsg="<li>不存在该ID的任课关系"
			  call errormsg()
		  else
		      ts_tea_user=rs("ts_tea_user")
		      ts_cla_id=rs("ts_cla_id")
			  ts_sub_id=rs("ts_sub_id")
		      ts_ter_id=rs("ts_ter_id")
%>
<form name="form1" method="post" action="?action=save&id=<%=request("id")%>">
  <table width="100%" align="center" cellpadding="2" cellspacing="0" <%=table_com%>>
    <tr>
      <td><div align="center">任课教师</div></td>
      <td><select name="ts_tea_user" id="ts_tea_user">
<%
  set rs=conn.execute("select tuser,tname from teacher")
  do while not rs.eof
      if rs("tuser")=ts_tea_user then
          response.write"<option value='"&rs("tuser")&"' selected>"&rs("tname")&"√</option>"
	  else
	      response.write"<option value='"&rs("tuser")&"'>"&rs("tname")&"</option>"
	  end if
      rs.movenext
  loop
  set rs=nothing
%>
      </select>      </td>
      <td><div align="center">班级</div></td>
      <td><select name="ts_cla_id" id="ts_cla_id">
<%
  set rs=conn.execute("select class.cid,class.cname,department.dname from class,department where class.dep_id=department.did order by department.did desc")
  do while not rs.eof
      if rs("cid")=ts_cla_id then
          response.write"<option value='"&rs("cid")&"' selected>"&rs("dname")&rs("cname")&"√</option>"
	  else
	      response.write"<option value='"&rs("cid")&"'>"&rs("dname")&rs("cname")&"</option>"
	  end if
      rs.movenext
  loop
  set rs=nothing
%>
        </select>        </td>
      </tr>
    <tr>
      <td><div align="center">课  程</div></td>
      <td><select name="ts_sub_id" id="ts_sub_id">
<%
  set rs=conn.execute("select sid,sname from subject")
  do while not rs.eof
      if rs("sid")=ts_sub_id then
          response.write"<option value='"&rs("sid")&"' selected>"&rs("sname")&"√</option>"
	  else
	      response.write"<option value='"&rs("sid")&"'>"&rs("sname")&"</option>"
	  end if
      rs.movenext
  loop
  set rs=nothing
%>	  
      </select>      </td>
      <td><div align="center">学期</div></td>
      <td><select name="ts_ter_id" id="ts_ter_id">
<%
  set rs=conn.execute("select tid,tname from term")
  do while not rs.eof
      if rs("tid")=ts_ter_id then
          response.write"<option value='"&rs("tid")&"' selected>"&rs("tname")&"√</option>"
	  else
	      response.write"<option value='"&rs("tid")&"'>"&rs("tname")&"</option>"
	  end if
      rs.movenext
  loop
  set rs=nothing
%>
      </select></td>
    </tr>
    
    <tr>
      <td height="100" colspan="4"><div align="center">
        <p>(带<font color="#FF0000">√</font>为当前任课关系选择项)</p>
        <p>
          <input type="submit" name="Submit3" value="编辑">
          <input type="reset" name="Submit5" value="重置">
          <input type="button" name="Submit4" value="返回" onClick="location.href='admin_connect.asp'">
        </p>
      </div></td>
      </tr>
  </table>
</form>
<%	  
          end if
	  end sub
	  
	  sub save()
	      dim ts_tea_user,ts_cla_id,ts_sub_id,ts_ter_id
          ts_tea_user=request.form("ts_tea_user"&i&"")
	      ts_cla_id=request.form("ts_cla_id"&i&"")
	      ts_sub_id=request.form("ts_sub_id"&i&"")
	      ts_ter_id=request.form("ts_ter_id"&i&"")
		  if ts_tea_user="" then
		      founderr="true"
			  errmsg="<li>请选择任课教师"
		  end if
		  if ts_sub_id="" then
		      founderr="true"
			  errmsg=errmsg&"<li>请选择任课课程"
		  end if
		  if ts_ter_id="" then
		      founderr="true"
			  errmsg=errmsg&"<li>请选择任课学期"
		  end if
		  if ts_cla_id="" then
		      founderr="true"
			  errmsg=errmsg&"<li>请选择任课班级"
		  end if
		  
		  if founderr="true" then
		      call errormsg()
		  else
		      conn.execute("update tea_sub set ts_tea_user='"&ts_tea_user&"',ts_cla_id="&ts_cla_id&",ts_sub_id="&ts_sub_id&",ts_ter_id="&ts_ter_id&" where tsid="&request("id")&"")
              backurl="?action=edit&id="&request("id")&""
              rigmsg="<li>编辑任课关系资料成功<li><a href='admin_connect.asp'>返回任课管理</a>"
              call rightmsg()
		  end if
	  end sub
	  
	  sub del()
	      conn.execute("delete from tea_sub where tsid="&request("id")&"")
		  backurl="admin_connect.asp"
          rigmsg="<li>删除一条任课关系记录成功<li><a href='admin_connect.asp'>返回任课管理</a>"
          call rightmsg()
	  end sub
  end if
%></td>
                  </tr>
                  <tr>
                    <td height="25"><div align="center"></div></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td><img src="images/index_78.gif" alt="" width="620" height="24"></td>
              </tr>
            </table></td>
            <td width="43"><img src="images/index_22.gif" width="43" height="579" alt=""></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table></td>
      </tr>
      <tr>
        <td><!--#include file="bottom.asp" -->
</td>
      </tr>
    </table></td>
  </tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>

⌨️ 快捷键说明

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