?? db.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">
<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="2" cellpadding="2">
<tr>
<td colspan="2"><font color="#000000">當前日:<strong> <font color="#FF0000">
<%if request("month")="" then
mon=month(date())
else
mon=request("month")
end if
if request("day")="" then
response.Write(""&day(date())&"")
da=day(date())
else
response.Write(""&request("day")&"")
da=request("day")
end if
y=year(date())
y1=CStr(y)&"-"
mon1=CStr(mon)&"-"
da1=CStr(da)
riqi=y1+mon1+da1
response.Write("<br>當前計算:"&riqi&"")
%>
</font></strong></font><font color="#000000"> </font></td>
<td width="18%"><div align="right"><a href="hesuan.asp"><font color="#FF0000">返回工資核算系統</font></a></div></td>
</tr>
<tr>
<td width="17%"><font color="#000000">選擇:</font></td>
<td colspan="2"><font color="#000000">
<% for a=1 to 31
%>
<a href=?day=<%=a%>&month=<%=mon%>><%=a%></a>
<%next
a=a+1%>
</font></td>
</tr>
<tr>
<td colspan="3"><hr size="1" noshade>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td width="17%"><font color="#000000">當前月:<strong> <font color="#FF0000">
<%if request("month")="" then
response.Write(""&month(date())&"")
mon=month(date())
else
response.Write(""&request("month")&"")
mon=request("month")
end if%>
</font></strong></font></td>
<td><font color="#000000">選擇月份:
<% for i=1 to 12
%>
<a href=?month=<%=i%>&day=<%=da%>><%=i%></a>
<%next
i=i+1%>
</font></td>
<td width="9%"><div align="right"><a href="hesuan.asp"></a></div></td>
</tr>
</table></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td valign="top"> <%set rs=server.createobject("adodb.recordset")
if request("mid")="" then
sql="select * from men order by mid asc"
else
sql="select * from men where mid like "&request("mid")&" "
end if
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.Write("沒有發現員工記錄。")
else
pgsize=50
page=request.querystring("page")
rs.pagesize=pgsize
pgnm=rs.pagecount
if page=""or clng(page)<1 then page=1
if clng(page)>pgnm then page=pgnm
if pgnm>0 then rs.absolutepage=page
count=0
%><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"> <%= pgnm %></font> 頁,當前頁:<font color="#0033FF"><%= page %> </font><a href=?page=1>第一頁</a> <a href=?page=<%=pgnm%>>最后一頁</a> <a href=?page=<%=page+1%>>下一頁</a> <a href=?page=<%=page-1%>>上一頁</a> <a href="db.asp?day=<%=da%>&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" class="front">
<tr>
<td><b>工號:</b></td>
<td><b>姓名:</b></td>
<td><strong>做工</strong></td>
<td><b>工資</b></td>
</tr>
<%
do while not rs.eof and count<rs.pagesize%>
<tr bgcolor="#FFFFFF">
<td valign="top"><b><%=rs("mid")%>:</b></td>
<td valign="top"><a href=per.asp?mid=<%=rs("mid")%>&day=<%=da%>><font color="#FF0000"><%=rs("name")%></font></a></td><td valign="top">
<%set rs2=server.createobject("adodb.recordset")
sql="select * from daylu where 工號 like '"&rs("mid")&"' and 日期 like '"&riqi&"'"
rs2.open sql,conn,1,1
money2=0
if rs2.eof or rs2.bof then
response.Write("")
else
do while not rs2.eof
money2=money2+(rs2("數量")*rs2("工資"))
response.Write(""&rs2("工序號")&" "&rs2("工序")&" 卡號:<a href=kamore.asp?kid="&rs2("卡號")&"><font color=#FF0000>"&rs2("卡號")&"</font></a> 工資:"&rs2("工資")&" 完成:"&rs2("數量")&" 日期:"&rs2("日期")&" "&rs2("時間")&"<br>")
rs2.movenext
loop
end if
rs2.close
%>
</td>
<td valign="top"><%response.Write(""&money2&"")
%> </td>
</tr>
<%
rs.movenext
count=count+1
loop
end if
%>
</table></td>
</tr>
</table>
</div> <%
rs.close
conn.close
%>
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -