<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<%if WS_S.MemberPriv("WS_SystemSetAttendanceSet")<>1 then response.Write "<script>alert('对不起,您的权限不够!');window.close();</script>":response.end
ColumnName="":Tablename="HX_AttendanceDuty":action=request("action")
ATID=request("ATID")
if not WS_S.HX_IsNUM(ATID) then  response.write "<script>alert('非法操作');window.close();</script>":response.end
Orderby=" where WS_ATID="&ATID
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if action="saveinfo" then
     DUTY_NAME=request("DUTY_NAME"):DUTY_TIME1=request("DUTY_TIME1"):DUTY_TYPE1=request("DUTY_TYPE1"):DUTY_TIME2=request("DUTY_TIME2"):DUTY_TYPE2=request("DUTY_TYPE2"):DUTY_TIME3=request("DUTY_TIME3"):DUTY_TYPE3=request("DUTY_TYPE3"):DUTY_TIME4=request("DUTY_TIME4"):DUTY_TYPE4=request("DUTY_TYPE4"):DUTY_TIME5=request("DUTY_TIME5"):DUTY_TYPE5=request("DUTY_TYPE5"):DUTY_TIME6=request("DUTY_TIME6"):DUTY_TYPE6=request("DUTY_TYPE6")
	 rs("WS_AttendanceName")=DUTY_NAME
	 if isdate(DUTY_TIME1) then rs("WS_AttendanceFirst")=DUTY_TIME1:rs("WS_AttendanceFirstType")=DUTY_TYPE1
	 if isdate(DUTY_TIME2) then rs("WS_AttendanceSecond")=DUTY_TIME2:rs("WS_AttendanceSecondType")=DUTY_TYPE2
	 if isdate(DUTY_TIME3) then rs("WS_AttendanceThird")=DUTY_TIME3:rs("WS_AttendanceThirdType")=DUTY_TYPE3
	 if isdate(DUTY_TIME4) then rs("WS_AttendanceFourth")=DUTY_TIME4:rs("WS_AttendanceFourthType")=DUTY_TYPE4
	 if isdate(DUTY_TIME5) then rs("WS_AttendanceFive")=DUTY_TIME5:rs("WS_AttendanceFiveType")=DUTY_TYPE5
	 if isdate(DUTY_TIME6) then rs("WS_AttendanceSix")=DUTY_TIME6:rs("WS_AttendanceSixType")=DUTY_TYPE6
    rs.update	 
   response.write "<script>alert('修改成功！');window.opener.location.reload();window.close();</script>"
   response.end
