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

📄 report.asp

📁 一个基于ASP的学生管理系统
💻 ASP
字号:
<!--#include file="inc/conn.asp"-->

<head>
<title>统计报表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--media=print 这个属性可以在打印时有效-->
<style media=print>
.Noprint{display:none;}<!--用本样式在打印时隐藏非打印项目-->
.PageNext{page-break-after: always;}<!--控制分页-->
</style>

<style>
.style_td
{
    border-bottom: 1 solid #000000;
    border-left:  1 solid #000000;
    border-right: 1 solid #000000;
    border-top: 1 solid #000000;
	font-size: 9pt;
}
.style_tab
{
    border-color: #000000 #000000 #000000 #000000;
    border-style: solid;
    border-top-width: 1px;
    border-right-width: 1px;
    border-bottom-width: 2px;
    border-left-width: 1px;
	font-size: 9pt;
}
.NOPRINT {
 font-family: "宋体";
 font-size: 9pt;
}

</style>

</head>

<body >
<% 
ck_id=Trim(Request.Form("ck_id"))
ck_username=Trim(Request.Form("ck_username"))
ck_sex=Trim(Request.Form("ck_sex"))
ck_xueyuan=Trim(Request.Form("ck_xueyuan"))
ck_xi=Trim(Request.Form("ck_xi"))
ck_time=Trim(Request.Form("ck_time"))
ck_zhengzhi=Trim(Request.Form("ck_zhengzhi"))
ck_zhiwu=Trim(Request.Form("ck_zhiwu"))
ck_area=Trim(Request.Form("ck_area"))

ck_minzu=Trim(Request.Form("ck_minzu"))
ck_homeadd=Trim(Request.Form("ck_homeadd"))
ck_homephone=Trim(Request.Form("ck_homephone"))
ck_bedadd=Trim(Request.Form("ck_bedadd"))
ck_mobliephone=Trim(Request.Form("ck_mobliephone"))
tabname=Trim(Request.Form("ck_tabname"))

sex=Trim(Request.Form("sex"))
xueyuan=Trim(Request.Form("xueyuan"))
xi=Trim(Request.Form("xi"))
intime=Trim(Request.Form("intime"))
zhengzhi=Trim(Request.Form("zhengzhi"))
zhiwu=Trim(Request.Form("zhiwu"))
area=Trim(Request.Form("area"))
openDB
if ck_id="id" then
sql2="SELECT stu_idnum,"
end if
if ck_username="username" then
sql2=sql2&"stu_name,"
end if
if ck_sex="sex" then
sql2=sql2&"stu_sex,"
end if
if ck_xueyuan="xueyuan" then
sql2=sql2&"stu_xyname,"
end if
if ck_xi="xi" then
sql2=sql2&"stu_xname,"
end if
if ck_time="time" then
sql2=sql2&"stu_time,"
end if
if ck_zhengzhi="zhengzhi" then
sql2=sql2&"stu_zhengzhi,"
end if
if ck_zhiwu="zhiwu" then
sql2=sql2&"stu_zhiwu,"
end if
if ck_area="area" then
sql2=sql2&"stu_area,"
end if
if ck_minzu="minzu" then
sql2=sql2&"stu_minzu,"
end if
if ck_homeadd="homeadd" then
sql2=sql2&"stu_homeadd,"
end if
if ck_homephone="homephone" then
sql2=sql2&"stu_homephone,"
end if
if ck_bedadd="bedadd" then
sql2=sql2&"stu_bedadd,"
end if
if ck_mobliephone="mobliephone" then
sql2=sql2&"stu_mobliephone,"
end if
mun=len(sql2)-1
sql2=mid(sql2,1,mun)
sql2=sql2&" FROM stu WHERE "
  if xueyuan<>"0" then
  sql2=sql2&"stu_xyname='"&xueyuan&"'and"
 end if
   if xi<>"0" then
  sql2=sql2&" stu_xname='"&xi&"'and"
 end if
   if intime<>"" then
  sql2=sql2&" stu_time='"&intime&"'and"
 end if
   if zhengzhi<>"0" then
  sql2=sql2&" stu_zhengzhi='"&zhengzhi&"'and"
 end if
 if zhiwu<>"0" then
  sql2=sql2&"stu_zhiwu='"&zhiwu&"'and"
 end if
 if area<>"0" then
  sql2=sql2&"stu_area='"&area&"'and"
 end if
 mun=len(sql2)-3
 sql2=mid(sql2,1,mun)
 set myrs= server.CreateObject("adodb.recordset")
 myrs.open sql2,conn,1,1
 myrs.pagesize=35
 fieldcount=myrs.fields.count
 wth=590/fieldcount
 wth=cstr(wth)
 If not myrs.EOF Then         
 %>
<center class="Noprint" >
  <a href="count.asp">返回</a>
  <p>
  <OBJECT  id=WebBrowser  classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2  height=0  width=0>
  </OBJECT>
  <input  type=button  value=打印          onclick=document.all.WebBrowser.ExecWB(6,1)>
  <input  type=button  value=直接打印  onclick=document.all.WebBrowser.ExecWB(6,6)>
  <input  type=button  value=页面设置  onclick=document.all.WebBrowser.ExecWB(8,1)>
</p>
  <p>    <input  type=button  value=打印预览  onclick=document.all.WebBrowser.ExecWB(7,1)>
    <br/>
  </p>
  <hr align="center" width="90%" size="1" noshade>
</center>
<table width="590" border="0" align="center" cellpadding="0" cellspacing="0"  class="style_tb">
  <!--DWLayoutTable-->
<tr>
   <th width="111" height="18" valign="top"><%= session("xy_name") %></th>
   <th width="383" valign="top"><%= tabname %></th>
   
   <th width="96" valign="top">制表时间:<%= date() %></th>
</tr></table>
 <% for n=1 to myrs.pagecount %>     
<table width="590" border="0" align="center" cellpadding="0" cellspacing="0"  class="style_tab">
  <tr><% for i=0 to myrs.fields.count-1 
         fieldname=myrs(i).name
		 sql="SELECT name from field WHERE field_name='"&fieldname&"'"
		 set rs=conn.execute(sql)
 %>
   <td  width="<%= wth %>" height="30" align="center" valign="middle" class="style_td"><%= rs("name") %></td>
   <% next %>
  </tr>
  <% for page=1 to myrs.pagesize%>
  <tr>
  <% if myrs.eof then
         exit for
     end if	 
	 for i=0  to myrs.fields.count-1  
   %><td height="30" width="<%= wth %>" align="center"  valign="middle" class="style_td" ><%= myrs(i)%></td><% next %>
  </tr>
   <% 
   myrs.movenext
   next %>
</table>
<hr align="center" width="90%" size="1" noshade>
<% next 
end if
closeDB
%> 
</body>
</html>

⌨️ 快捷键说明

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