<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%
ColumnName="":Tablename="HX_SchEduleMain":Tablename1="HX_SchEduleAdd":action=request("action")
if action="del" then 
  WS_SMID=request("WS_SMID") 
  if WS_SMID="" or isnull(WS_SMID) or (WS_SMID<>"" and not isnumeric(WS_SMID)) then  HX_GoBack "非法操作",""  
   conn.execute("delete * from "&Tablename1&" where WS_SMID="&WS_SMID)
   conn.execute("delete * from "&Tablename&" where WS_SMID="&WS_SMID)
   response.redirect "SchEduleEverymonth.asp?WS_SMID="&WS_SMID
   response.end
end if
if request("yy")="" then yy=cint(year(now())) else  yy=cint(request("yy"))
if request("mm")="" then  mm=cint(month(now())) else  mm=cint(request("mm"))
if request("dd")="" then  dd=cint(day(now())) else dd=cint(request("dd"))
today=dateserial(yy,mm,dd)
Orderby=" where WS_SchEduleMainman="&loginuid&" and (year(WS_SchEduleMainFirstTime)<"&yy&" or (year(WS_SchEduleMainFirstTime)="&yy&" and month(WS_SchEduleMainFirstTime)<="&mm&"))  and (year(WS_SchEduleMainLastTime)>"&yy&" or (year(WS_SchEduleMainLastTime)="&yy&" and month(WS_SchEduleMainLastTime)>="&mm&")) order by WS_SchEduleMainFirstTime desc"
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>按月查看</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'><script src='../HXinclude/HX_Function.js'></script></head><body topmargin='20' leftmargin='0' bottommargin='0'><table width='700'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8 background='../hximages/titlelinebg.gif'><table width='580'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>按月查看</font>"&msg&"</td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor=FFFBE8><tr><td height='20' colspan='3' align='center'><a href='SchEduleEverymonth.asp?yy="&yy&"&mm="&mm-1&"&dd=1'><font color='#431E07'>上个月</font></a> "&year(today)&"年"&month(today)&"月[<font color='#FF3300'>日程安排</font>]  <a href='SchEduleEverymonth.asp?yy="&yy&"&mm="&mm+1&"&dd=1'><font color='#431E07'>下个月</font></a></td></tr><tr bgcolor='#BF9B73' class='td4'><td height='20'><div align='center'><font color='#FFFBE8'>开始时间</font></div></td><td width='17%' height='20'><div align='center'><font color='#FFFBE8'>结束时间</font></div></td><td width='67%' height='20'><div align='center'><font color='#FFFBE8'>日程主题</font></div></td></tr>"
if rs.recordcount<=0 then
response.Write "<tr><td colspan=3 bgcolor=FFFBE8 height=25 align=center>暂无记录！</td></tr>"
else
 rs.PageSize =15 '每页记录条数
	iCount=rs.RecordCount '记录总数
	iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	ii=0
	do while not rs.EOF
	response.write "<tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td height='23'>"&formatdatetime(rs("WS_SchEduleMainFirstTime"),2)&"</td><td width='17%' height='23'>"&formatdatetime(rs("WS_SchEduleMainLastTime"),2)&"</td><td width='67%' height='23'><div align='left'><font title='内容预览："&left(rs("WS_SchEduleMainMemo"),100)&"' >&nbsp;<a href='SchEduleModify.asp?WS_SMID="&rs("WS_SMID")&"'><font color='#431E07'>"&left(rs("WS_SchEduleMainTitle"),30)&"</font></a></font>"
	Orderby=" where WS_SMID="&rs("WS_SMID")
    set prs=WS_S.HX_SetRSD(ColumnName,Tablename1,Orderby)
    if prs.recordcount>0 then response.Write "<img src='../HXimages/add.gif' width='9' height='9' alt='有追加内容'>" 
	  response.Write "<font color=red>("&rs("WS_SchEduleMainSituation")&")</font><font color='#000000'>所属："
	  Call WS_S.HX_OutUserInfo(rs("WS_SchEduleMainman")):response.Write OutName&"</font><a href='SchEduleEverymonth.asp?action=del&WS_SMID="&rs("WS_SMID")&"'>删 除</a></div></td></tr>"
	  ii=ii+1
	  if ii>=rs.PageSize then Exit Do
	rs.movenext
    loop
   call WS_S.PageControl(iCount,maxpage,page,"border=0 align=right","<p align=right>",3)
end if
call WS_S.HX_RSClose(prs):call WS_S.HX_RSClose(rs)
response.write "</table></td></tr></table>"%>