end if
response.Write "<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>修改排班类型</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Css.css'></head><script Language='JavaScript'>function CheckForm(){   if(document.form1.DUTY_NAME.value=='')   { alert('说明不能为空！');   document.form1.DUTY_NAME.focus();     return (false);   }   return (true);}</script><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 width='100%'  border='0' cellspacing='1' cellpadding='3'><tr><td height='24'><font color='FF0000'>说明：上下班登记时间范围在 0:00:00 至 23:59:59 之间，请按时间顺序指定</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' onsubmit='return CheckForm();'><tr bgcolor='#FFFBE8'><td width='136'> 排班类型说明：</td><td width='299'><input type='text' name='DUTY_NAME' size='25' maxlength='100' value='"&rs("WS_AttendanceName")&"'></td></tr><tr bgcolor='#FFFBE8'><td> 第1次登记：</td><td><input name='DUTY_TIME1' type='text' style='ime-mode:disabled' value='"&rs("WS_AttendanceFirst")&"' size='8' maxlength='8' readonly> <input name='button' type='button' title='选择时间' onClick=""document.form1.DUTY_TIME1.value=showModalDialog('selecttime.htm', '', 'dialogWidth:20em; dialogHeight:5em; status:0;help:0');"" value='选择'>&nbsp;<select name='DUTY_TYPE1' class='BigSelect'><option value='1'"
if rs("WS_AttendanceFirstType")=1 then response.write " selected"
response.write ">上班</option><option value='2'"
if rs("WS_AttendanceFirstType")=2 then response.write " selected"
response.write ">下班</option></select></td></tr><tr bgcolor='#FFFBE8'><td> 第2次登记：</td><td><input name='DUTY_TIME2' type='text' style='ime-mode:disabled' value='"&rs("WS_AttendanceSecond")&"' size='8' maxlength='8' readonly> <input name='button' type='button' title='选择时间' onClick=""document.form1.DUTY_TIME2.value=showModalDialog('selecttime.htm', '', 'dialogWidth:20em; dialogHeight:5em; status:0;help:0');"" value='选择'>&nbsp;<select name='DUTY_TYPE2' class='BigSelect'><option value='1'"
if rs("WS_AttendanceSecondType")=1 then response.write " selected"
response.write ">上班</option><option value='2'"
if rs("WS_AttendanceSecondType")=2 then response.write " selected"
response.write ">下班</option></select></td></tr><tr bgcolor='#FFFBE8'><td> 第3次登记：</td><td><input name='DUTY_TIME3' type='text' style='ime-mode:disabled;' value='"&rs("WS_AttendanceThird")&"' size='8' maxlength='8' readonly> <input name='button' type='button' title='选择时间' onClick=""document.form1.DUTY_TIME3.value=showModalDialog('selecttime.htm', '', 'dialogWidth:20em; dialogHeight:5em; status:0;help:0');"" value='选择'>&nbsp;<select name='DUTY_TYPE3' class='BigSelect'><option value='1'"
if rs("WS_AttendanceThirdType")=1 then response.write " selected"
response.write ">上班</option><option value='2'"
if rs("WS_AttendanceThirdType")=2 then response.write " selected"
response.write ">下班</option></select></td></tr><tr bgcolor='#FFFBE8'><td> 第4次登记：</td><td><input name='DUTY_TIME4' type='text' style='ime-mode:disabled' value='"&rs("WS_AttendanceFourth")&"' size='8' maxlength='8' readonly> <input name='button' type='button' title='选择时间' onClick=""document.form1.DUTY_TIME4.value=showModalDialog('selecttime.htm', '', 'dialogWidth:20em; dialogHeight:5em; status:0;help:0');"" value='选择'>&nbsp;<select name='DUTY_TYPE4' class='BigSelect'><option value='1'"
if rs("WS_AttendanceFourthType")=1 then response.write " selected"
response.write ">上班</option><option value='2'"
if rs("WS_AttendanceFourthType")=2 then response.write " selected"
response.write ">下班</option></select></td></tr><tr bgcolor='#FFFBE8'><td> 第5次登记：</td><td><input name='DUTY_TIME5' type='text' style='ime-mode:disabled' value='"&rs("WS_AttendanceFive")&"' size='8' maxlength='8' readonly> <input name='button' type='button' title='选择时间' onClick=""document.form1.DUTY_TIME5.value=showModalDialog('selecttime.htm', '', 'dialogWidth:20em; dialogHeight:5em; status:0;help:0');"" value='选择'>&nbsp;<select name='DUTY_TYPE5' class='BigSelect'><option value='1'"
if rs("WS_AttendanceFiveType")=1 then response.write " selected"
response.write ">上班</option><option value='2'"
if rs("WS_AttendanceFiveType")=2 then response.write " selected"
response.write ">下班</option></select></td></tr><tr bgcolor='#FFFBE8'><td> 第6次登记：</td><td><input name='DUTY_TIME6' type='text' style='ime-mode:disabled' value='"&rs("WS_AttendanceSix")&"' size='8' maxlength='8' readonly> <input name='button' type='button' title='选择时间' onClick=""document.form1.DUTY_TIME6.value=showModalDialog('selecttime.htm', '', 'dialogWidth:20em; dialogHeight:5em; status:0;help:0');"" value='选择'>&nbsp;<select name='DUTY_TYPE6' class='BigSelect'><option value='1'"
if rs("WS_AttendanceSixType")=1 then response.write " selected"
response.write ">上班</option><option value='2'"
if rs("WS_AttendanceSixType")=2 then response.write " selected"
response.write " >下班</option></select></td></tr><tr align='center' bgcolor='#FFFBE8' class='TableControl'><td colspan='2' nowrap><input type='submit' value=' 确 定 '>&nbsp;&nbsp;<input type='button' value=' 关 闭 ' onClick='window.close();'><input name='ATID' type='hidden' id='ATID' value='"&ATID&"'></td></tr></form></table></td></tr></table>"%>