📄 displayworkrec.asp
字号:
<%response.expires=0%>
<!--#include file="asp/sqlstr.asp"-->
<!--#include file="asp/opendb.asp"-->
<!--#include file="asp/bgsub.asp"-->
<!--#include file="asp/keepformat.asp"-->
<!--#include file="asp/checked.asp"-->
<!--#include file="asp/getpopedom.asp"-->
<%
oabusyname=request.cookies("oabusyname")
oabusyusername=request.cookies("oabusyusername")
oabusyuserdept=request.cookies("oabusyuserdept")
oabusyuserlevel=request.cookies("oabusyuserlevel")
if oabusyusername="" then
response.write("<script language=""javascript"">")
response.write("window.top.location.href='default.asp';")
response.write("</script>")
response.end
end if
cook_allow_see_all_workrep=getpopedom1("allow_see_all_workrep",oabusyusername)
cook_allow_see_dept_workrep=getpopedom1("allow_see_dept_workrep",oabusyusername)
'--------------------------
function havefinished(value)
if value="yes" then
havefinished="已完成"
else
havefinished="<font color=red>未完成</font>"
end if
end function
'---------------------------
function impdegree(value)
if value="yes" then
impdegree="<font color=red>重要</font>"
else
impdegree="一般"
end if
end function
'---------------------------
username=request("username")
superior=request("superior")
recdate=request("recdate")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css/css.css">
<title>查看工作任务</title>
<script src="Electron_Doc/openwin.js"></script>
<script language="javascript">
function SendFun()
{
location.href='SendMuchPlan.asp?username=<%=username%>&superior=<%=superior%>&recdate=<%=recdate%>';
}
</script>
</head>
<body bgcolor="#ffffff" topmargin="5" leftmargin="5">
<%
'打开数据库读出用户姓名
set conn=opendb("oabusy","conn","accessdsn")
set rs=server.createobject("adodb.recordset")
sql="select name from userinf where username=" & sqlstr(username)
rs.open sql,conn,1
if not rs.eof and not rs.bof then stafname=rs("name")
%>
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><b><%=stafname%>的工作任务(<%=recdate%>)</b></td>
<form action="addworkrep.asp" method=post name="form1">
<%
if superior="" then
%>
<td><input type="submit" name="addworkrep" value="增加"></td>
<%
elseif (username=oabusyusername) or ( username<>oabusyusername and (cook_allow_see_all_workrep="yes" or cook_allow_see_dept_workrep="yes")) then
%>
<td><input type="submit" name="addworkrep" value="增加"> <input type="button" value="计划群发" name="SendAll" onclick="SendFun()"></td>
<%
end if
%>
<input type="hidden" name="username" value="<%=username%>">
<input type="hidden" name="superior" value="<%=superior%>">
<input type="hidden" name="recdate" value="<%=recdate%>">
</form>
</tr>
</table>
</center>
<%
%>
<center>
<%
'打开数据库,读出日期为recdate,用户名为username的记录
set rs=server.createobject("adodb.recordset")
sql="select * from workrep where username=" & sqlstr(username) & " and recdate=" & "#" & recdate & "#"
rs.open sql,conn,1
while not rs.eof and not rs.bof
'读出任务委派者姓名
if rs("superior")<>"" then
set conn=opendb("oabusy","conn","accessdsn")
set rs1=server.createobject("adodb.recordset")
sql="select name from userinf where username=" & sqlstr(rs("superior"))
rs1.open sql,conn,1
superiorname=rs1("name")
else
superiorname="本人安排"
end if
%>
<table border="1" cellspacing="0" cellpadding="5" width="95%" bordercolorlight="#808080" bordercolordark="#D4D0C8">
<tr height="25">
<form method="post" name="a1" action="editworkrep.asp">
<td width=60 align=center>
<%
if (username=oabusyusername) or (superior=oabusyusername) then
%>
<input type="submit" value="编辑" name="submit">
<input type="hidden" name="username" value="<%=username%>">
<input type="hidden" name="superior" value="<%=superior%>">
<input type="hidden" name="recdate" value="<%=recdate%>">
<input type="hidden" name="id" value=<%=rs("id")%>>
<%
else
%>
不可编辑
<%
end if
%>
</td>
</form>
<td width=60 align="center">完成情况</td><td bgcolor="#ffffff" align="center"><%=havefinished(rs("finished"))%></td>
<td width=60 align="center">重要程度</td><td bgcolor="#ffffff" align="center"><%=impdegree(rs("imp"))%></td>
<td width=70 align="center">委派任务者</td><td width=60 bgcolor="#ffffff" align="center"><%=checked3(superiorname)%></td>
</tr>
<tr height="25">
<td align=center>简要标题</td><td colspan="6" bgcolor="#ffffff"><%=keepformat(rs("title"))%></td>
</tr>
<tr height="25">
<td align=center>详细说明</td><td colspan="6" bgcolor="#ffffff"><%=checked3(keepformat(rs("remark")))%></td>
</tr>
</table>
<%
rs.movenext
wend
%>
</center>
<%
%>
<div align="center">
<center>
<table align="center">
<tr>
<td height=19>
<table border="0" cellpadding="0" cellspacing="0" width="610" height="19">
<tr>
<td width="100%" height=20>
<p align="center"><font color="#808080">IE37 © <a href="http://www.ie37.com" target="_blank">IE37.com</a></font></td>
</tr>
</table>
</td>
</tr>
<%
%>
</table>
</center>
</div>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -