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

📄 add_chengji.asp

📁 职业培训学校学生档案成绩费用管理系统V1.0免费版.rar
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("user")="" then
	response.write "您无此权限"
	response.end
end if

dim user_name,user_number
if request("key")=1 then 
	user_name=session("user_name")
	user_number=session("user_number")
end if

set rs=server.createobject("adodb.recordset")
sql="select * from ach"
rs.open sql,conn,1,1
NoncePage=0
NumRecord=0
NumPage=0
if Not(rs.bof and rs.eof) then'判别数据表中是否为空记录
	NumRecord=rs.recordcount
	rs.pagesize=10
	NumPage=rs.Pagecount
	if request("page")=empty then 
		NoncePage=1
	elseif Cint(request("page"))<1 then
		NoncePage=1
	else
		NoncePage=request("page")
		if Cint(request("page"))>Cint(NumPage) then 
			NoncePage=NumPage
		end if
	end if
end if
%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加学生成绩情况</title>
<link rel="stylesheet" href="style.css">
<script language=javascript>
function qurey(tar){
	document.frm.action=tar;
	document.frm.submit();
}
function aqurey(tar){
	document.frm1.action=tar;
	document.frm1.submit();
}
</script>
</head>
<body>      
<!--#include file="top.asp"-->
<%if request("key")=1 then%>
<div align="center">
<table  width="700">
<tr><td align="left"><a href="query.asp?id=3&user_number=<%=user_number%>">返回学生信息查询</a></td></tr>
</table>
</div>
<%end if%>
<form method="POST" action="add_chengji1.asp" name="frm">
<%if request("key")=1 then%>
<input type="hidden" name="key" value="1">
<%end if%>
<div align="center"> 
  <table border="1" width="700" bordercolorlight="#000000" cellspacing="0" cellpadding="4" bordercolordark="#FFFFFF">
    <tr>
	  <td width="100" align="center">学号</td>
      <td width="50" align="center">姓名</td>
      <td width="70" align="center">考试时间</td>
      <td width="200" align="center">考试科目</td>
      <td width="50" align="center">考试成绩</td>
      <td width="50" align="center">修改</td>
      <td width="50" align="center">删除</td>
    </tr>
  <%if not rs.eof then
	rs.move (Cint(NoncePage)-1)*10,1
	for i=1 to rs.pagesize
	%> 
    <tr>
	  <td width="100" align="center"><%=rs("user_number")%></td>
      <td width="50" align="center"><%=rs("user_name")%></td>
      <td width="70" align="center"><%=rs("test_data")%></td>
      <td width="200" align="center"><%=rs("subject")%></td>
      <td width="50" align="center"><%=rs("ach")%></td>
      <td width="50" align="center"><a href="mod_chengji.asp?id=<%=rs("id")%>">修改</a></td>
      <td width="50" align="center"><a href=javascript:if(confirm('确实要删除吗?'))location='del_chengji.asp?id=<%=rs("id")%>'>删除</a>
	  </td>
    </tr>
    <%	
	rs.movenext
	if rs.eof then 
		exit for
	end if
	next
	else
	%>
    <tr>
      <td colspan="7"><marquee>
        暂无情况添加
      </marquee></td>
    </tr>
  </table>
  
  <%
end if
rs.close
set rs=nothing
%>
<div align="center"> <table border="0">
<input type="hidden" name="page" value="<%=NoncePage%>">

<%
if NoncePage>1 then
	response.write "|<a href=add_chengji.asp?page=1>首 页</a>| |<a href=add_chengji.asp?page="&NoncePage-1&">上一页</a>|&nbsp"
else
	response.write "|首 页| |上一页|&nbsp"
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
	response.write "|<a href=add_chengji.asp?page="&NoncePage+1&">下一页</a>| |<a href=add_chengji.asp?page="&NumPage&">尾 页</a>|"
else
	response.write "|下一页| |尾 页|"
end if
%>
&nbsp;页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font> 
共<font color="#0033CC"><%=NumRecord%></font>条记录&nbsp; </table>
</div> 
</div>

<div align="center"> 
 
<table border="1" width="400" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
  <tr>
    <td colspan="2" align="center">添加学生成绩情况</td>
  </tr>
  <tr>
    <td>学号:</td>
    <td><input type="text" name="user_number" <%if request("key")=1 then%>value=<%=user_number%> <%end if%>></td>
  </tr>
  <tr>
    <td>姓名:</td>
    <td><input type="text" name="user_name" <%if request("key")=1 then%>value=<%=user_name%> <%end if%>>
      <input type="button" name="stQuery" value="查询" onclick=qurey("stuQuery3.asp")></td>
  </tr>
  <tr>
    <td>考试科目:</td>
    <td><select size="1" name="subject">
                <%
        set rs1=server.createobject("adodb.recordset")
        sql1="select * from subject"
        rs1.open sql1,conn,1,1
        %>
                <%do while not rs1.eof%>
                <option value="<%=rs1("subject")%>"><%=rs1("subject")%></option>
                <%rs1.movenext%>
                <%loop%>
                <%rs1.close
				set rs1=nothing
				%>
              </select>
	 </td>
  </tr>
  <tr>
    <td>考试时间:</td>
    <td>
	<%
	dim i,num,y,d,m
	y=cint(year(date))
	d=cint(day(date))
	m=cint(month(date))
	%>
      <select name="year">
        <%
	for i=0 to 50
	num=2000+i
	if num=y then
	%>
        <option value="<%=num%>" selected><%=num%></option>
        <%
	else
	%>
        <option value="<%=num%>"><%=num%></option>
        <%
	end if
	next
	%>
      </select>
<select name="month">
  <%
	for i=1 to 12
	num=i
	if num=m then
	%>
  <option value="<%=num%>" selected><%=num%></option>
  <%
	else
	%>
  <option value="<%=num%>"><%=num%></option>
  <%
	end if
	next
	%>
</select>
<select name="day">
  <%
	for i=1 to 31
	num=i
	if num=d then
	%>
  <option value="<%=num%>" selected><%=num%></option>
  <%
	else
	%>
  <option value="<%=num%>"><%=num%></option>
  <%
	end if
	next
	%>
</select>
日 </td>
    </tr>
  <tr>
    <td>考试成绩:</td>
    <td><input type="text" name="ach"></td>
	</tr>
  <tr>
    <td colspan="2"><div align="center"><input type="submit" name="b1" value="提交"></div></td>
  </tr>
</table>

</div>  
</form>
<div align="center">
        <form method="POST" action="" name="frm1">
          <table border="1" width="400" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
            <tr>
                <td width="33%"align="right">按姓名查询:</td>
				<td width="33%"><input type="text" name="user_name1" size="20"></td>
				<td width="34%"><input type="button" value="查询" name="s1" onclick=aqurey("cjQuery.asp?id=1")></td>
            </tr>
			<tr>
              <td width="33%" align="right">按学号查询:</td>
              <td width="33%"><input type="text" name="user_number1" size="20"></td>
              <td width="34%"><input type="button" value="查询" name="s2" onclick=aqurey("cjQuery.asp?id=2")></td>
            </tr>
           </table>
        </form>
</div>
<!--#include file="down.asp"-->
</body>
</html>

⌨️ 快捷键说明

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