日期:2014-05-17 浏览次数:21092 次
</style></head>
<script language="javascript">
<!--
function CheckForm()
{
if(document.form1.select.value=="0")
{
alert("请输入查询时间!");
document.form1.select.focus();
return false;
}
}
-->
</script>
<body>
<%
if request("act")="xg" then
date_cx = request("select")
sql="select * from kq where time=#"&date_cx&"# and name='"&session("name")&"' order by time desc"
'response.write sql
else
sql="select top 1 * from kq where name='"&session("name")&"' order by time desc"
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "<script>alert('没有你的考勤表!');location.href='index.asp';</script>"
else
%>
<form id="form1" name="form1" method="post" action="grgzcx.asp?act=xg" onSubmit="return CheckForm();">
<label>
<select name="select" size="1">
<option value="0" >请选择查询时间</option>
<% dim char(20)
i=0
see=0
sql="select * from kq"
set time_rs=server.CreateObject("adodb.recordset")
time_rs.open sql,conn,1,1
do while Not time_rs.EOF
for j=0 to i
if char(j) = month(time_rs("time")) then
see=1
exit for
else
see = 0
end if
next
if see=0 then
char(i)=month(time_rs("time"))
%>
<option value="<%=time_rs("time")%>"><%=time_rs("time")%></option>
<%
'char(i)=time_rs("time")
i=i+1
end if
time_rs.movenext
loop
time_rs.close
set time_rs = nothing
%>
</select>
</label>
<input type="submit" name="Submit" value="查询" />
<input type="reset" name="Submit2" value="重置" />
</form>
<table width="1153" border="1" cellspacing="0" cellpadding="2" bordercolor="#CCCCCC" style="border-collapse:collapse">
<tr><td colspan="19">
<p align="left">font size="3"><b>主考勤表</b><font color="#FF0000</font></font></td></tr>
<tr>
<td width="50" align="center"><b><font size="2">岗位</font></b></td>
<td width="70" align="center"><b><font size="2">出勤日期 </font></b></td>
<td width="50" align="center"><b><font size="2">状态</font></b></td>
<td width="50" align="center"><b><font size="2">班制</font></b></td>
<td width="60" align="center"><b><font size="2">上班一</font></b></td>
<td width="60" align="right"><b><font size="2">下班一</font></b></td>