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

📄 events.asp

📁 此程序是一个个人主页创造程序,该程序无插件,无任何恶意程序.
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
'#############################################################
'#      中国在线--极酷论坛 ver.2001 3.0
'#
'#  版权所有: 中国在线 (ChinaXP.Net)
'#
'#  制作人  : 周周 (SeeYa!)
'#
'#
'#  主页地址: http://www.ChinaXP.net/    中国在线
'#	      http://www.ChinaXP.Net/bbs/    中国在线--极酷论坛
'#
'#############################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
	' Constants for the days of the week
	Const cSUN = 1, cMON = 2, cTUE = 3, cWED = 4, cTHU = 5, cFRI = 6, cSAT = 7
	
	dim intPrivateEvent
	
	if Request.Form("isPrivateEvent") = "1" then
		intPrivateEvent = 1
	else
		isPrivateEvent = 0
	end if

	' Get the name of this file
	dim sScript
	sScript = Request.ServerVariables("SCRIPT_NAME")
	
	'set the date to today
	dim datToday
	datToday = date()
	
	' Check for valid month input
	dim intThisMonth
	intThisMonth = Request.QueryString("month")
	if intThisMonth = "" then
		intThisMonth = month(datToday)
	else
		intThisMonth = cint(intThisMonth)
	end if
	If intThisMonth < 1 OR intThisMonth > 12 Then
		intThisMonth = Month(datToday)
	End If
	
	' Check for valid year input
	dim intThisYear
	intThisYear = Request.QueryString("year")
	If intThisYear = "" Then
		intThisYear = Year(datToday)
	else
		intThisYear = cint(intThisYear)
	End If

	dim sSQL


	dim sStart_Date, sEnd_Date, sEvent_title, sEvent_Details

	dim sMode, berror
	sMode = Request.QueryString("mode")

	select case sMode
		case "delete"
			if mlev >= 3 then
				sSQL = "DELETE * FROM FORUM_EVENTS WHERE Event_ID=" & Request.QueryString("Event_ID")
				my_Conn.Execute ssql
				strCMessage = "The selected event was deleted"
			end if
		case "edit"
			if mlev >= 3 then
				sMode = "edit"
				strCMessage = "Event Edit Successful"
			end if
		case "add"
			if mlev >= 1 then
				smode = "add"
			end if
	end select

	dim ddate
	dDate = Request.QueryString("Date")
	If not IsEmpty(ddate) and IsDate(ddate) and smode = "" Then
		sMode = "display"
	end if

	if Request.Form("EVENT") <> "" then
		Update_Event(Request.Form("EVENT"))
	end if	

	dim strMonthName, datFirstDay, intFirstWeekday, intLastDay, intPrevMonth, intNextMonth, intPrevYear, intNextYear
	dim LastMonthDate, NextMonthDate, intPrintDay, intLastMonth, dToday, dFirstDay, dLastDay, endrows, intLoopDay
	dim bevents, i, sTitle
