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)
 Admin Alerts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 03 August 2011 :  11:35:09  Show Profile  Reply with Quote
This mod enables Admins to send Javascript alerts (grey boxes) to all logged in members. For those who remember the original version of this, I fixed the installation instructions and the issue with repeating alerts.

No, there's no demo available - users would scream.

Edited by - Carefree on 03 August 2011 11:38:14

Giumer
Junior Member

Italy
163 Posts

Posted - 03 August 2011 :  23:49:02  Show Profile  Send Giumer an ICQ Message  Reply with Quote
Hello I 'installed and configured, but when I access the foru nothing happens, the window should open up to me as well as the administrator?



ok I understand things, we in Italy the date you put it like this: 04/08/2011 and can change the dbs?

=======================
http://www.Giumer.it/forum

=======================

Edited by - Giumer on 04 August 2011 00:17:13
Go to Top of Page

Giumer
Junior Member

Italy
163 Posts

Posted - 04 August 2011 :  11:45:01  Show Profile  Send Giumer an ICQ Message  Reply with Quote
hi mate is possibol cange Date ? in is italy and format date is this (04 Day)(08 moonth)(2011 year)

=======================
http://www.Giumer.it/forum

=======================
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 04 August 2011 :  18:27:39  Show Profile  Reply with Quote
Sorry people, should have tested those changes first. Now I have, it works. This is ONLY for people using DDMMYYYY format!

"inc_alert.asp"


<%
'###############################################################################
'##
'##			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
%>


"admin_alert.asp"


<%
'###############################################################################
'##
'##				 							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
%>

Edited by - Carefree on 09 August 2011 01:59:13
Go to Top of Page

superskytten1
New Member

Denmark
94 Posts

Posted - 05 August 2011 :  02:23:05  Show Profile  Reply with Quote
thanks for a great mod carefree kim
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 05 August 2011 :  22:26:38  Show Profile  Reply with Quote
You're welcome.
Go to Top of Page

superskytten1
New Member

Denmark
94 Posts

Posted - 06 August 2011 :  00:35:29  Show Profile  Reply with Quote
i cant get this one too work carefree kim
-------------------------------------------------------------------
I haven't tested it but it should work.

This is ONLY for people using DDMMYYYY format!

Edited by - superskytten1 on 06 August 2011 00:36:57
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 06 August 2011 :  12:06:41  Show Profile  Reply with Quote
See above.

Edited by - Carefree on 06 August 2011 12:17:29
Go to Top of Page

superskytten1
New Member

Denmark
94 Posts

Posted - 07 August 2011 :  08:11:15  Show Profile  Reply with Quote
my forum goes down when i try too chance the new files carefree, i try another day. BUT thanks :)

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

i have sent you the files, you can look at them IF you have time :)

Edited by - superskytten1 on 07 August 2011 08:12:51
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 07 August 2011 :  20:14:34  Show Profile  Reply with Quote
Sent them back.
Go to Top of Page

superskytten1
New Member

Denmark
94 Posts

Posted - 08 August 2011 :  02:29:33  Show Profile  Reply with Quote
sometimes i dont understand asp coding it shout bee easy now i try too explain, first time i install it, and it work
then you make a chance soo other people could use it whit another DDMMYYYY then it didnt work for me. then you make a chance for me it still dont work. soo i try again whit my "own coding" AND THIS DIDNT WORK TOO ??? STRANGE

Edited by - superskytten1 on 08 August 2011 23:44:08
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 08 August 2011 :  23:57:18  Show Profile  Reply with Quote
I'll change my server time to European format and test your files.

Done and fixed. Tested and they work. For the rest of you on DDMMYYYY format, see files above.

Edited by - Carefree on 09 August 2011 02:04:59
Go to Top of Page

superskytten1
New Member

Denmark
94 Posts

Posted - 09 August 2011 :  13:56:42  Show Profile  Reply with Quote
GREAT CAREFREE now i can see the different in the files, many thanks for your work my friend hope i can help one day happy summer
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.3 seconds. Powered By: Snitz Forums 2000 Version 3.4.07