📄 main.asp
字号:
<!--#include file="../config.ini"-->
<!--#include file="../commfunction.inc" -->
<%
'strscheduledate=getscheduledate(Request.QueryString("month"))
'Response.Write strscheduledate
%>
<html>
<head>
<title>工作日程</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript">
function editit(id,date){
page="scheduleview.asp?id="+id+"&date="+date
window.open (page,'查看编辑题目','resizable=yes, scrollbars=yes, top=150,left=150,width=450,height=300')
}
function CheckAll(form){
for (var i=0;i<form.elements.length;i++){
var e = form.elements[i];
if (e.name != 'chkall')
e.checked = form.chkall.checked;
}
}
function addit(myform){
myform.action="scheduleadd.asp";
myform.submit();
}
function delit(myform){
var enable=0;
// var length = document.myform.elements.length;
var length = myform.elements.length;
for (var x=0; x<length; x++) {
// if (document.myform.elements[x].name.indexOf("id") != -1) {
// if (document.myform.elements[x].checked==true)
if (myform.elements[x].name.indexOf("id") != -1) {
if (myform.elements[x].checked==true)
enable=1;
}
}
if (enable==0){
alert("请选择要删除的日程!");
}
else{
if (confirm("确信要所选删除日程?")){
myform.action="scheduledel.asp";
myform.submit();
}
}
}
</script>
<script language=javascript>
window.top.frames (1).document.location='../left.asp?type=sfa';
</script>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
</head>
<body leftmargin="10" rightmargin="10" topmargin="10">
<form name="form2" method="post" action="">
<table width="100%" border="0">
<tr>
<td width="73%" align="right" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr bgcolor="#C6C3C6">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
<td bgcolor="#FFFFFF">
<table cellspacing=0 cellpadding=0 width="100%" border=0>
<tbody>
<tr bgcolor="#4A699C">
<td height="18" align=center valign="middle"><font color=#FFFFFF>今天 + 过期未完成日程</font></td>
</tr>
</tbody>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="5"></td>
</tr>
</table>
<table width="100%" height="20" border="0" cellpadding="1" cellspacing="0" bgcolor=#999999>
<tr class=list2 bgcolor="#FFFFFF">
<td align="right" bgcolor=#C6C3C6>
<table width="100%" height="162" border="0" cellpadding="1" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td align="right">
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
<tr>
<td align="center">
<table width="100%" cellspacing="0" border="0">
<tr>
<td align="center">
<table border="1" cellpadding="0" cellspacing="1" style="border-collapse: collapse" bordercolor="#C6C3C6" width="100%" id="AutoNumber3" height="20">
<tr bgcolor="#efefef">
<td width="5%" height="15"> <input type="hidden" name="date1" value="<%=date1%>">
<input type="checkbox" name="chkall" value="on" onClick="CheckAll(this.form)" style="font-size: 9pt; color: #000000">
</td>
<td width="6%" height="15" nowrap> <div align="center">操作</div></td>
<td width="16%" nowrap>
<div align="center">派遣者</div></td>
<td width="16%" height="15" nowrap>
<div align="center">待做者</div></td>
<td width="16%" height="15" nowrap>
<div align="center">时间</div></td>
<td height="15" nowrap> <div align="center">主题</div></td>
<td height="15" width="7%" nowrap> <div align="center">编辑</div></td>
</tr>
<%
eventEmpty = True
Set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open Connstring
Set RSEVENT = Server.CreateObject("ADODB.RecordSet")
if Request.QueryString("assignedto")="self" then
RSEVENT.Open "SELECT * FROM v_Schedule where AssignedTo='"&session("loginid")&"' ORDER BY ScheduleDate desc", Conn, 1, 3
elseif Request.QueryString("assignedto")="sub" then
RSEVENT.Open "SELECT * FROM v_Schedule where AssignedTo in(select userid from v_userreportto_all where reportto='"&session("loginid")&"') ORDER BY ScheduleDate desc", Conn, 1, 3
else
RSEVENT.Open "SELECT * FROM v_Schedule where AssignedTo='"&session("loginid")&"' or Creator='"&Session("loginid")&"' or AssignedTo in(select userid from v_userreportto_all where reportto='"&session("loginid")&"') ORDER BY ScheduleDate desc", Conn, 1, 3
end if
'Response.Write "SELECT * FROM v_Schedule where AssignedTo='"&session("loginid")&"' or Creator='"&Session("loginid")&"' ORDER BY ScheduleDate"
i=0
if Request.QueryString("date1")<>"" then
date1=Request.QueryString("date1")
else
date1=date()
end if
Do while NOT RSEVENT.EOF
rsdate = RSEVENT("ScheduleDate") + RSEVENT("ScheduleTime")
'Response.Write day(date1)&"<br>"
If (Day(rsdate) =day(date1) ) AND (Month(rsdate) =month(date1) ) AND (Year(rsdate) =year(date1)) and i<4 Then
eventEmpty = False
%>
<tr>
<td width="5%" height="20" bgcolor="#ffffff">
<input type="checkbox" name="id" value="<%=rsevent("id")%>" <%if rsevent("creator")<>Session("loginid") then Response.Write "disabled"%>>
</td>
<td width="10%" bgcolor="#ffffff" align=center>
<%if rsevent("Closed")=false then%>
<a href="#" language=javascript onclick="window.open ('CloseSchedule.asp?Id=<%=rsevent("id")%>','','scrollbars=no,left= 200,top=200,height=180,width=300,menubar=no,location=no,toolbar=no,resizable=no','')">未完成</a>
<%else%>
已完成
<%end if%>
</td>
<td bgcolor="#ffffff"> <div align="center"><%=rsevent("creatorname")%></div></td>
<td bgcolor="#ffffff"> <div align="center"><%=rsevent("username")%></div></td>
<td bgcolor="#ffffff"> <div align="center"><%=FormatDateTime(rsdate, vblongTime)%></div></td>
<td bgcolor="#ffffff" align="center"><a href="javascript:editit(<%=rsevent("id")%>,<%=date1%>)">
<%=RSEVENT("Schedule")%></a> </td>
<td bgcolor="#ffffff" align="center" width="7%">
<div align="center">
<%if rsevent("Closed")=false then%>
<a href="scheduleedit.asp?id=<%=rsevent("id")%>&date=<%=date1%>&Creator=<%=rsevent("Creator")%>"><img src="images/cl06.gif" border="0"></a>
<%end if%>
</div></td>
</tr>
<%
i=i+1
elseIf (((Month(rsdate) <month(date1) ) AND (Year(rsdate) <=year(date1))) or ((Day(rsdate) <day(date1) ) AND (Month(rsdate) =month(date1) ) AND (Year(rsdate) =year(date1)))) and i<4 Then
if rsevent("closed")=false then
%>
<tr>
<td width="5%" height="21" bgcolor="#ffffff">
<input type="checkbox" name="id" value="<%=rsevent("id")%>" <%if rsevent("creator")<>Session("loginid") then Response.Write "disabled"%>>
</td>
<td width="10%" bgcolor="#ffffff" align=center>
<a href="#" language=javascript onclick="window.open ('CloseSchedule.asp?Id=<%=rsevent("id")%>','','scrollbars=no,left= 200,top=200,height=180,width=300,menubar=no,location=no,toolbar=no,resizable=no','')"><font color=red>未完成</font></a>
</td>
<td bgcolor="#ffffff"> <div align="center"><font color=red><%=rsevent("creatorname")%></font></div></td>
<td bgcolor="#ffffff"> <div align="center"><font color=red><%=rsevent("username")%></font></div></td>
<td height="21" bgcolor="#ffffff"> <div align="center"><font color=red><%=rsdate%></font></div></td>
<td height="21" bgcolor="#ffffff" align="center"><a href="javascript:editit(<%=rsevent("id")%>,<%=date1%>)">
<font color=red><%=RSEVENT("Schedule")%></font></a>
</td>
<td height="21" bgcolor="#ffffff" align="center" width="7%">
<div align="center">
<%if rsevent("Closed")=false then%>
<a href="scheduleedit.asp?id=<%=rsevent("id")%>&date=<%=date1%>&Creator=<%=rsevent("Creator")%>"><img src="images/cl06.gif" border="0"></a>
<%end if%>
</div></td>
</tr>
<%
i=i+1
end if
End If
RSEVENT.movenext
Loop
if i=0 then
Response.Write "<tr bgcolor=#ffffff><td colspan=7><table width=100% border=1 bordercolor=white cellspacing=0 cellpadding=0>"
Response.Write "<tr bgcolor=#ffffff><td height=21> </td></tr><tr bgcolor=#ffffff><td height=21 align=center>无待做日程</td></tr><tr bgcolor=#ffffff><td height=21> </td></tr><tr bgcolor=#ffffff><td height=21> </td></tr>"
Response.Write "</table></td></tr>"
elseif i<4 then
Response.Write "<tr bgcolor=#ffffff><td colspan=7><table width=100% border=1 bordercolor=white cellspacing=0 cellpadding=0>"
for j=1 to 4-i
Response.Write "<tr bgcolor=#ffffff><td height=21> </td>"
next
Response.Write "</table></td></tr>"
end if
%>
</table>
<br>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class=list2 bgcolor="#FFFFFF">
<td background="../images/xuline.gif" height=3></td>
</tr>
<tr>
<td align="center">
<table align="center">
<tr align="center" valign="middle">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -