<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; if not, write to:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
Set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strSQL = ""
strSQL = "SELECT AM_ID, AM_START, AM_END, AM_TEXT, AM_COUNT FROM " & strTablePrefix & "AM"
Set rs = my_Conn.Execute(strSQL)
strSQL2 = "SELECT AM_DATA_ID, AM_ID, AM_NAME, AM_COUNT FROM " & strMemberTablePrefix & "AM_DATA"
Set rs2 = my_Conn.Execute(strSQL2)
If strDBNTUserName > "" Then
If not (rs.EOF or rs.BOF) then
rs.MoveFirst
Do while not rs.EOF
AMSTART = rs("AM_START")
AMEND = rs("AM_END")
AMID = rs("AM_ID")
AMTEXT = rs("AM_TEXT")
AMCOUNT = rs("AM_COUNT")
AMSTARTDATE = DateSerial(Left(AMSTART,4),Mid(AMSTART,5,2),right(AMSTART,2))
AMENDDATE = DateSerial(left(AMEND,4),Mid(AMEND,5,2),right(AMEND,2))
If Now() => AMSTARTDATE AND AMENDDATE => Now() then
AMDATETest = True
End If
If AMDATETest then
AlertShow = True
If not (rs2.EOF or rs2.BOF) then
rs2.MoveFirst
Do while not rs2.EOF
AMDATAID = rs2("AM_DATA_ID")
AMID2 = rs2("AM_ID")
AMCOUNT2 = rs2("AM_COUNT")
AMNAME = rs2("AM_NAME")
If AMNAME <> strDBNTUserName then
If AMID2 = AMID then
If AMCOUNT2 < AMCOUNT then
UpdSql = ""
UpdSql = "UPDATE " & strTablePrefix & "AM_DATA SET" &_
" AM_COUNT = " & AMCOUNT2 +1 & "" &_
" WHERE (((AM_ID)="& AMID & ") AND ((AM_NAME)='" & strDBNTUserName & "'))"
Set rs3 = my_Conn.Execute(UpdSql ,adOpenStatic,adCmdTxt)
AlertShow = True
End If
Else
InsSql = ""
InsSql = "INSERT INTO " & strTablePrefix & "AM_DATA ( "
InsSql = InsSql & "AM_ID, AM_NAME, AM_COUNT "
InsSql = InsSql & ") VALUES ("
InsSql = InsSql & "" & AMID & " ,"
InsSql = InsSql & "'" & strDBNTUserName & "',"
InsSql = InsSql & "1"
InsSql = InsSql & ")"
Set rs3 = my_Conn.Execute(InsSql,adOpenStatic,adCmdTxt)
AlertShow = True
End If
Else
AlertShow = False
End If
rs2.MoveNext
Loop
rs2.Close
Else
InsSql = ""
InsSql = "INSERT INTO " & strTablePrefix & "AM_DATA ( "
InsSql = InsSql & "AM_ID, AM_NAME, AM_COUNT "
InsSql = InsSql & ") VALUES ("
InsSql = InsSql & "" & AMID & " ,"
InsSql = InsSql & "'" & strDBNTUserName & "',"
InsSql = InsSql & "1"
InsSql = InsSql & ")"
Set rs3 = my_Conn.Execute(InsSql,adOpenStatic,adCmdTxt)
AlertShow = True
End If
Set rs2 = Nothing
Set rs3 = Nothing
End If
If AlertShow then
Response.Write "<script language=""Javascript"">"
Response.Write "alert ("""& AMTEXT&""")"
Response.Write "</script>"
End If
rs.MoveNext
Loop
rs.Close
End If
Set rs = Nothing
End If
%>
<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modIfy it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet.
'##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
'## for more details.
'##
'## You should have received a copy of the GNU General Public License along
'## with this program; If not, write to:
'##
'## Free Software Foundation, Inc.
'## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
'###############################################################################
'##
'## 2002 Robert Grund robertgrund@yahoo.com
'##
'## Thanks to Japaro for giving the hint to show the images also in the menu
'##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_admin.asp" -->
<!--#INCLUDE FILE="inc_moderation.asp" -->
<%
If Session(strCookieURL & "Approval") <> "15916941253" Then
scriptname = split(Request.ServerVariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
End If
Dim FormMT, FormConfig, FormC
AlertCode = LCase(Request.QueryString("c"))
AlertShowMenu = True
err.Clear
strSql = "SELECT * FROM "& strTablePrefix & "AM"
objConfig = My_Conn.Execute(strSql)
If My_Conn.Errors.Count > 0 Then
AlertCode="nodb"
End If
strSql = "SELECT * FROM "& strTablePrefix & "AM"
Set rsExists=My_Conn.Execute(strSql)
If not rsExists.EOF Then
strEdit = "yes"
rsExists.Close
End If
Set rsExists = Nothing
Currentscriptname = Request.ServerVariables("SCRIPT_NAME")
Response.Write " <table border=""0"" width=""100%"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" " & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""admin_home.asp"">Admin Section</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Alert Message<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
FormMT = LCase(Request.Form("Method_Type"))
FormConfig = LCase(Request.Form("Method_Conf"))
FormC = LCase(Request.QueryString("c"))
strStart = Request.Form("Alertstart")
strCease = Request.Form("Alertend")
If strStart > "" Then
strStart = right(strStart,4)+mid(strStart,3,2)+left(strStart,2)
End If
If strCease > "" Then
strCease = right(strCease,4)+mid(strCease,3,2)+left(strCease,2)
End If
If FormMT = "write_configuration" OR FormC = "alertdel" Then
Err_Msg = ""
If FormConfig = "alertnew" Then
If Len(strStart)=0 Then
Err_Msg = Err_Msg & "<li>You need to have a starting date!</li>"
AlertShowMenu = False
End If
If Len(strCease)=0 Then
Err_Msg = Err_Msg & "<li>You need to have an ending date!</li>"
AlertShowMenu = False
End If
If len(Request.Form("AlertMessage"))=0 Then
Err_Msg = Err_Msg & "<li>You need to have a message!</li>"
AlertShowMenu = False
End If
If Request.Form("AlertMessage")="Add a Message" Then
Err_Msg = Err_Msg & "<li>You need to have a message else Then 'Add a Message'!</li>"
AlertShowMenu = False
End If
If Request.Form("Alertstart")="DDMMYYYY" Then
Err_Msg = Err_Msg & "<li>You need to have a starting date!</li>"
AlertShowMenu = False
End If
If Request.Form("Alertend")="DDMMYYYY" Then
Err_Msg = Err_Msg & "<li>You need to have a ending date!</li>"
AlertShowMenu = False
End If
If len (Request.Form("AlertMessage"))>255 Then
Err_Msg = Err_Msg & "<li>The message text can only have 255 characters!</li>"
AlertShowMenu = False
End If
If Len(Request.Form("Alertstart"))>0 and Len(Request.Form("Alertend"))=0 Then
If strStart >= strCease Then
Err_Msg = Err_Msg & "<li>The Starting date can not be later Then the Ending Date</li>"
AlertShowMenu = False
End If
End If
If strCease = strStart Then
Err_Msg = Err_Msg & "<li>End date must be later than start date!</li>"
AlertShowMenu = False
End If
End If
If Err_Msg = "" Then
If FormConfig = "alertnew" Then
InsSql = ""
InsSql = "INSERT INTO " & strMemberTablePrefix & "AM ( "
InsSql = InsSql & "AM_Start, AM_END, AM_TEXT, AM_COUNT "
InsSql = InsSql & ") VALUES ("
InsSql = InsSql & "'" & strStart & "' ,"
InsSql = InsSql & "'" & strCease & "',"
InsSql = InsSql & "'" & Request.Form("AlertMessage") & "',"
InsSql = InsSql & "" & Request.Form("AlertCount") & ""
InsSql = InsSql & ")"
Set rs = My_Conn.Execute(InsSql,adOpenStatic,adCmdTxt)
MethodText = "New Alert Added"
AlertShowMenu = False
ElseIf FormConfig = "alertedit" Then
UpdSql = ""
UpdSql = "UPDATE " & strMemberTablePrefix & "AM SET "
UpdSql = UpdSql & "AM_START = '" & strStart & "',"
UpdSql = UpdSql & "AM_END = '" & strCease & "',"
UpdSql = UpdSql & "AM_TEXT = '" & Request.Form("AlertMessage")& "',"
UpdSql = UpdSql & "AM_COUNT = '" & Request.Form("AlertCount") & "' "
UpdSql = UpdSql & " WHERE (((AM_ID)="& Request.Form("AMID") & "))"
Set rs = My_Conn.Execute(UpdSql ,adOpenStatic,adCmdTxt)
MethodText = "Alert with ID=" & Request.Form("ID") & " Updated"
AlertShowMenu = False
ElseIf FormC = "alertdel" Then
DelSql = ""
DelSql = "DELETE FROM "& strMemberTablePrefix & "AM"
DelSql = DelSql & " WHERE (((AM_ID)=" & Request.QueryString("ID") & "))"
Set rs = My_Conn.Execute(DelSql,adOpenStatic,adCmdTxt)
MethodText = "Alert with ID=" & Request.QueryString("ID") & " Deleted"
AlertShowMenu = False
End If
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>" & MethodText & "</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=admin_alert.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Congratulations!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""admin_home.asp"">Back To Admin Home</font></a></p>" & vbNewLine
Else
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """ color=""" & strHiLiteFontColor & """>There Was A Problem With Your Details</font></p>" & vbNewLine & _
" <table align=""center"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""JavaScript:history.go(-1)"">Go Back To Enter Data</a></font></p>" & vbNewLine
End If
End If
If AlertShowMenu <> False Then
Response.Write "<table border=""0"" cellspacing=""1"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""800"" cellspacing=""1"" cellpadding=""4"" >" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""3"" width=""100%"" align=""center"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize+1 & """ color=""" & strHeadFontColor & """><b> Alert Messenger</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ width=""204"" align=""left"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & _
" " & getCurrentIcon(strIconFolderNew,"","") & " <a href=""" & Currentscriptname & "?c=alertadd"">Create a new Alert</a><br />" & vbNewLine
If strEdit = "yes" Then
Response.Write " " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconPencil,"","") & " <a href=""" & Currentscriptname & "?c=alertedit"">Edit an Alert</a><br />" & vbNewLine
End If
Response.Write " </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td valign=""middle"" bgColor=""" & strForumCellColor & """width=""476"" rowspan=""2"" valign=""top"" align=""center"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
AlertContent(AlertCode)
Response.Write " </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""left"" width=""204"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> <a href=""http://forum.snitz.com/forum/topic.asp?TOPIC_ID=69977"" target=""_blank"">Snitz Forum Topic</a>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table><br>" & vbNewLine
End If
WriteFooter
Response.End
Sub AlertContent(AlertC)
Select Case AlertC
Case "nodb"
Response.Write "<br />" & _
"<bAlert Messenger needs to be Configured.</b><br />" & _
"The Tables have not yet been installed.<br />" & vbNewLine & _
"Click <br />" & _
"<a href=""admin_mod_dbsetup.asp"">Install Table</a>" & _
"<br /><br />" & _
"You will need to run the script ""Alert Messenger"".<br />" & vbNewLine
Case "alertadd"
Alertadd()
Case "alertedit"
Alertedit()
Case "alertedit2"
Alertedit2()
Case Else
Response.Write "<left>This MOD lets you send javascript alerts to<br>" & _
"members of your forum who are logged in." & _
"<br /><br />" & _
"Note: End date must be later than start date.</left>"
End Select
End Sub
Sub Alertadd()
Response.Write " <form action="""& Currentscriptname & """ method=""post"" id=""Form1"" name=""Form1"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""Write_Configuration"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Conf"" value=""AlertNew"">" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""4"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""3"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontSize & """>" & vbNewLine & _
" <u>How to use this Alert MOD!!</u><br>" & vbNewLine & _
" If you do not add any Alert Then the MOD will be inactive!<br>" & vbNewLine & _
" If you add an Alert it will only be available during the dates specIfied<br>" & vbNewLine & _
" Note: The Date format is DDMMYYYY!<br>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Defining a new Alert</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Starting Date:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <input type=""text"" name=""AlertStart"" size=""10"" maxLength=""8"" value=""DDMMYYYY"">" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>End Date:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <input type=""text"" name=""AlertEnd"" size=""10"" maxLength=""8"" value=""DDMMYYYY"">" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Message:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <textarea rows=""4"" name=""AlertMessage"" cols=""40"">Add a Message</textarea>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>How often:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select size=""1"" name=""AlertCount"">" & vbNewLine & _
" <option selected value=""1"">1</option>" & vbNewLine & _
" <option value=""2"">2</option>" & vbNewLine & _
" <option value=""3"">3</option>" & vbNewLine & _
" <option value=""4"">4</option>" & vbNewLine & _
" <option value=""5"">5</option>" & vbNewLine & _
" <option value=""6"">6</option>" & vbNewLine & _
" <option value=""7"">7</option>" & vbNewLine & _
" <option value=""8"">8</option>" & vbNewLine & _
" <option value=""9"">9</option>" & vbNewLine & _
" <option value=""10"">10</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ colspan=""2"" align=""center""><input type=""submit"" value=""Submit New Alert"" id=""submit1"" name=""submit1""> <input type=""reset"" value=""Reset Old Values"" id=""reset1"" name=""reset1""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </form>" & vbNewLine
End Sub
Sub Alertedit()
strSQL = "SELECT AM_TEXT, AM_START, AM_ID, "
strSQL = strSQL & "AM_END"
strSQL = strSQL & " FROM " & strMemberTablePrefix & "AM"
Set rs = My_Conn.Execute(strSql,adOpenStatic,adCmdTxt)
Response.Write " <table border=""1"" style=""border-collapse:collapse;"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""1"" style=""border-collapse:collapse;"" cellspacing=""0"" cellpadding=""2"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""3"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontSize & """>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""3"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Existing Alerts</b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Start </b></font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>End </b></font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Message </b></font>" & vbNewLine
If not (rs.EOF or rs.BOF) Then
rs.MoveFirst
Do until rs.EOF
strE1 = right(rs("AM_START"),2)+mid(rs("AM_START"),5,2)+left(rs("AM_START"),4)
strE2 = right(rs("AM_END"),2)+mid(rs("AM_END"),5,2)+left(rs("AM_END"),4)
Response.Write "<tr>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strE1 & " </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & strE2 & " </font>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & rs("AM_TEXT") & " " & vbNewLine & _
" <a href=""admin_alert.asp?c=ALERTEDIT2&ID=" & rs("AM_ID") & """>" & getCurrentIcon(strIconPencil,"Edit Alert","hspace=""0""") & "</a>" & vbNewLine & _
" <a href=""admin_alert.asp?c=ALERTDEL&ID=" & rs("AM_ID") & """>" & getCurrentIcon(strIconTrashcan,"Delete Alert","hspace=""0""") & "</a>" & vbNewLine & _
"</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
rs.MoveNext
Loop
rs.Close
Set rs = Nothing
Else
Response.Write " <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ colspan=""3"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """> No Alerts have been yet defined</font></td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
Response.Write " </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
End Sub
Sub Alertedit2()
strSql = ""
strSql = "SELECT AM_ID, AM_START, AM_END, AM_TEXT, AM_COUNT "
strSql = strSql & "FROM " & strMemberTablePrefix & "AM"
strSql = strSql & " WHERE (((AM_ID)="& Request.QueryString("ID") & "))"
Set rs = My_Conn.Execute(strSql,adOpenStatic,adCmdTxt)
If not rs.EOF Then
strE1 = right(rs("AM_START"),2)+mid(rs("AM_START"),5,2)+left(rs("AM_START"),4)
strE2 = right(rs("AM_END"),2)+mid(rs("AM_END"),5,2)+left(rs("AM_END"),4)
Response.Write " <form action="""& Currentscriptname & """ method=""post"" id=""Form1"" name=""Form1"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""Write_Configuration"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Conf"" value=""AlertEdit"">" & vbNewLine & _
" <input type=""hidden"" name=""AMID"" value=""" & RS("AM_ID") & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""1"">" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Feature Configuration</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""3"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontSize & """>" & vbNewLine & _
" <u>How to use this Alert MOD!!</u><br>" & vbNewLine & _
" If you do not add any Alert Then the MOD will be inactive!<br>" & vbNewLine & _
" If you add an Alert it will only be available during the dates specIfied<br>" & vbNewLine & _
" Note: The Date format is DDMMYYYY!<br>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Defining a new Alert</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Starting Date:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <input type=""text"" name=""AlertStart"" size=""10"" maxLength=""8"" value="""& strE1 & """>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>End Date:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <input type=""text"" name=""AlertEnd"" size=""10"" maxLength=""8"" value="""& strE2 &""">" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>Message:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <textarea rows=""4"" name=""AlertMessage"" cols=""40"">" & RS("AM_TEXT") & "</textarea>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ align=""right""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>How often:</b> </font></td>" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
" <select size=""1"" name=""AlertCount"">" & vbNewLine & _
" <option selected value=""" & RS("AM_COUNT") & """>" & RS("AM_COUNT") & "</option>" & vbNewLine & _
" <option value=""1"">1</option>" & vbNewLine & _
" <option value=""2"">2</option>" & vbNewLine & _
" <option value=""3"">3</option>" & vbNewLine & _
" <option value=""4"">4</option>" & vbNewLine & _
" <option value=""5"">5</option>" & vbNewLine & _
" <option value=""6"">6</option>" & vbNewLine & _
" <option value=""7"">7</option>" & vbNewLine & _
" <option value=""8"">8</option>" & vbNewLine & _
" <option value=""9"">9</option>" & vbNewLine & _
" <option value=""10"">10</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr valign=""middle"">" & vbNewLine & _
" <td bgColor=""" & strForumCellColor & """ colspan=""2"" align=""center""><input type=""submit"" value=""Submit Edited Alert"" id=""submit1"" name=""submit1""> <input type=""reset"" value=""Reset Old Values"" id=""reset1"" name=""reset1""></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </form>" & vbNewLine
End If
End Sub
%>