?? watch_cancel.asp
字號:
<%dim ThisKey
ThisKey = "h"
%>
<!--#include file="../conn.asp"-->
<!--#include file="../dbtools.asp"-->
<%
oabusyname=session("oabusyname")
oabusyusername=session("oabusyusername")
oabusyuserdept=session("oabusyuserdept")
oabusyuserlevel=session("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='../../default.asp';")
response.write("</script>")
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from userinf where username='" & oabusyusername&"'"
rs.open sql,oconn,1
allow_manage_docstoreroom=rs("allow_manage_docstoreroom")
if allow_manage_docstoreroom<>"yes" then
response.write("<font color=red size=""+1"">對不起,需要人員管理權(quán)限!</font>")
response.end
end if
%>
<HTML>
<HEAD>
<TITLE> </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="main.css">
</HEAD>
<%
ID=trim(request("ID"))
todo=trim(request("todo"))
if todo="delete" and id<>"" then
oConn.execute "delete from tblwatch where ID="& id
end if
%>
<BODY BGCOLOR="#FFFFFF">
<%
session("empid")=session("oabusyuserid")
LoginID=trim(session("EmpId"))
if LoginID="" then response.end
selectdate=trim(request("SelectDate"))
if selectdate="" then selectdate=date()
%>
<div align=center>
<table border=1 cellpadding=3 cellspacing=0 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999"><tr><td>
<INPUT TYPE="button" name="cmdreturn" value="返 回" class="font9boldwhite" onclick="javascript:window.location.href='watch_index.asp'">
</td></tr></table>
<%
Set Rs = Server.Createobject("Adodb.recordset")
sql="select * from tblwatch order by ID desc"
rs.open sql,oConn
if rs.recordcount<=0 then
response.write "<table border=1 cellpadding=3 cellspacing=1 width=90% bgcolor=#EEEEEE bordercolordark=#FFFFFF bordercolorlight=#999999 align=center>"
response.Write "<tr bgcolor=#EEEEEE><td colspan=4 align=center>還沒有記錄!</td></tr></table>"
else
while not rs.eof
%>
<div align="center">
<table border=1 cellpadding=3 cellspacing=1 width="90%" bgcolor=#EEEEEE bordercolordark="#FFFFFF" bordercolorlight="#999999">
<tr bgcolor=#CCCCCC><td colspan=4 align=center>
<%=trim(rs("WatchName"))%>
<%if cdate(trim(rs("StartTime")))<=now() and cdate(trim(rs("EndTime")))>=now() then%>
<font color=red><b><%="("&trim(rs("StartTime"))&"——"&trim(rs("EndTime"))&")"%></b></font>
<%else%>
<b><%="("&trim(rs("StartTime"))&"——"&trim(rs("EndTime"))&")"%></b>
<%end if%>
<a href="watch_cancel.asp?todo=delete&ID=<%=trim(rs("ID"))%>" onclick="return CheckDelete();">-->取消該安排</a>
</td></tr>
<tr>
<td nowrap width="15%">部門:</td>
<td>
<%if trim(rs("Department"))<>"" then%>
<%=GetTableValue("dept","dept","ID",trim(rs("Department")))%>
<%end if%>
</td>
<td nowrap width="15%">填寫安排:</td>
<td>
<%if trim(rs("CreateName"))<>"" then%>
<%=trim(rs("CreateName"))%>
<%end if%>
</td>
</tr>
<tr>
<td nowrap width=60>填寫時間:</td>
<td colspan=3>
<%if trim(rs("Times"))<>"" then%>
<%=trim(rs("Times"))%>
<%end if%>
</td>
</tr>
<tr>
<td nowrap>值班內(nèi)容:</td>
<td colspan=3><%=replace(replace(server.htmlencode(trim(rs("body"))&""),chr(13),"<br>")," "," ")%> </td>
</tr>
</table>
</div><BR>
<%
rs.movenext
wend
end if
rs.close
set rs=nothing
%>
</table>
<INPUT TYPE="hidden" name="OrderID" value="<%=LoginID%>">
<INPUT TYPE="hidden" name="watchID" value="<%=watchID%>">
</form>
</div>
</BODY>
</HTML>
<script language=javascript>
function CheckDelete()
{
return confirm("確實刪除嗎?");
}
</script>
<%
Function GetTableValue(TableName,Field,ValueField,Value)
if TableName<>"" and Value<>"" then
Set RsTmp = Server.Createobject("Adodb.recordset")
strSql = "Select "& Field &" from "& TableName &" where "& ValueField &"="& Value &""
Rstmp.open strSql,oConn,1,1
If not Rstmp.eof then
GetTableValue=trim(Rstmp(Field))
else
GetTableValue=""
end if
Rstmp.close
'set RsTmp = Nothing
else
GetTableValue=""
end if
End Function
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -