⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 week.asp

📁 功能齐全的oa系统
💻 ASP
字号:
<% Option Explicit %>
<%
Sub Main
	Dim strToday, strMove
	strToday = Request.QueryString("Today")
	strMove = Request.QueryString("move")
	If strToday = "" Then
		strToday = Date()
		strToday = Year(strToday) & "/" & Month(strToday) & "/" & Day(strToday)
	End If
	Select Case LCase(strMove)
		Case "prev"
			strToday = DateAdd("ww", -1, strToday)
			strToday = Year(strToday) & "/" & Month(strToday) & "/" & Day(strToday)
		Case "next"
			strToday = DateAdd("ww", 1, strToday)
			strToday = Year(strToday) & "/" & Month(strToday) & "/" & Day(strToday)
	End Select

	dim intDayInWeek
	dim strWeekStart
	dim strWeekEnd
	dim strTemp

	if Weekday(strToday) = 1 then 'sunday
		intDayInWeek = 6
	else
		intDayInWeek = Weekday(strToday) - 2
	end if
	strWeekStart = DateAdd("d", -intDayinWeek, strToday)
	strWeekEnd = DateAdd("d", 6, strWeekStart)

	strTemp = Month(strWeekStart) & "月" & Day(strWeekStart) & "日"
	strTemp = strTemp & "<-->" & Month(strWeekEnd)& "月" & Day(strWeekEnd) & "日"

	strWeekStart = Year(strWeekStart) & "/" & Month(strWeekStart) & "/" & Day(strWeekStart)
	strWeekEnd = Year(strWeekEnd) & "/" & Month(strWeekEnd) & "/" & Day(strWeekEnd)
	%>
<html>
	<head>
	<script language="javascript">
	function prev() {
		document.location.href = "Week.asp?Today=<%= strToday %>&move=prev";
	}
	function next() {
		document.location.href = "Week.asp?Today=<%= strToday %>&move=next";
	}
	function ViewDay(strDay)
	{
		var strUrl;
		strUrl = "Day.asp?Today=" + strDay;
		//转到日计划
		window.navigate(strUrl, "", "help:no;status:no");
   		
	}
	</script>
<link REL="STYLESHEET" HREF="<%=Application("RootPath")%>Templet/Main.css" type="text/css">
</head>
<body topmargin="0" leftmargin="0" LANGUAGE="javascript" Scroll="no">
<table BORDER="0" CELLPADDING="0" CELLSPACING="0">
	<tr>
		<td id="tdForDay" class="ViewToolbar" Onclick="window.location.href='day.asp'">&nbsp;日&nbsp;视&nbsp;图&nbsp;</td>
		<td id="tdForWeek" class="SelectViewToolbar" Onclick="window.location.href='week.asp'">&nbsp;周&nbsp;视&nbsp;图&nbsp;</td>
		<td id="tdForMonth" class="ViewToolbar" Onclick="window.location.href='Month.asp'">&nbsp;月&nbsp;视&nbsp;图&nbsp;</td>
    <td class="SelectViewToolbar" width="100%"></td>
	</tr>
</table>
	<table BORDER="0" class="PreNextToolbar" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" height="30">
	<tr>
		<td width="100%" align = "left" nowrap>
			<img src="../images/arrow_left.gif" BORDER="0" ALT="上一周" 
				VSPACE="10" style="cursor:hand"
				id="btnPre" name="btnPre" onclick="prev()">
			<label style="font: 9pt 宋体"><%= Year(strToday) & "年" %></label>
			<label style="font: bold 11pt verdana"><%= strTemp %></label>
			<img src="../images/arrow_right.gif" BORDER="0" ALT="下一周"
				VSPACE="10" style="cursor:hand"
				id="btnNext" name="btnNext" onclick="next()">
		</td>
		<td width="100%">&nbsp;</td>
	</tr>
	</table>
	<table BORDER="1" CELLPADDING="3" BORDERCOLOR="white" class="WeekToolbar" CELLSPACING="0" WIDTH="100%" height ="100%">
	<tr style="font:bold 12px verdana">
		<td align="center" WIDTH=80 height=60 NOWRAP style="color:#3EA4E1"> </td>
	<% Dim i
	For i = 0 To 6 %>
		<td align="center" WIDTH=14% NOWRAP <%= CheckToday(i, strWeekStart) %>>
			<label style="cursor:hand" onclick="ViewDay('<%= GetDay(i, strWeekStart) %>')" title="点击转到日计划">
			<%= WeekdayName(i + 1, False, 2) %><br><%= DayOfWeek(i, strWeekStart) %>
			</label>
		</td>
	<% Next %>
	
		<td align="center" WIDTH=80 NOWRAP style="color:#3EA4E1"> </td>
		<td align="center" WIDTH=20 NOWRAP bgcolor="IVORY">&nbsp;</td>
	</tr>
	<tr>
		<td VALIGN="TOP" bgcolor="#F0F0F0" height="100%" colspan=10>
		<iframe ALIGN="middle" id="fraContent" name="fraContent" FRAMEBORDER="0" SCROLLING="YES"
				SRC="Getweek.asp?WeekStart=<%= strWeekStart %>&WeekEnd=<%= strWeekEnd %>" width="100%" height="85%"> </iframe>
		</td>	
	</tr>
	</table>



</BODY></HTML>
<%
End Sub
Function GetDay(intWeekDay, strStartDay)
	Dim strTemp
	strTemp = DateAdd("d", intWeekDay, strStartDay)
	GetDay = Year(strTemp) & "/" & Month(strTemp) & "/" & Day(strTemp)
End Function
Function CheckToday(intWeekDay, strStartDay)
	If DateDiff("d", Date(), DateAdd("d", intWeekDay, strStartDay)) = 0 Then
		CheckToday = "style='color:red'"
	Else
		CheckToday = ""
	End If
End Function
Function DayOfWeek(intWeekDay, strStartDay)
	Dim strTemp
	strTemp = DateAdd("d", intWeekDay, strStartDay)
	DayOfWeek = Day(strTemp) & "/" & Month(strTemp)
End Function
Call Main
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -