📄 showweek.asp
字号:
<%Response.Buffer=1%>
<!--#include file="../config.ini"-->
<html>
<head><title>一周日程显示</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<%
DateObj=Request.QueryString("date")
if DateObj = "" then
session("CurrentTime") =date
DateObj=session("CurrentTime")
end if
dim FromDate,ToDate,w
w=datepart("w",DateObj)
FromDate=formatdatetime(DateAdd("d",-(w-1),DateObj),vbLongDate)
ToDate=formatdatetime(DateAdd("d",7-w,DateObj),vbLongDate)
%>
<BODY BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#000000" ALINK="#99CC00" MARGINWIDTH="0" MARGINHEIGHT="0" LEFTMARGIN="0" TOPMARGIN="0">
<%
dim content1(7)
dim content2(7)
dim flag
flag="(#)"
dim array
dim array1
dim l
Set objRS = Server.CreateObject("ADODB.Connection")
objRS.Open Connstring
set rsApp=Server.CreateObject("ADODB.recordset")
session("WhichPage")="2"
yearobj=Request.QueryString("year")
monthobj=Request.QueryString("month")
dayobj=Request.QueryString("day")
if DateObj="" then
NowTime=FORMATDATETIME(FromDate,vbShortDate)
NowDayName=weekday(FromDate,vbSunday)
Daytime=FromDate
else
NowTime=FORMATDATETIME(FromDate,vbLongDate)
'NowTime = yearobj&"-"&monthobj&"-"&dayobj
'NowTime = formatdatetime(NowTime,vbLongDate)
'Response.Write NowTime
'Response.End
Nowtimes=Year(FromDate)&"-"&Month(FromDate)&"-"&Day(FromDate)
Nowtimee=DATEADD("w","6",FromDate)
NowDayName=weekday(FromDate,vbSunday)
'Daytime=yearobj&"-"&monthobj&"-"&dayobj
Daytime=FromDate
end if
session("CurrentTime")=Daytime
Nextweekday=DATEADD("w","7",FromDate)
Lastweekday=DATEADD("w","-7",FromDate)
'Nextweek="20"&Nextweekday ''Vongsiaoli gai de,yin wei ge zhong XiTong de riqi geshi changduan bu yi.
'if InStr(Nextweekday,"-") <= 3 then 'duan ri qi ge shi
' Nextweek = "20"&Nextweekday
'else 'chang ri qi ge shi
Nextweek = Nextweekday
'end if
Thisweek=YEAR(FromDate)&"-"&MONTH(FromDate)&"-"&DAY(FromDate)
Thisweek1=right(Thisweek,len(Thisweek)-2)
dim rstUser
set rstUser=Server.CreateObject("ADODB.recordset")
'Response.Write "select * from usertable where id='"&Session("userid")&"'"
'Response.End
rstUser.open "select * from usertable where id='"&Session("userid")&"'",objRS,2,3,1
sql = "SELECT * FROM v_schedule WHERE (AssignedTo ='"
sql = sql & rstUser("loginid")
sql = sql & "' or creator='"&session("loginid")&"')"
sql = sql &"and ScheduleDate >='"
sql = sql & Thisweek
sql = sql & "' and ScheduleDate <='"
sql = sql & Nextweek
sql = sql & "'"
'response.write sql
'response.end
rsApp.open sql,objRS,2,3,1
rstUser.close
dim visit(14)
if rsapp.bof=false then
rsapp.movefirst
while not rsapp.eof
if len(rsapp("ScheduleTime"))=7 then
strScheduleTime="0"&rsapp("ScheduleTime")
else
strScheduleTime=rsapp("ScheduleTime")
end if
if rsapp("account")<>"" then
if rsapp("ScheduleDate")=dateadd("d",0,FromDate) and strScheduleTime<"12:00:00" then visit(0)=visit(0)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",1,FromDate) and strScheduleTime<"12:00:00" then visit(1)=visit(1)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left= 150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",2,FromDate) and strScheduleTime<"12:00:00" then visit(2)=visit(2)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",3,FromDate) and strScheduleTime<"12:00:00" then visit(3)=visit(3)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",4,FromDate) and strScheduleTime<"12:00:00" then visit(4)=visit(4)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",5,FromDate) and strScheduleTime<"12:00:00" then visit(5)=visit(5)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",6,FromDate) and strScheduleTime<"12:00:00" then visit(6)=visit(6)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",0,FromDate) and strScheduleTime>"12:00:00" then visit(7)=visit(7)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",1,FromDate) and strScheduleTime>"12:00:00" then visit(8)=visit(8)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",2,FromDate) and strScheduleTime>"12:00:00" then visit(9)=visit(9)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",3,FromDate) and strScheduleTime>"12:00:00" then visit(10)=visit(10)&"<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",4,FromDate) and strScheduleTime>"12:00:00" then visit(11)=visit(11)&"<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",5,FromDate) and strScheduleTime>"12:00:00" then visit(12)=visit(12)&"<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",6,FromDate) and strScheduleTime>"12:00:00" then visit(13)=visit(13)&"<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("account")&"</a><br>"
else
if rsapp("ScheduleDate")=dateadd("d",0,FromDate) and strScheduleTime<"12:00:00" then visit(0)=visit(0)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",1,FromDate) and strScheduleTime<"12:00:00" then visit(1)=visit(1)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",2,FromDate) and strScheduleTime<"12:00:00" then visit(2)=visit(2)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",3,FromDate) and strScheduleTime<"12:00:00" then visit(3)=visit(3)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",4,FromDate) and strScheduleTime<"12:00:00" then visit(4)=visit(4)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",5,FromDate) and strScheduleTime<"12:00:00" then visit(5)=visit(5)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",6,FromDate) and strScheduleTime<"12:00:00" then visit(6)=visit(6)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
if rsapp("ScheduleDate")=dateadd("d",0,FromDate) and strScheduleTime>"12:00:00" then visit(7)=visit(7)& "<a href=""#"" language=javascript onclick=""window.open ('scheduleview.asp?id="&rsapp("id")&"','','scrollbars=yes,left=150,top=100,height=300,width=500,menubar=no,location=no,toolbar=no,resizable=yes','')"">"&rsApp("Schedule")&"</a><br>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -