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

📄 ach_email1.asp

📁 一个学生管理系统 ASP+ACCE
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
if session("admin")="" then
	response.write "<script>alert('您无此权限');document.location.href='index.asp';</script>"
	response.end
end if
%>
<%
dim user_testnumber,user_name,testno,subject(1000),ach(1000)
user_name=trim(request("user_name"))
user_testnumber=trim(request("user_testnumber"))
testno=trim(request("testno"))
%>
<%
if user_name="" then
    response.write "姓名输入不能为空"
    response.end
    else if user_testnumber="" then
      response.write "准考证号输入不能为空"
      response.end
      end if
end if
set rs=server.createobject("adodb.recordset")
sql="select * from ach where user_testnumber='"&user_testnumber&"' and testno='"&testno&"' and user_name='"&user_name&"'"
rs.open sql,conn,1,1
%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>用E-Mail发成绩单</title>
<link rel="stylesheet" href="style.css">
</head>

<body topmargin="0">
<!--#include file="top.asp"-->
<div align="center">
  <center>
<table width="738" height="35">
  <td background="images/top_1.jpg">&nbsp; <a href="ach_manager.asp">考试成绩列表</a> 
    | <a href="search_st.asp">添加考试成绩</a> | <a href="search_ach.asp">成绩高级查询</a> 
    | <a href="ach_top.asp">单科成绩排行榜</a> | <a href="total_top.asp">总分成绩排行榜</a> 
    | <a href="all.asp">考试成绩分析</a> | <a href="ach_email.asp">用E-Mail发成绩单</a></table>
  </center>
</div>

<div align="center">
  <table border="1" width="650" cellspacing="0" cellpadding="4" bordercolorlight="#000000" bordercolordark="#FFFFFF">
    <tr>
      <td width="388" colspan="8" align="center">
        <p align="left">然后点击下面的<font color="#FF0000">发送</font>按钮</p>
      </td>
    </tr>
     <tr>
      <td width="80" align="center">准考证号</td>
      <td width="60" align="center">姓名</td>
      <td width="65" align="center">班级</td>
      <td width="110" align="center">考次</td>
      <td width="110" align="center">科目</td>
      <td width="70" align="center">科目类型</td>
      <td width="70" align="center">任课教师</td>
      <td width="45" align="center">成绩</td>
    </tr>
  <%if not(rs.bof and rs.eof) then
    for i=1 to rs.recordcount%>
    <tr>
      <td width="80" align="center"><%=rs("user_testnumber")%></td>
      <td width="60" align="center"><%=rs("user_name")%></td>
      <td width="65" align="center"><%=rs("user_class")%></td>
      <td width="110" align="center"><%=rs("testno")%></td>
      <td width="110" align="center"><%=rs("subject")%></td>
      <td width="70" align="center"><%=rs("subject_type")%></td>
      <td width="70" align="center"><%=rs("teacher_name")%></td>
      <%if rs("ach")>=60 then%>
      <td width="45" align="center"><%=rs("ach")%></td>
      <%else%>
      <td width="45" align="center"><font color=red><%=rs("ach")%></font></td>
      <%end if%>
    </tr>
    <%
    subject(i)=rs("subject")
    ach(i)=rs("ach")
    rs.movenext
    if rs.eof then exit for
    next
    else%>
    <tr><td colspan=8><marquee>没有找到任何记录!!!</marquee></td></tr>
    <%end if%>
    
<%
set rs1=server.createobject("adodb.recordset")
sql="select * from st_info where user_name='"&user_name&"'"
rs1.open sql,conn,1,1

if not(rs1.bof and rs1.eof) then
%>
    
    <tr>
      <td colspan="8" align="right"><a href="mailto:<%=rs1("user_email")%>?subject=<%=rs1("user_name")%>准考证号为<%=rs1("user_testnumber")%>在<%=""&testno&""%> 的成绩单&body=<%for i=1 to rs.recordcount%>
      <%=""&subject(i)&""%>:<%=""&ach(i)&""%>;
      <%next%>">点击发送</a></td>
    </tr>
<%else%>
    <tr><td colspan="8" align="right">点击发送</a></td></tr>
<%end if%>
  </table>
</div>
<%
rs.close
set rs=nothing
rs1.close
set rs1=nothing
%>
<p></p>
<!--#include file="down.asp"-->
</body>

</html>

⌨️ 快捷键说明

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