Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Holiday Mod, Modded! (fixed up)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

azu
Starting Member

4 Posts

Posted - 04 March 2002 :  19:15:11  Show Profile  Visit azu's Homepage
This is my first mod that I have fiddled with, so, bare with me. This is a mod that another 'beginner' made. (S)he said that if anyone wanted to edit the code to make it better, they could!

I added this little feature. It gets the current year so all you have to do is have only two files to make this mod work for any year. (In the old one, you had to have two (2) files for each year.)

Tell me if you can find any errors with this code.

Anything that I have added is in red, [hl]hi-lighted[/hl], and italized.

CODE from [hl]us_process_2001.asp[/hl], now it is [hl]us_process.asp[/hl]:
 


<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<!--#INCLUDE FILE="inc_code.asp" -->
[hl]<%
datToday = date()

' Check for valid year input

intThisYear = Request.QueryString("year")
If intThisYear = "" Then
intThisYear = Year(datToday)
else
intThisYear = cint(intThisYear)
End If
[/hl]



'New Year's Day
if Request.Form("ny") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("1/1/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("1/1/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: New Year's Day"), "message") & "', '" & chkstring(Request.Form("message_ny"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding New Year's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Martin Luther King Day
if Request.Form("mlk") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("1/15/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("1/15/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Martin Luther King Day"), "message") & "', '" & chkstring(Request.Form("message_mlk"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Martin Luther King Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Groundhog Day
if Request.Form("gh") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("2/2/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("2/2/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Groundhog Day"), "message") & "', '" & chkstring(Request.Form("message_gh"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Groundhog Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Valentine's Day
if Request.Form("vd") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("2/14/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("2/14/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Valentine's Day"), "message") & "', '" & chkstring(Request.Form("message_vd"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Valentine's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'President's Day
if Request.Form("pres") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("2/19/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("2/19/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: President's Day"), "message") & "', '" & chkstring(Request.Form("message_pres"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding President's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'St. Patrick's Day
if Request.Form("stp") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("3/17/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("3/17/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: St. Patrick's Day"), "message") & "', '" & chkstring(Request.Form("message_stp"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding St. Patrick's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Palm Sunday
if Request.Form("palm") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("4/8/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("4/8/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Palm Sunday"), "message") & "', '" & chkstring(Request.Form("message_palm"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Palm Sunday<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Good Friday
if Request.Form("gf") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("4/13/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("4/13/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Good Friday"), "message") & "', '" & chkstring(Request.Form("message_gf"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Good Friday<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Easter
if Request.Form("ea") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("4/15/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("4/15/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Easter"), "message") & "', '" & chkstring(Request.Form("message_ea"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Easter<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Daylight Savings Time Begins
if Request.Form("daybegins") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("4/1/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("4/1/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Daylight Savings Time Begins"), "message") & "', '" & chkstring(Request.Form("message_daybegins"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Daylight Savings Time Begins<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Tax Day
if Request.Form("tax") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("4/15/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("4/15/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Tax Day"), "message") & "', '" & chkstring(Request.Form("message_tax"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Tax Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Mother's Day
if Request.Form("mom") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("5/13/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("5/13/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Mother's Day"), "message") & "', '" & chkstring(Request.Form("message_mom"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Mother's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Memorial Day
if Request.Form("md") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("5/28/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("5/28/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Memorial Day"), "message") & "', '" & chkstring(Request.Form("message_md"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Memorial Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Flag Day
if Request.Form("flag") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("6/14/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("6/14/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Flag Day"), "message") & "', '" & chkstring(Request.Form("message_flag"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Flag Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Father's Day
if Request.Form("dad") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("6/17/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("6/17/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Father's Day"), "message") & "', '" & chkstring(Request.Form("message_dad"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Father's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Independence Day
if Request.Form("ind") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("7/4/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("7/4/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Independence Day"), "message") & "', '" & chkstring(Request.Form("message_ind"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Independence Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Labor Day
if Request.Form("labor") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("9/3/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("9/3/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Labor Day"), "message") & "', '" & chkstring(Request.Form("message_labor"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Labor Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Grandparent's Day
if Request.Form("grand") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("9/9/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("9/9/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Grandparent's Day"), "message") & "', '" & chkstring(Request.Form("message_grand"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Grandparent's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Columbus Day
if Request.Form("col") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("10/8/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("10/8/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Columbus Day"), "message") & "', '" & chkstring(Request.Form("message_col"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Columbus Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Daylight Savings Time Ends
if Request.Form("dayends") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("10/28/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("10/28/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Daylight Savings Time Ends"), "message") & "', '" & chkstring(Request.Form("message_dayends"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Daylight Savings Time Ends<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Halloween
if Request.Form("hal") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("10/31/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("10/31/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Halloween"), "message") & "', '" & chkstring(Request.Form("message_hal"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Halloween<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Election Day
'if Request.Form("elect") = 1 then
' sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("11/5/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("11/5/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Election Day"), "message") & "', '" & chkstring(Request.Form("message_elect"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
' response.write("Adding Election Day<BR>")
' response.write("<BR>")
' my_Conn.Execute sSQL
'End if

'Veteran's Day
if Request.Form("veteran") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("11/11/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("11/11/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Veteran's Day"), "message") & "', '" & chkstring(Request.Form("message_veteran"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Veteran's Day<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Thanksgiving
if Request.Form("thanks") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("11/22/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("11/22/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Thanksgiving"), "message") & "', '" & chkstring(Request.Form("message_thanks"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Thanksgiving<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Christmas Eve
if Request.Form("ceve") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("12/24/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("12/24/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Christmas Eve"), "message") & "', '" & chkstring(Request.Form("message_ceve"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Christmas Eve<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'Christmas
if Request.Form("Christ") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("12/25/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("12/25/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: Christmas"), "message") & "', '" & chkstring(Request.Form("message_christ"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding Christmas<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if

'New Year's Eve
if Request.Form("nyeve") = 1 then
sSQL = "INSERT INTO " & strTablePrefix & "EVENTS (Start_Date, End_Date, Event_Title, Event_Details, Date_Added, Added_by, PRIVATE) Values ('" & DateToStr("12/31/[hl]""<% = intThisYear %>""[/hl]") & "', '" & DateToStr("12/31/[hl]""<% = intThisYear %>""[/hl]") & "',' " & chkstring(("Holiday: New Year's Eve"), "message") & "', '" & chkstring(Request.Form("message_nyeve"), "message") & "', '" & DateToStr(now()) & "', " & 1 & "," & 0 & ")"
response.write("Adding New Year's Eve<BR>")
response.write("<BR>")
my_Conn.Execute sSQL
End if
%>



[hr]
CODE from [hl]us_holiday_2001.asp[/hl], now it is [hl]us_holiday.asp[/hl]:



<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
[hl]<%
datToday = date()

' Check for valid year input

intThisYear = Request.QueryString("year")
If intThisYear = "" Then
intThisYear = Year(datToday)
else
intThisYear = cint(intThisYear)
End If

%>[hl]

<div align="center">
<form name="form1" method="post" action="[hl]us_process.asp[/hl]">
<table border="0" cellPadding="0" cellSpacing="0" align="center" width="600">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table border="0" cellpadding="4" cellspacing="1" width="100%">
<tr>
<td bgcolor="<% =strHeadCellColor %>" colspan="2"> <font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>"><b>US
Holidays ([hl]<% = intThisYear %>[/hl])</b></font></td>
</tr>
<tr>
<td bgcolor="<% =strCategoryCellColor %>">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" valign="top">Holiday</font></td>
<td bgcolor="<% =strCategoryCellColor %>">
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strCategoryFontColor %>" valign="top">Message</font>
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="ny" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">New Year's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_ny" size="50" value="Happy New Year's!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="mlk" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Martin
Luther King Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_mlk" size="50" value="Martin Luther King Day">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="gh" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Groundhog Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_gh" size="50" value="Happy Groundhog Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="vd" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Valentine's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_vd" size="50" value="Happy Valentine's Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="pres" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">President's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_pres" size="50" value="Happy President's Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="stp" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">St. Patrick's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_stp" size="50" value="Happy St. Patrick's Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="palm" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Palm Sunday</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_palm" size="50" value="Happy Palm Sunday!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="gf" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Good Friday</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_gf" size="50" value="Good Friday Celebration!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="ea" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Easter</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_ea" size="50" value="Happy Easter!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="tax" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Tax Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_tax" size="50" value="Happy Tax Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="daybegins" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Daylight Savings Time Begins</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_daybegins" size="50" value="Daylight Savings Time Begins!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="mom" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Mother's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_mom" size="50" value="Happy Mother's Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="md" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Memorial Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_md" size="50" value="Happy Memorial Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="flag" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Flag Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_flag" size="50" value="Happy Flag Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="dad" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Father's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_dad" size="50" value="Happy Father's Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="ind" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Independence Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_ind" size="50" value="Happy Fourth of July!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="labor" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Labor Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_labor" size="50" value="Happy Labor Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="grand" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Grandparent's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_grand" size="50" value="Happy Grandparent's Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="col" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Columbus Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_col" size="50" value="Happy Columbus Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="dayends" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Daylight Savings Time Ends</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_dayends" size="50" value="Daylight Savings Time Ends!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="hal" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Halloween</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_hal" size="50" value="Happy Halloween!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="veteran" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Veteran's Day</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_veteran" size="50" value="Happy Veteran's Day!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="thanks" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Thanksgiving</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_thanks" size="50" value="Happy Thanksgiving!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="ceve" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Christmas Eve</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_ceve" size="50" value="Merry Christmas Eve!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="christ" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">Christmas</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_christ" size="50" value="Merry Christmas!">
</td>
</tr>
<tr>
<td bgcolor="<% =strForumCellColor %>">
<input type="checkbox" name="nyeve" value="1" checked>
<font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>">New Year's Eve</font></td>
<td bgcolor="<% =strForumCellColor %>">
<input type="text" name="message_nyeve" size="50" value="Happy New Year's Eve!">
</td>
</tr>

</table>
</td>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Reset">
</form>

</div>
<% Else %>
<% Response.Redirect "admin_login.asp" %>
<% End IF %>



If you want to download the code, click on here or on the image:

**Important**


The original code from Bookie have a ([hl] ~ [/hl]) in front of them. [hl]Be sure to read the read me[/hl]!


"I know more than myself" -Azu

Edited by - azu on 04 March 2002 19:20:17

Edited by - azu on 04 March 2002 19:25:45

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 05 March 2002 :  10:17:09  Show Profile
it seem got a BIG SYNTAX ERROR in us_process.asp file. on these lines..
quote:
.... & DateToStr("1/1/""<% = intThisYear %>""") & "', '" ....

i am also novice to ASP, i can't fix by myself. Someone can tell me how to correct these... thx

Go to Top of Page

es4725
Junior Member

205 Posts

Posted - 05 March 2002 :  17:54:25  Show Profile
Change all instances of
<% = intThis Year %>

with

" & intThisYear & "

with quotes
so that it looks like this:

.... & DateToStr("1/1/""" & intThisYear & """) & "', '" ....

see if that works


Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 06 March 2002 :  00:45:13  Show Profile
thanks a lot! es4725
i fixed that code by ur direction. i think the syntax is ok now !
but when i want to add the Holidays to Events Calendar... it got a error like below:

Microsoft VBScript runtime Error '800a000d'
Type mismatch: 'dtDateTime'
/doramoon/othello2/forum/inc_functions.asp, Line 725


it lead to the function in inc_functions.asp..
quote:
function DateToStr(dtDateTime)
if not isDate(strForumTimeAdjust) then
strForumTimeAdjust = strToDate(strForumTimeAdjust)
end if

DateToStr = year(dtDateTime) & doublenum(Month(dtdateTime)) & doublenum(Day(dtdateTime)) & doublenum(Hour(dtdateTime)) & doublenum(Minute(dtdateTime)) & doublenum(Second(dtdateTime)) & ""
end function


so i think it still have some problem in azu's mod..

however, thank u very much for ur help...

~~ ¡¹ ¡¸ ¡¸¡¹ ¡¸ ¡¹ ~~

Edited by - DoraMoon on 06 March 2002 00:50:46
Go to Top of Page

es4725
Junior Member

205 Posts

Posted - 06 March 2002 :  01:21:51  Show Profile
quote:

thanks a lot! es4725



No problem - not sure how to handle the new problem yet though...

Go to Top of Page

SalmanKhana
Average Member

USA
961 Posts

Posted - 06 March 2002 :  14:26:34  Show Profile
quote:



No problem - not sure how to handle the new problem yet though...






dont worry, the big techies might be on their way here you know its raining today so it'll take them a while to come to this post !

Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 11 March 2002 :  02:52:31  Show Profile
i found another choice of Holiday Mod from Huwr's Mod, it just need a file (admin_holidays.asp) for "one" country and "any" years...
it seem more convenient to my demand...
(u can found it from Huwrz Site in File Library http://www.magicmushroom.org.uk/forum/ )

and about the above error message, i think it maybe a mistake by myself.
if u change the Holidays from us_holiday to other country's.. and something in there having wrong form name or duplicate holiday in one date.. it just appear this error like that.

so now i know... u must be VERY CAREFULLY to modify the Holidays, it seem have too many varible names need to change in one holiday... :)

~~ ¡¹ ¡¸ ¡¸¡¹ ¡¸ ¡¹ ~~
Go to Top of Page

Bookie
Average Member

USA
856 Posts

Posted - 19 March 2002 :  13:11:20  Show Profile  Visit Bookie's Homepage  Send Bookie an AOL message  Send Bookie a Yahoo! Message
Hey! I'm glad someone has improved this mod I created! You are correct, I am a beginner especially when it comes to Snitz mods. Run with it!

Bookie

"May the forces of evil become confused on the way to your home."
- George Carlin
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.29 seconds. Powered By: Snitz Forums 2000 Version 3.4.07