-
Notifications
You must be signed in to change notification settings - Fork 1
/
Search.asp
146 lines (145 loc) · 4.69 KB
/
Search.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!--#include file=images/right.asp -->
<!--#include file=images/conn.asp -->
<!DOCTYPE html PUBLIC "-//W3C//Dtd html 4.01 transitional//EN" "http://www.w3c.org/tr/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>员工工资信息管理系统</title>
<meta http-equiv=Content-type content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
<!--#include file=images/ini.sys -->
</head>
<body>
<table cellSpacing=1 cellPadding=5 width=460 align=center bgColor=#b9b0a9 border=0>
<tbody>
<tr>
<td vAlign=top bgColor=#ffffff>
<table cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr><td width=460 background=images/top.gif height=54 class="bt">工资查询</td></tr>
<tr>
<td bgColor=#FFFFFF height=150>
<table height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<tbody>
<tr>
<td valign="top">
<table cellSpacing=1 cellPadding=2 width="100%" align=center border=0>
<tbody>
<tr>
<td align=right height=30 width="25%">职员工号:</td>
<td><%=session("UserId")%></td>
<td align=right width="25%">职员姓名:</td>
<td><%=session("UserName")%></td>
</tr>
<tr align="center">
<td><a href="Search.asp">查询工资</a></td>
<td><a href="User.asp?action=view">用户信息</a></td>
<td><a href="User.asp?action=edit">修改密码</a></td>
<td><a href="Logout.asp">退出查询</a></td>
</tr>
<tr>
<form name="search" method="post" action="Search.asp">
<td height="30" colspan="4" align=center>
<select name="Syear">
<option value="">-请选择年份-</option>
<%for y=2013 to year(date())%>
<option value="<%=y%>"><%=y%></option>
<%next%>
</select>
<select name="Smonth">
<option value="">-请选择月份-</option>
<%for m=1 to 12%>
<option value="<%=m%>"><%=m%></option>
<%next%>
</select>
<input name="Query" type="submit" id="Query" value="查 询"> </td>
</form>
</tr>
<%
Syear=trim(Request("Syear"))
Smonth=trim(Request("Smonth"))
Sid=session("UserId")
sql="select * from Salary where 5=5"
if Syear<>"" then '按类别显示
sql=sql & " and Syear='" & Syear & "' "
end if
if Syear="" then
Syear=Year(now())
sql=sql & " and Syear='" & Syear & "' "
end if
if Smonth<>"" then '
sql=sql & " and Smonth='" & Smonth & "' "
end if
if Smonth="" then
Smonth=Month(now())
sql=sql & " and Smonth='" & Smonth & "' "
end if
sql=sql & " and Sid='" & Sid & "' "
sql=sql & " order by id desc"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
if not rs.eof Then
proCount=rs.recordcount
For i = 1 to proCount
if rs.EOF then
Exit For
end if
%>
<tr align="center">
<td height="30"><b>基本工资</b></td>
<td><b>绩效</b></td>
<td><b>津贴</b></td>
<td><b>补贴</b></td>
</tr>
<tr align="center">
<td height="30"><%=rs("Basic")%></td>
<td><%=rs("Perform")%></td>
<td><%=rs("JT")%></td>
<td><%=rs("BT")%></td>
</tr>
<tr align="center">
<td height="30"><b>公积金</b></td>
<td><b>养老保险</b></td>
<td><b>医疗保险</b></td>
<td><b>其它</b></td>
</tr>
<tr align="center">
<td height="30"><%=rs("GJJ")%></td>
<td><%=rs("LB")%></td>
<td><%=rs("YB")%></td>
<td><%=rs("QT")%></td>
</tr>
<tr>
<td align="center" height="30"><font color="#FF0000"><b><%=Syear%>年<%=Smonth%>月</b></font></td>
<td colspan="3"><b>工资合计:</b><%=rs("Stotal")%> 元</td>
</tr>
<%
rs.MoveNext
next
%>
<%
else
%>
<tr align="center" bgcolor="#FFFFFF">
<td colspan="8">对不起!目前还没有 <font color="#FF0000"><%=Syear%>年<%=Smonth%>月</font>工资信息!</td>
</tr>
<%
end if
rs.close
set rs=nothing
%>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</body>
</html>