%>
<style TYPE="text/css">
  TD.NON {font-family :Tahoma, 宋体, Arial; font-size :12px; color :#C0C0C0; font-weight :normal;}
  TD.TOP {font-family :Tahoma, 宋体, Arial; font-size :12px; color :#0000FF; font-weight :bold;}
  TD.Some {font-family :Tahoma, 宋体, Arial; font-size :12px; color :#000000; font-weight :normal;}
  TD.Today {font-family :Tahoma, 宋体, Arial; font-size :12px; background-color :khaki; font-weight :normal;}
  TD.Selected {font-family :Tahoma, 宋体, Arial; font-size :12px; background-color :silver; font-weight :normal;}
  TD.HL {font-family :Tahoma, 宋体, Arial; font-size :12px; color :#000000; font-weight :normal;}
  TD.NON2 {font-family: Tahoma, 宋体, Arial; font-size :12px; background-color :lightgrey; font-weight :normal}
A.NOEVENT:link
{
    COLOR: #000000;
    CURSOR: nw-resize;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.NOEVENT:visited
{
    COLOR: #000000;
    CURSOR: nw-resize;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.NOEVENT:hover
{
    BACKGROUND-COLOR: silver;
    COLOR: #000000;
    CURSOR: nw-resize;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.EVENT:link
{
    COLOR: green;
    CURSOR: nw-resize;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: bold;
    TEXT-DECORATION: none
}
A.EVENT:visited
{
    COLOR: green;
    CURSOR: nw-resize;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: bold;
    TEXT-DECORATION: none
}
A.EVENT:hover
{
    BACKGROUND-COLOR: khaki;
    COLOR: green;
    CURSOR: nw-resize;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: bold;
    TEXT-DECORATION: none
}
A.MONTH:link
{
    COLOR: black;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.MONTH:visited
{
    COLOR: black;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.MONTH:hover
{
    COLOR: black;
    FONT-FAMILY: Tahoma, 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.NORMAL:link
{
    COLOR: #000000;
    FONT-FAMILY: 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.NORMAL:visited
{
    COLOR: #000000;
    FONT-FAMILY: 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
A.NORMAL:hover
{
    COLOR: #000000;
    FONT-FAMILY: 宋体, Arial;
    FONT-WEIGHT: normal;
    TEXT-DECORATION: none
}
.createdby
{
    FONT-STYLE: italic;
    TEXT-ALIGN: right
}
.bluetext
{
    COLOR: #336699
}
.month
{
    FONT-WEIGHT: bold
}
.eventname
{
    FONT-WEIGHT: bold
}
</style>
<% '################################## %>
	<TD width="70%" align="left" valign="top">
<TABLE border="0" width="85%" align=center>
  <TR>
    <TD width="33%" align="left" nowrap><font face="<% Response.Write strDefaultFontFace %>" size="<% Response.Write strDefaultFontSize %>"><a href="default.asp"><img src="<% =strImageURL %>icon_folder_open.gif" alt="返回论坛首页" border="0">&nbsp;<% =strForumTitle %></a>
<BR><img src="<%=strImageURL %>icon_bar.gif" border="0"><img src="<% =strImageURL %>icon_folder_open_topic.gif" border="0">&nbsp;论坛大事记
</FONT></TD>
  </TR>
</TABLE>
</TD>
</TR>
</TABLE>
<BR>

<table width="<% Response.Write strTableWidth %>" bgcolor="<% =strTableBorderColor %>" border="0" cellpadding="0" cellspacing="1" ALIGN=CENTER>
	<tr>
		<td bgcolor="<% =strForumCellColor %>" align="center" valign="top" nowrap width="140">
			<table border="0" cellpadding="1" cellspacing="2" width="140" height="100%">
				<tr>
					<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">显示月份</font></b></td>
				</tr>
				<%emitmonths()%>
				<tr>
					<td align=center>
						<FORM ACTION="<% =sScript%>" METHOD=GET id=frmSelectMonth name=frmSelectMonth>
							<SELECT NAME=MONTH>
								<%for i = 1 to 12%>
								<OPTION VALUE=<%=i%> <%if i = intThisMonth then Response.Write(" selected")%>><%= monthname(i,true)%>
								<%next%>
							</SELECT>
							<SELECT NAME=YEAR>
								<%for i = -3 to 3%>
								<OPTION VALUE=<%= intThisYear + i%> <%if (intThisYear + i) = intThisYear then Response.Write(" selected")%>><%= intThisYear + i%>
								<%next%>
							</SELECT>
							<INPUT TYPE="submit" NAME="Go" value="显示" BORDER="0" WIDTH="35" HEIGHT="20">
						</FORM>
					</td>
				</tr>
				<%if mlev >= 1 then%>
				<tr>
					<td align=center>
						<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a HREF="events.asp?mode=add&date=<%if Request.QueryString("Date")= "" then Response.Write(date()) else Response.Write(Request.QueryString("Date"))%>">新增事项</A></font>
					</td>
				</tr>
				<%end if%>
				<%if smode <> "" then%>
				<tr>
					<td align=center>
						<div align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href=events.asp>回到月历首页</a></font></div>
					</td>
				</tr>
				<%end if%>
				<tr>
					<td>
					&nbsp;
					</td>
				</tr>
				<tr>
					<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
					当前事项:
					</font></b></td>
				</tr>
				<tr>
					<td>
					<% call emitupcomingevents %>
					<br>
					<br>
					</td>
				</tr>
				<tr>
					<td align="center" bgcolor="<% =strHeadCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
					过去事项:
					</font></b></td>
				</tr>
				<tr>
					<td>
					<% call emitpastEvents %>
					<br>
					<br>
					</td>
				</tr>
			</table>
		</td>
		<td bgcolor="<% =strForumCellColor %>" valign="top" width=100%>
			<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
				<tr>
					<td valign=top>
						<%if smode = "" then
							emitmonths2
						else%>
									
						<table bgcolor="<% =strForumCellColor %>" border="0" cellpadding="2" cellspacing="0" width="100%">
							<tr>
								<td align="center" bgcolor="<% =strHeadCellColor %>" nowrap><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">
								<% call emitEvents()%>
								</font></b></td>
							</tr>
							<tr>
								<td>
								<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href=events.asp>回到月历首页</a></font>
								</td>
							</tr>
						</table>
						<%end if%>		
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<!--#INCLUDE FILE="inc_footer.asp" -->
<%
	'------------------------------------------------------------
	' This function finds the last date of the given month
	'------------------------------------------------------------
	Function GetLastDay(intMonthNum, intYearNum)
		Dim dNextStart
		If CInt(intMonthNum) = 12 Then
			dNextStart = CDate( "1/1/" & intYearNum)
		Else
			dNextStart = CDate(intMonthNum + 1 & "/1/" & intYearNum)
		End If
		GetLastDay = Day(dNextStart - 1)
	End Function
	
	'-------------------------------------------------------------------------
	' This routine prints the individual table divisions for days of the month
	'-------------------------------------------------------------------------
	Sub Write_TD(sValue, sClass)
		Response.Write "		<TD ALIGN='RIGHT' WIDTH=20 HEIGHT=15 VALIGN='BOTTOM' CLASS='" & sClass & "'> " & sValue & "</TD>" & vbCrLf
	End Sub

	Sub Write_TD3(sValue, sClass)
		Response.Write "		<TD HEIGHT='80' WIDTH='14%' ALIGN='left' VALIGN='top' CLASS='" & sClass & "'> <font face=" & strDefaultFontFace & " size=" & strDefaultFontSize  & ">" & sValue & "</font></TD>" & vbCrLf
	End Sub

' This routines presents the form to the user. Depending on the mode, the
' form fields are filled with data or blank.
Sub Show_Form()
	Dim sButtonMsg
	If sMode = "edit" Then
		sButtonMsg = "更新事项"
	Else
		sButtonMsg = "新增事项"
	End If
	
	' Set the title of the page depending on if an error occurred during
	' form submission or not
	If bError = True Then
		sTitle = "送出资料有误"
	Else
		sTitle = "新增或修改事项"
	End If
%>
	

<table border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td bgcolor="<% =strPopUpBorderColor %>">

	<table border="0" cellspacing="1" cellpadding="4">
	<form NAME="eventfrm" ACTION="<% =sScript %>" METHOD="POST">

		<tr>
			<td bgColor="<% =strPopUpTableColor %>" VALIGN="TOP" ALIGN="right" WIDTH="25%"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">开始日期:</font></td>
			<td bgColor="<% =strPopUpTableColor %>" VALIGN="TOP" ALIGN="LEFT" WIDTH="75%" ><input TYPE="TEXT" SIZE="12" MAXLENGTH="12" NAME="START_DATE" VALUE="<%if Server.HTMLEncode(sStart_Date) <> "" then Response.write Server.HTMLEncode(sStart_Date) else Response.Write(Request.QueryString("date")) end if%>">
			<input type="Checkbox" name="isPrivateEvent" value="1" <% if intPrivateEvent = 1 then response.write "checked" %>>私人事项</td>
		</tr>

		<tr>

⌨️ 快捷键说明

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