📄 reportlist.asp
字号:
<!--#include file="../../Conndb.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>工资报表管理</title>
<link href="../../style.css" rel="stylesheet">
<script language="javascript">
function newView(url) {
var oth="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,left=200,top=200";
oth = oth+",width=300,height=100";
var newView=window.open(url,"newView",oth);
newView.focus();
return false;
}
</script>
</head>
<body link="#000080" vlink="#080080">
<form id="form1" name="form1" method="POST">
<p align="center"><font color="#000080"><b><font style="font-size: 12pt">工 资 报 表 管 理</font></b></font></p>
<table align=center border="1" cellspacing="0" width="100%" bordercolorlight="#000080" bordercolordark="#FFFFFF">
<tr>
<td width="20%" align="center" bgcolor="#C1E0FF"><strong>报表年份</strong></td>
<td width="20%" align="center" bgcolor="#C1E0FF"><strong>报表月份</strong></td>
<td width="30%" align="center" bgcolor="#C1E0FF"><strong>工资报表</strong></td>
<td width="30%" align="center" bgcolor="#C1E0FF"><strong>操作</strong></td>
</tr>
<%
Dim n,RptMonth,iYear,iMonth,oldyear
Dim rs
n = 0
oldyear = 2000
Set rs = Server.CreateObject("ADODB.RecordSet")
'读取数据到记录集rs中
sql = "SELECT Distinct(iMonth) AS Mth FROM SalaryStatistics ORDER BY iMonth DESC"
rs.Open sql,conn,1,1
'在表格中显示报表信息
If rs.Eof Then
Response.Write "<tr><td colspan=4 align=center>目前还没有信息。</td></tr></table>"
Else
Do While Not rs.EOF
RptMonth = rs("Mth") ' 报表时间
iYear = Left(CStr(RptMonth),4) '读取报表年份
If Len(CStr(RptMonth))=6 Then ' 读取报表月份,如果大于9月则取后两位,否则取后一位
iMonth = CInt(Right(CStr(RptMonth),2))
Else
iMonth = Right(CStr(RptMonth),1)
End If
%>
<tr>
<td align="center">
<%If oldyear<>CInt(iYear) Then%>
<%=iYear%>年
<%Else%> <%End If%></td>
<td align="center"><%=iMonth%>月份 </td>
<td align="center"><a href="<%=RptMonth%>.xls" target="_blank">查看工资报表</a></td>
<td align="center">
<a href="ReportDelt.asp?rid=<%=RptMonth%>" onClick="if(confirm('确定要删除此工资报表吗?')){return newView(this.href);}return false;">删除</a></td>
</tr>
<%
oldyear = iYear
rs.MoveNext()
Loop
%>
</table>
<%End If%>
<p align="center">
<input type="button" value="新建工资报表" onclick="newView('SelMonth.asp')" name=add></p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -