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

📄 tree.asp

📁 学籍管理功能,能实现调班注销学籍等,中小学通用
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/conn.asp" -->
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: set variables

If (CStr(Request("MM_update")) = "form1" And CStr(Request("MM_recordId")) <> "") Then

  MM_editConnection = MM_conn_STRING
  MM_editTable = "user_name"
  MM_editColumn = "ID"
  MM_recordId = "" + Request.Form("MM_recordId") + ""
  MM_editRedirectUrl = "tree.asp"
  MM_fieldsStr  = "在校情况|value"
  MM_columnsStr = "在校情况|none,none,NULL"

  ' create the MM_fields and MM_columns arrays
  MM_fields = Split(MM_fieldsStr, "|")
  MM_columns = Split(MM_columnsStr, "|")
  
  ' set the form values
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
  Next

  ' append the query string to the redirect URL
  If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
    If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
      MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
    Else
      MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
    End If
  End If

End If
%>
<%
' *** Update Record: construct a sql update statement and execute it

If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then

  ' create the sql update statement
  MM_editQuery = "update " & MM_editTable & " set "
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
      MM_formVal = MM_emptyVal
    Else
      If (MM_altVal <> "") Then
        MM_formVal = MM_altVal
      ElseIf (MM_delim = "'") Then  ' escape quotes
        MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
      Else
        MM_formVal = MM_delim + MM_formVal + MM_delim
      End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
      MM_editQuery = MM_editQuery & ","
    End If
    MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
  Next
  MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId

  If (Not MM_abortEdit) Then
    ' execute the update
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "2"
If (Request("MM_EmptyValue") <> "") Then 
  Recordset1__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_conn_STRING
Recordset1.Source = "SELECT * FROM user_name WHERE 在校情况 = " + Replace(Recordset1__MMColParam, "'", "''") + " ORDER BY pianhao ASC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim jdcysh__MMColParam
jdcysh__MMColParam = "3"
If (Request("MM_EmptyValue") <> "") Then 
  jdcysh__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim jdcysh
Dim jdcysh_numRows

Set jdcysh = Server.CreateObject("ADODB.Recordset")
jdcysh.ActiveConnection = MM_conn_STRING
jdcysh.Source = "SELECT * FROM user_name WHERE 在校情况 = " + Replace(jdcysh__MMColParam, "'", "''") + " ORDER BY pianhao ASC"
jdcysh.CursorType = 0
jdcysh.CursorLocation = 2
jdcysh.LockType = 1
jdcysh.Open()

