📄 yb.asp
字号:
<!--#include file="conn.asp" -->
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFffff;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY bgcolor="#FF0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div align="center">
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td> <div align="right">
<% If session("admin")<>"yes" Then
response.write("系统超时,您需要<font color=red><b>重新登陆</font></b>。 ")
response.end
Else %>
您现在处于管理状态。
<%end if%>
<strong><a href="javascript:self.location.reload();"><font color="#FF0000">刷新</font></a></strong>
</div></td>
</tr>
<tr>
<td valign="top"> <strong>年报表:</strong> (核算日期:每年第一天到最后一天)</td>
</tr>
<tr>
<td valign="top"><div align="right"><a href="hesuan.asp"><font color="#FF0000">
</font></a>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="18%"><font color="#000000">当前年份:<strong> <font color="#FF0000">
<%if request("year")="" then
response.Write(""&year(date())&"")
yea=year(date())
else
response.Write(""&request("year")&"")
yea=request("year")
end if%>
</font></strong></font></td>
<td width="64%"><font color="#000000">选择年份:
<% for i=1999 to year(date())
%><a href=?year=<%=i%>><%=i%></a> <%next
i=i+1%>
</font></td>
<td width="18%"><div align="right"><a href="hesuan.asp"><font color="#FF0000">返回工资核算系统</font></a></div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td valign="top"> <%set rs=server.createobject("adodb.recordset")
sql="select * from men order by mid asc"
rs.open sql,conn,3,1
if rs.eof or rs.bof then
response.Write("没有发现员工记录。")
else
%><table width="100%" border="0" cellpadding="1" cellspacing="1" class="front">
<tr>
<td bgcolor="#F2EADF" ><div align="left" class="gb4">现有记录:<font color="#FF0000"><%=rs.recordcount %></font>共<font color="#FF0000">
<a href="yb.asp?year=<%=yea%>&page=<%=page%>" target="_blank"><font color="#FF0000">打印预览</font></a></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td><b>工号:</b></td>
<td><b>姓名:</b></td>
<td>1<strong>月</strong></td>
<td>2<strong>月</strong></td>
<td>3<strong>月</strong></td>
<td>4<strong>月</strong></td>
<td>5<strong>月</strong></td>
<td>6<strong>月</strong></td>
<td>7<strong>月</strong></td>
<td>8<strong>月</strong></td>
<td>9<strong>月</strong></td>
<td>10<strong>月</strong></td>
<td>11<strong>月</strong></td>
<td>12<strong>月</strong></td>
<td><b><%= yea%>年工资</b></td>
</tr>
<%do while not rs.eof %>
<tr bgcolor="#FFFFFF">
<td><b><%=rs("mid")%>:</b></td>
<td><a href=per.asp?mid=<%=rs("mid")%>&year=<%=yea%>><font color="#FF0000"><%=rs("name")%></font></a></td>
<td> <%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="1" then
'计算1月的工资和
t1=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=1&mid="&rs("mid")&">"&t1&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%></td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="2" then
'计算1月的工资和
t2=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=2&mid="&rs("mid")&">"&t2&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="3" then
'计算1月的工资和
t3=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=3&mid="&rs("mid")&">"&t3&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="4" then
'计算1月的工资和
t4=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=4&mid="&rs("mid")&">"&t4&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="5" then
'计算1月的工资和
t5=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=5&mid="&rs("mid")&">"&t5&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="6" then
'计算1月的工资和
t6=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=6&mid="&rs("mid")&">"&t6&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="7" then
'计算1月的工资和
t7=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=7&mid="&rs("mid")&">"&t7&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="8" then
'计算1月的工资和
t8=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=8&mid="&rs("mid")&">"&t8&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="9" then
'计算1月的工资和
t9=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=9&mid="&rs("mid")&">"&t9&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="10" then
'计算1月的工资和
t10=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=10&mid="&rs("mid")&">"&t10&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="11" then
'计算1月的工资和
t11=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=11&mid="&rs("mid")&">"&t11&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%set rs2=server.createobject("adodb.recordset")
sql="select * from monthlu where 工号 like '"&rs("mid")&"' and 年份 like '"&yea&"'"
rs2.open sql,conn,3,1
if rs2.eof or rs2.bof then
'response.Write("没有")
else
do while not rs2.eof
if rs2("月份")="12" then
'计算1月的工资和
t12=rs2("奖金")+rs2("基本工资")+rs2("工龄工资")+rs2("记件工资")*rs2("合格系数")
response.Write("<a href=mb.asp?month=12&mid="&rs("mid")&">"&t12&"</a>")
else
end if
if not rs2.eof or not rs2.bof then rs2.movenext
loop
end if
rs2.close%>
</td>
<td>
<%all=t1+t2+t3+t4+t5+t6+t7+t8+t9+t10+t11+t12%>
<%=all%>
<%
all=0
t1=0
t2=0
t3=0
t4=0
t5=0
t6=0
t7=0
t8=0
t9=0
t10=0
t11=0
t12=0
%>
</td>
</tr>
<%
if not rs.eof or not rs.bof then rs.movenext
count=count+1
loop
end if
rs.close
%>
</table></td>
</tr>
</table>
</div>
</BODY>
</HTML> <%
conn.close%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -