<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"--><!--#INCLUDE FILE="../HXINCLUDE/SelectDate.asp"-->
<%if WS_S.MemberPriv("WS_SystemSetAttendanceSet")<>1 then response.Write "<script>alert('对不起,您的权限不够!');window.close();</script>":response.end
ColumnName="":Tablename="HX_AttendanceHoliday":action=request("action")
if action="saveinfo" then
BEGIN_DATE=request("BEGIN_DATE"):END_DATE=request("END_DATE")
 if isdate(BEGIN_DATE) and isdate(END_DATE) then
         Orderby=" where WS_AttendanceHolidayStartDate>=#"&BEGIN_DATE&"# and WS_AttendanceHolidayEndDate<=#"&END_DATE&"#"
         set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
         if rs.recordcount<=0 then
          rs.addnew:rs("WS_AttendanceHolidayStartDate")=BEGIN_DATE:rs("WS_AttendanceHolidayEndDate")=END_DATE:rs.update	
          response.write "<script>window.opener.location.reload();if(!confirm('是否继续添加？')) window.close();else location.href='attendanceholidayadd.asp';</script>"
          response.end
		else
		  HX_GoBack "此节假日已添加！",""  
        end if
 end if   
end if
response.write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>添加考勤节假日</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Css.css'><script src='../HXinclude/HX_Function.js'></script></head><body topmargin='10' leftmargin='0' bottommargin='0'><table width='450'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>添加考勤节假日</font></td></tr></table><table border='0' width='450' cellpadding='3' cellspacing='1' align='center' bgcolor='#613c25'><form action='?action=saveinfo'  method='post' name='form1'><tr bgcolor='#FFFBE8'><td width='78'>起始日期：</td><td width='357'><input type='text' name='BEGIN_DATE' size='12' maxlength='10' value='"&date&"' readonly> <input onclick=""popUpcalendar(this, form1.BEGIN_DATE, 'yyyy/mm/dd')"" type='button' value='选择' title='选择起始日期'></td><tr bgcolor='#FFFBE8'><td>结束日期：</td><td><input type='text' name='END_DATE' size='12' maxlength='10' value='"&date+1&"' readonly> <input onclick=""popUpcalendar(this, form1.END_DATE, 'yyyy/mm/dd')"" type='button' value='选择' title='选择结束日期'></td></tr><tr><td colspan='2' align='center' nowrap bgcolor='#FFFBE8'  class='TableControl'><input type='submit' value=' 添 加 ' class='BigButton' title='考勤节假日' name='button'> <input type='reset' name='Submit' value=' 重 置 '></td></tr></form></table></td></tr></table>"%>