jdcysh_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = -1
Repeat2__index = 0
jdcysh_numRows = jdcysh_numRows + Repeat2__numRows
%>
<%
Dim MM_paramName 
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>培英学校义务教育学籍管理系统</title>
<style type="text/css">
<!--
A { text-decoration: none} 
.STYLE1 {color: #FF0000}
.STYLE3 {
	color: #FF0033;
	font-size: 14px;
	font-weight: bold;
}
body {
	background-image: url(greystrip.gif);
}
.STYLE4 {font-size: 12px}
.STYLE5 {font-size: 10pt}
-->
</style>
</head>

<body>
<p style="margin-top: 0; margin-bottom: 0"><span class="STYLE3"></span>管理员:<span class="STYLE3"><%= Session("MM_username") %></span></p>
<table border="1" width="205" cellspacing="1" style="border-collapse: collapse" id="table2" height="98" bgcolor="#CCFFFF" bordercolor="#808080">
	<tr>
		<td width="34" height="30" align="center">
<span class="STYLE4"><a href="diaoban1.asp" target="mainFrame">调班管理</a></span></td>
		<td width="34" height="30" align="center"><span class="STYLE4"><a href="glymd.asp" target="mainFrame">管理员管理</a></span></td>
		<td width="34" height="30" align="center"><span class="STYLE4"> <a href="sfbz.asp" target="mainFrame">收费标准管理</a></span></td>
		<td width="36" height="30" align="center"><span class="STYLE4"> <a href="guestgl.asp" target="mainFrame">留言管理</a></span></td>
		<td width="39" height="30" align="center"><span class="STYLE4"> <a href="../zx/input.asp" target="mainFrame">增加转学生</a></span></td>
	</tr>
	<tr>
		<td width="34" align="center" height="31"><span class="STYLE4"> <font color="#008000"><a href="../tongji.asp" target="mainFrame">班级人数统计</a></font></span></td>
		<td width="34" align="center" height="31"> <a href="xiaofu.asp" target="mainFrame" class="STYLE4">录校服公分数</a></td>
		<td width="34" align="center" height="31"><span class="STYLE4"><a href="zhanghaoguanli.asp" target="mainFrame">缴费账号管理</a></span></td>
		<td width="36" align="center" height="31"><span class="STYLE4"> 录学生奶管理</span></td>
		<td width="39" align="center" height="31"><span class="STYLE4"> <a href="caozuojilu.asp" target="mainFrame">操作记录</a></span></td>
	</tr>
	<tr>
	  <td align="center" height="31">用户管理</td>
	  <td align="center" height="31">&nbsp;</td>
	  <td align="center" height="31">&nbsp;</td>
	  <td align="center" height="31">&nbsp;</td>
	  <td align="center" height="31">&nbsp;</td>
  </tr>
</table>
<span class="STYLE4">&nbsp; &nbsp; </span>&nbsp;
<p style="margin-top: 0; margin-bottom: 0"><b><span class="STYLE1"><span style="font-size: 11pt"><span class="STYLE5">班主任审核离校生(转出、未到</span>)</span></span></b></p>
<table width="204" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="47" bordercolorlight="#008080" bordercolordark="#008080" id="table1">
  <tr>
    <td style="border-style: solid; border-width: 1px" height="23" align="center" width="55" bgcolor="#FFCCFF">
	<font color="#008000" size="2">学校编号</font></td>
    <td width="52" height="23" align="center" style="border-style: solid; border-width: 1px" bgcolor="#FFCCFF">
	<font color="#008000" size="2">姓名</font></td>
	<td width="39" height="23" align="center" style="border-style: solid; border-width: 1px" bgcolor="#FFCCFF">
	<font size="2" color="#008000">操作</font></td>
  </tr>
  <% 
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) 
%>
    <tr>
     
        <td width="55" height="21" align="center" bgcolor="#FFCCFF" class="STYLE4" style="border-style: solid; border-width: 1px"><%=(Recordset1.Fields.Item("pianhao").Value)%></td>
        <td style="border-style: solid; border-width: 1px" align="center" bgcolor="#FFCCFF"><font size="2"></A><span class="STYLE4"><%=(Recordset1.Fields.Item("name").Value)%></span></font></td>
        <td style="border-style: solid; border-width: 1px" align="center" bgcolor="#FFCCFF"><font size="2">
          <label><A HREF="zhuxiaoxj.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "ID=" & Recordset1.Fields.Item("ID").Value %>" target="mainFrame" class="STYLE4">确定注销学籍</A></label>
                  </font></td>
      
    <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Recordset1.MoveNext()
Wend
%>
</table>
<p style="margin-top: 12px; margin-bottom: 0"><b>
<span style="font-size: 11pt" class="STYLE1">教导处审核通过离校生</span></b></p>
<table width="204" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" height="47" bordercolorlight="#008080" bordercolordark="#008080" id="table1">
  <tr>
    <td style="border-style: solid; border-width: 1px" height="23" align="center" width="35" bgcolor="#FFCCFF"><font color="#008000" size="2">学校编号</font></td>
    <td width="40" height="23" align="center" style="border-style: solid; border-width: 1px" bgcolor="#FFCCFF"><font color="#008000" size="2">姓名</font></td>
    <td width="125" height="23" align="center" style="border-style: solid; border-width: 1px" bgcolor="#FFCCFF"><font size="2" color="#008000">原因与操作</font></td>
  </tr>
  <% 
While ((Repeat2__numRows <> 0) AND (NOT jdcysh.EOF)) 
%>
    
      <form action="<%=MM_editAction%>" method="POST" name="form1">
	  <tr>
        <td width="35" height="21" align="center" bgcolor="#FFCCFF" class="STYLE4" style="border-style: solid; border-width: 1px"><%=(jdcysh.Fields.Item("pianhao").Value)%></td>
        <td style="border-style: solid; border-width: 1px" align="center" bgcolor="#FFCCFF"><font size="2"></A><span class="STYLE4"><%=(jdcysh.Fields.Item("name").Value)%></span></font></td>
        <td style="border-style: solid; border-width: 1px" align="center" bgcolor="#FFCCFF"><span class="STYLE4"><font size="2"><%=left((jdcysh.Fields.Item("注销原因").Value),4)%></font></span><font size="2"><font size="2">
          <input name="在校情况" type="hidden" id="在校情况" value="2" />
          <input name="Submit" type="submit" id="Submit" style="color: #008000; border: 1px solid #C0C0C0; padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px" value="重核" />
        </font></font></td>
        <input type="hidden" name="MM_update" value="form1">
        <input type="hidden" name="MM_recordId" value="<%= jdcysh.Fields.Item("ID").Value %>">
      
    </tr></form>
  <% 
  Repeat2__index=Repeat2__index+1
  Repeat2__numRows=Repeat2__numRows-1
  jdcysh.MoveNext()
Wend
%>
</table>
<p style="margin-top: 12px"> </p>
<p> </p>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
jdcysh.Close()
Set jdcysh = Nothing
%>

⌨️ 快捷键说明

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