Author |
Topic |
leatherlips
Senior Member
USA
1838 Posts |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 31 July 2008 : 15:21:37
|
quote: Originally posted by Carefree
Andy, if you still want the seconds gone; look for this line in "inc_func_common" (appx line 506):
CF Your a star! Thank you...< |
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 31 July 2008 : 16:09:28
|
leatherlips, has all the associated code with 'website' and 'ICQ' been removed from the admin_petition and petition.asp files. Check among the sql statements there are parameters to these two fields. I had the same error and cleared all occurances made to the old fields. At work at moment, so can not reference to lines to check.< |
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 31 July 2008 : 16:19:47
|
Leather, you've made some changes to what I posted, so I'll need to see the entire file to fix it. Post a .txt link< |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 31 July 2008 : 16:24:25
|
Here is my admin_petiton.asp.
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.04
'#################################################################################
'## Copyright (C) 2000-04 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## 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 the 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 the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'## MOD: Petition
'## Based on the Guestbook MOD by Michael Reisinger (OneWayMule)
'## Added signature count feature with the help of phy1729
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
strQS = Request.QueryString
Response.Redirect "admin_login.asp?target=" & Server.URLEncode(scriptname(ubound(scriptname)) & "?" & strQS)
end if
Response.Write " <table width=""100%"" align=""center"" border=""0"">" & 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,"","") & " Petition Administration<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
if Request.Form("switch") = "" then
' Do nothing
else
Session("Pswitch")=cInt(Request.Form("switch"))
end if
strsql = "SELECT P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_V1_SWITCH, P_V2_SWITCH, P_V3_SWITCH, P_V1_REQ, P_V2_REQ, P_V3_REQ, P_PAGECOUNT, P_T_MAIL, P_W_MAIL, P_T_AUTHOR, P_T_REPLYTO, P_T_MESSAGE, P_MESSAGE, P_MODERATION, P_ANTISPAM, P_SWITCH FROM " & strTablePrefix & "P_OPTIONS"
Set grs = my_conn.execute(strsql)
strPField1 = grs("P_VARFIELD1")
strPField2 = grs("P_VARFIELD2")
strPField3 = grs("P_VARFIELD3")
strPField1E = grs("P_V1_SWITCH")
strPField2E = grs("P_V2_SWITCH")
strPField3E = grs("P_V3_SWITCH")
strPField1Req = grs("P_V1_REQ")
strPField2Req = grs("P_V2_REQ")
strPField3Req = grs("P_V3_REQ")
strPPageCount = CLng(grs("P_PAGECOUNT"))
strPTMail = grs("P_T_MAIL")
strPWMail = grs("P_W_MAIL")
strPTAuthor = grs("P_T_AUTHOR")
strPTReplyTo = grs("P_T_REPLYTO")
strPTMessage = grs("P_T_MESSAGE")
strPWelcome = grs("P_MESSAGE")
strPModeration = grs("P_MODERATION")
strPAntispam = grs("P_ANTISPAM")
strPSwitch = grs("P_SWITCH")
grs.Close
Set grs = Nothing
strGAction = Request.Querystring("action")
If Not IsNumeric(Request.QueryString("id")) Then
intID = 0
Else
intID = Request.Querystring("id")
End If
Select Case strGAction
'#####################################################################################################
'### DELETE ALL UNAPPROVED PETITION SIGNATURES ###
'######################################################
Case "deleteall"
If Request.QueryString("do") = "yes" Then
strsql = "DELETE FROM " & strTablePrefix & "PETITION WHERE P_MODERATED = 1"
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Unmoderated Petition Entries Deleted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete all unmoderated Petition entries?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=deleteall&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### DELETE PETITION SIGNATURE ###
'######################################
Case "delete"
If Request.QueryString("do") = "yes" and intID <> 0 Then
strsql = "DELETE FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 1"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPUnmoderatedCount = countrs("P_COUNT")
Else
intPUnmoderatedCount = 0
End If
countrs.Close
Set countrs = Nothing
If intPUnmoderatedCount > 0 then
strRedirectURL = "petition.asp?method=approve"
Else
strRedirectURL = "petition.asp"
End If
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Deleted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=" & strRedirectURL & """>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strRedirectURL & """>Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" and intID <> 0 Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete this Petition entry?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=delete&id=" & intID & "&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### APPROVE ALL UNMODERATED PETITION ENTRIES ###
'#####################################################
Case "approveall"
If Request.QueryString("do") = "yes" Then
strsql = "UPDATE " & strTablePrefix & "PETITION SET P_MODERATED = 0 WHERE P_MODERATED = 1"
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Unmoderated Petition Entries Approved!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to approve all unmoderated Petition entries?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=approveall&do=yes"">Yes</a> | <a href=""petition.asp?action=view&method=approve"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### APPROVE PETITION SIGNATURE ###
'######################################
Case "approve"
If Request.QueryString("do") = "yes" and intID <> 0 Then
strsql = "UPDATE " & strTablePrefix & "PETITION SET"
strsql = strsql & " P_MODERATED = 0 WHERE P_ID=" & intID
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
'### SEND THANK YOU EMAIL
If strPTMail = 1 Then
strsql = "SELECT P_ID, P_NAME, P_EMAIL FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
set grs = my_conn.Execute(strsql)
strRecipientsName = grs("P_NAME")
strRecipients = grs("P_EMAIL")
strFrom = strPTReplyTo
strFromName = strPTAuthor
strSubject = "Thank you for signing " & strForumTitle & "'s Petition"
strMessage = strPTMessage
strSender = strFrom
grs.Close
Set grs = Nothing
%><!--#include file="inc_mail.asp" --><%
End If
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 1"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPUnmoderatedCount = countrs("P_COUNT")
Else
intPUnmoderatedCount = 0
End If
countrs.Close
Set countrs = Nothing
If intPUnmoderatedCount > 0 then
strRedirectURL = "petition.asp?method=approve"
Else
strRedirectURL = "petition.asp"
End If
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Approved!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=" & strRedirectURL & """>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strRedirectURL & """>Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" and intID <> 0 Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Approve this Petition entry?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=approve&id=" & intID & "&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### EDIT PETITION SIGNATURE ###
'####################################
Case "edit"
If intID = 0 Then Response.Redirect("petition.asp")
If Request.QueryString("do") = "yes" Then
strFormName = ChkString(Request.Form("name"), "SQLString")
strFormEmail = ChkString(Request.Form("email"), "SQLString")
strFormMessage = ChkString(Request.Form("message"), "message")
strFormField1 = ChkString(Request.Form("field1"),"SQLString")
strFormField2 = ChkString(Request.Form("field2"),"SQLString")
strFormField3 = ChkString(Request.Form("field3"),"SQLString")
If strFormField1 = "" Then
strFormField1 = " "
End If
If strFormField2 = "" Then
strFormField2 = " "
End If
If strFormField3 = "" Then
strFormField3 = " "
End If
If Request.Form("website") = "http://" or Request.Form("website") = "" Then
strFormWebsite = ""
End if
If Request.Form("name") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a name</li>" & vbNewLine
End If
If Request.Form("email") = "" Then
Err_Msg = Err_Msg & "<li>Please enter an email address</li>" & vbNewLine
End If
If Request.Form("message") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a message</li>" & vbNewLine
End if
If strPField1Req = 1 and trim(strFormField1) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField1 & "</li>" & vbNewLine
End If
If strPField2Req = 1 and trim(strFormField2) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField2 & "</li>" & vbNewLine
End If
If strPField3Req = 1 and trim(strFormField3) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField3 & "</li>" & vbNewLine
End If
If Err_Msg <> "" Then
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
WriteFooter
Response.End
Else
strsql = "UPDATE " & strTablePrefix & "PETITION SET"
strsql = strsql & " P_NAME='" & strFormName & "'"
strsql = strsql & ", P_EMAIL='" & strFormEmail & "'"
strsql = strsql & ", P_MESSAGE='" & strFormMessage & "'"
strsql = strsql & ", P_SWITCH="& strFormSwitch
If strPField1E = 1 Then
strsql = strsql & ", P_VARFIELD1='" & strFormField1 & "'"
End If
If strPField2E = 1 Then
strsql = strsql & ", P_VARFIELD2='" & strFormField2 & "'"
End If
If strPField3E = 1 Then
strsql = strsql & ", P_VARFIELD3='" & strFormField3 & "'"
End If
strsql = strsql & " WHERE P_ID=" & intID
my_conn.execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Updated!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank You!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p><br />" & vbNewLine
End if
Else
strsql = "SELECT P_ID, P_NAME, P_EMAIL, P_MESSAGE, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_SWITCH FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
set grs = my_conn.Execute(strsql)
strTempID = grs("P_ID")
strTempName = grs("P_NAME")
strTempEmail = grs("P_EMAIL")
strTempMessage = grs("P_MESSAGE")
strTempDate = grs("P_DATE")
strTempSwitch = grs("P_SWITCH")
If strPField1E = 1 Then
strTempField1 = grs("P_VARFIELD1")
End If
If strPField2E = 1 Then
strTempField2 = grs("P_VARFIELD2")
End if
If strPField3E = 1 then
strTempField3 = grs("P_VARFIELD3")
End if
grs.Close
Set grs = Nothing
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _
" <form method=""post"" action=""admin_petition.asp?action=edit&do=yes&id=" & intID & """ name=""PostTopic"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Edit Petition Entry</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Your Name:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""name"" maxlength=""50"" value=""" & chkString(strTempName,"display") & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""email"" maxlength=""50"" value=""" & chkString(strTempEmail,"display") & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
If strPField1E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField1 & ":</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field1"" maxlength=""100"" value=""" & strTempField1 & """ size=""35"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField2E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField2 & ":</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field2"" maxlength=""100"" value=""" & strTempField2 & """ size=""35"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField3E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField3 & ":</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field3"" maxlength=""100"" value=""" & strTempField3 & """ size=""35"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
%>
<!--#include file="inc_post_buttons.asp""-->
<%
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Message:</b> <br /><br />" & vbNewLine & _
" <table border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
If strAllowHTML = "1" Then
Response.Write " * HTML is ON<br />" & vbNewLine
Else
Response.Write " * HTML is OFF<br />" & vbNewLine
End If
If strAllowForumCode = "1" Then
Response.Write " * <a href=""JavaScript:openWindow6('pop_forum_code.asp')"" tabindex=""-1"">Forum Code</a> is ON<br />" & vbNewLine
Else
Response.Write " * Forum Code is OFF<br />" & vbNewLine
End if
If strIcons = "1" and strShowSmiliesTable = "1" Then
%>
<!--#INCLUDE FILE="inc_smilies.asp" -->
<%
End If
Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""45"" name=""Message"" rows=""11"" wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & CleanCode(strTempMessage) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""center"" colspan=""2"">" & vbNewLine & _
" <input name=""Submit"" type=""submit"" value="" Submit "">" & vbNewLine & _
" <input name=""Preview"" type=""button"" value="" Preview "" onclick=""OpenPreview()"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine
end if
'#####################################################################################################
'### FORM SUBMISSION CHECK ###
'#################################
Case "options_info"
strFormWelcome = ChkString(Request.Form("petitionwelcome"),"message")
strFormTMessage = ChkString(Request.Form("tmessage"),"SQLString")
strFormPageCount = CLng(Request.Form("pagecount"))
strFormField1 = ChkString(Request.Form("field1"),"SQLString")
strFormField2 = ChkString(Request.Form("field2"),"SQLString")
strFormField3 = ChkString(Request.Form("field3"),"SQLString")
strFormTAuthor = ChkString(Request.Form("tauthor"),"SQLSTring")
strFormTReplyTo = ChkString(Request.Form("treplyto"),"email")
strFormSwitch = CLng(Request.Form("switch"))
If Request.Form("field1e") = "1" Then
strFormField1e = 1
Else
strFormField1e = 0
End If
If Request.Form("field2e") = "1" Then
strFormField2e = 1
Else
strFormField2e = 0
End If
If Request.Form("field3e") = "1" Then
strFormField3e = 1
Else
strFormField3e = 0
End If
If Request.Form("field1r") = "1" Then
strFormField1r = 1
Else
strFormField1r = 0
End If
If Request.Form("field2r") = "1" Then
strFormField2r = 1
Else
strFormField2r = 0
End If
If Request.Form("field3r") = "1" Then
strFormField3r = 1
Else
strFormField3r = 0
End If
If Request.Form("moderation") = "1" Then
strFormModeration = 1
Else
strFormModeration = 0
End If
If Request.Form("temail") = "1" Then
strFormTEmail = 1
Else
strFormTEMail = 0
End If
If Request.Form("wemail") = "1" Then
strFormWEmail = 1
Else
strFormWEMail = 0
End If
If Request.Form("antispam") = "1" Then
strFormAntispam = 1
Else
strFormAntispam = 0
End If
'strFormSwitch=Session("PSwitch")
if strFormSwitch<>strPSwitch then strFormSwitch=abs(strPSwitch+(-1))
Err_Msg = ""
If trim(strFormWelcome) = "" Then
Err_Msg = Err_Msg & "<li>You must enter a Petition Statement</li>" & vbNewLine
End If
If (trim(strFormField1) = "" and strFormField1e = 1) or (trim(strFormField2) = "" and strFormField2e = 1) or (trim(strFormField3) = "" and strFormField3e = 1) Then
Err_Msg = Err_Msg & "<li>You must enter an Optional Field title if you want to enable it</li>" & vbNewLine
End If
If (strFormField1e = 0 and strFormField1r = 1) or (strFormField2e = 0 and strFormField2r = 1) or (strFormField3e = 0 and strFormField3r = 1) Then
Err_Msg = Err_Msg & "<li>You must enable an Optional Field if you want to make it required</li>" & vbNewLine
End If
If trim(strFormTAuthor) = "" Then
Err_Msg = Err_Msg & "<li>You must enter a From Name</li>" & vbNewLine
End If
If trim(strFormTReplyTo) = "" or not EmailField(strFormTReplyTo) Then
Err_Msg = Err_Msg & "<li>You must enter a valid From Email</li>" & vbNewLine
End If
If Err_Msg = "" Then
strsql = "UPDATE " & strTablePrefix & "P_OPTIONS SET "
strsql = strsql & " P_VARFIELD1='" & strFormField1 & "', "
strsql = strsql & " P_VARFIELD2='" & strFormField2 & "', "
strsql = strsql & " P_VARFIELD3='" & strFormField3 & "', "
strsql = strsql & " P_V1_SWITCH=" & strFormField1e & ", "
strsql = strsql & " P_V2_SWITCH=" & strFormField2e & ", "
strsql = strsql & " P_V3_SWITCH=" & strFormField3e & ", "
strsql = strsql & " P_MESSAGE = '" & strFormWelcome & "', "
strsql = strsql & " P_V1_REQ=" & strFormField1r & ", "
strsql = strsql & " P_V2_REQ=" & strFormField2r & ", "
strsql = strsql & " P_V3_REQ=" & strFormField3r & ", "
strsql = strsql & " P_PAGECOUNT=" & strFormPageCount & ", "
strsql = strsql & " P_T_MAIL=" & strFormTEmail & ", "
strsql = strsql & " P_W_MAIL=" & strFormWEmail & ", "
strsql = strsql & " P_T_AUTHOR='" & strFormTAuthor & "', "
strsql = strsql & " P_T_REPLYTO='" & strFormTReplyTo & "', "
strsql = strsql & " P_T_MESSAGE='" & strFormTMessage & "', "
strsql = strsql & " P_MODERATION=" & strFormModeration & ", "
strsql = strsql & " P_ANTISPAM=" & strFormAntispam & ", "
strsql = strsql & " P_SWITCH=" & strFormSwitch & " "
strsql = strsql & " WHERE P_ID=1"
my_conn.execute(strsql)
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Configuration Posted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=admin_home.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_petition.asp"">Back To Petition Admin</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
'#####################################################################################################
'### OPTIONS MAIN PAGE ###
'#############################
Case Else
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <form action=""admin_petition.asp?action=options_info"" method=""post"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Petition Administration</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Petition Options</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Petition Statement:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""70"" name=""petitionwelcome"" rows=""15"" wrap=""VIRTUAL"">" & CleanCode(strPWelcome) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Turn Petition On or Off:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""switch"" value=""1"" " & chkCheckbox("1",strPSwitch,true) & ">On " & vbNewLine & _
" <input type=""radio"" name=""switch"" value=""0"" " & chkCheckbox("1",strPSwitch,false) & ">Off" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Moderate Petition Entries:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""moderation"" value=""1"" " & chkCheckbox("1",strPModeration,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""moderation"" value=""0"" " & chkCheckbox("1",strPModeration,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Enable Antispam Confirmation:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""antispam"" value=""1"" " & chkCheckbox("1",strPAntispam,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""antispam"" value=""0"" " & chkCheckbox("1",strPAntispam,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Signatures Per Page:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <select name=""pagecount"">" & vbNewLine & _
" <option value=""5"" " & chkSelect(5,strPPageCount) & ">5</option>" & vbNewLine & _
" <option value=""10"" " & chkSelect(10,strPPageCount) & ">10</option>" & vbNewLine & _
" <option value=""15"" " & chkSelect(15,strPPageCount) & ">15</option>" & vbNewLine & _
" <option value=""20"" " & chkSelect(20,strPPageCount) & ">20</option>" & vbNewLine & _
" <option value=""25"" " & chkSelect(25,strPPageCount) & ">25</option>" & vbNewLine & _
" <option value=""50"" " & chkSelect(50,strPPageCount) & ">50</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Email Options</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Send Thank You Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""temail"" value=""1"" " & chkCheckbox("1",strPTMail,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""temail"" value=""0"" " & chkCheckbox("1",strPTMail,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>From Name:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""text"" maxlength=""100"" size=""35"" name=""tauthor"" value=""" & chkString(strPTAuthor,"display") & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>From Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""text"" maxlength=""100"" size=""35"" name=""treplyto"" value=""" & chkString(strPTReplyTo,"display") & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Thank You Email Message:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""70"" name=""tmessage"" rows=""15"" wrap=""VIRTUAL"">" & CleanCode(strPTMessage) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Notify Admin Via Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""wemail"" value=""1"" " & chkCheckbox("1",strPWMail,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""wemail"" value=""0"" " & chkCheckbox("1",strPWMail,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Additional Fields Options</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 1:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field1"" maxlength=""100"" value=""" & strPField1 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field1e"" value=""1"" " & chkCheckBox("1",strPField1E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field1r"" value=""1"" " & chkCheckBox("1",strPField1Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 2:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field2"" maxlength=""100"" value=""" & strPField2 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field2e"" value=""1"" " & chkCheckBox("1",strPField2E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field2r"" value=""1"" " & chkCheckBox("1",strPField2Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 3:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field3"" maxlength=""100"" value=""" & strPField3 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field3e"" value=""1"" " & chkCheckBox("1",strPField3E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field3r"" value=""1"" " & chkCheckBox("1",strPField3Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""center"" colspan=""2"">" & vbNewLine & _
" <input name=""Submit"" type=""submit"" value="" Submit "">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table><br />" & vbNewLine
End Select
WriteFooter()
%>
|
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
Edited by - leatherlips on 31 July 2008 19:19:25 |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 31 July 2008 : 17:16:32
|
OK - I eliminated 6 more variables in both files & created a dbs file to drop them from the tables. Try these, they will <b><font color="red">NOT</font id="red"></b> result in lost petitions:
First save (dbs_var_clean.asp) & run it from Admin Home:
Next, replace copy & paste both of these. Don't use the petitions mod until you have replaced both of them.
admin_petition.asp:
<%
'################################################################################
'## Snitz Forums 2000 v3.4.06
'################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## 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 the 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 the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'################################################################################
'################################################################################
'## MOD: Petition
'## Based on the Guestbook MOD by Michael Reisinger (OneWayMule)
'## Added signature count feature with the help of phy1729
'################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
strQS = Request.QueryString
Response.Redirect "admin_login.asp?target=" & Server.URLEncode(scriptname(ubound(scriptname)) & "?" & strQS)
end if
Response.Write "<table width=""100%"" align=""center"" border=""0"">" & 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,"","") & " Petition Administration<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine
if Request.Form("switch") = "" then
' Do nothing
else
Session("Pswitch")=cInt(Request.Form("switch"))
end if
strsql = "SELECT P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_PAGECOUNT, P_T_MAIL, P_W_MAIL, P_T_AUTHOR, P_T_REPLYTO, P_T_MESSAGE, P_MESSAGE, P_MODERATION, P_ANTISPAM, P_SWITCH FROM " & strTablePrefix & "P_OPTIONS"
Set grs = my_conn.execute(strsql)
strPField1 = grs("P_VARFIELD1")
strPField2 = grs("P_VARFIELD2")
strPField3 = grs("P_VARFIELD3")
strPPageCount = CLng(grs("P_PAGECOUNT"))
strPTMail = grs("P_T_MAIL")
strPWMail = grs("P_W_MAIL")
strPTAuthor = grs("P_T_AUTHOR")
strPTReplyTo = grs("P_T_REPLYTO")
strPTMessage = grs("P_T_MESSAGE")
strPWelcome = grs("P_MESSAGE")
strPModeration = grs("P_MODERATION")
strPAntispam = grs("P_ANTISPAM")
strPSwitch = grs("P_SWITCH")
grs.Close
Set grs = Nothing
strGAction = Request.Querystring("action")
If Not IsNumeric(Request.QueryString("id")) Then
intID = 0
Else
intID = Request.Querystring("id")
End If
Select Case strGAction
'#####################################################################################################
'### DELETE ALL UNAPPROVED PETITION SIGNATURES ###
'######################################################
Case "deleteall"
If Request.QueryString("do") = "yes" Then
strsql = "DELETE FROM " & strTablePrefix & "PETITION WHERE P_MODERATED = 1"
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Unmoderated Petition Entries Deleted!</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" Then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete all unmoderated Petition entries?<br />" & vbNewLine & _
"<a href=""admin_petition.asp?action=deleteall&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### DELETE PETITION SIGNATURE ###
'######################################
Case "delete"
If Request.QueryString("do") = "yes" and intID <> 0 Then
strsql = "DELETE FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 1"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPUnmoderatedCount = countrs("P_COUNT")
Else
intPUnmoderatedCount = 0
End If
countrs.Close
Set countrs = Nothing
If intPUnmoderatedCount > 0 then
strRedirectURL = "petition.asp?method=approve"
Else
strRedirectURL = "petition.asp"
End If
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Deleted!</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=" & strRedirectURL & """>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strRedirectURL & """>Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" and intID <> 0 Then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete this Petition entry?<br />" & vbNewLine & _
"<a href=""admin_petition.asp?action=delete&id=" & intID & "&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### APPROVE ALL UNMODERATED PETITION ENTRIES ###
'#####################################################
Case "approveall"
If Request.QueryString("do") = "yes" Then
strsql = "UPDATE " & strTablePrefix & "PETITION SET P_MODERATED = 0 WHERE P_MODERATED = 1"
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Unmoderated Petition Entries Approved!</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" Then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to approve all unmoderated Petition entries?<br />" & vbNewLine & _
"<a href=""admin_petition.asp?action=approveall&do=yes"">Yes</a> | <a href=""petition.asp?action=view&method=approve"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### APPROVE PETITION SIGNATURE ###
'######################################
Case "approve"
If Request.QueryString("do") = "yes" and intID <> 0 Then
strsql = "UPDATE " & strTablePrefix & "PETITION SET"
strsql = strsql & " P_MODERATED = 0 WHERE P_ID=" & intID
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
'### SEND THANK YOU EMAIL
If strPTMail = 1 Then
strsql = "SELECT P_ID, P_NAME, P_EMAIL FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
set grs = my_conn.Execute(strsql)
strRecipientsName = grs("P_NAME")
strRecipients = grs("P_EMAIL")
strFrom = strPTReplyTo
strFromName = strPTAuthor
strSubject = "Thank you for signing " & strForumTitle & "'s Petition"
strMessage = strPTMessage
strSender = strFrom
grs.Close
Set grs = Nothing
%><!--#include file="inc_mail.asp" --><%
End If
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 1"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPUnmoderatedCount = countrs("P_COUNT")
Else
intPUnmoderatedCount = 0
End If
countrs.Close
Set countrs = Nothing
If intPUnmoderatedCount > 0 then
strRedirectURL = "petition.asp?method=approve"
Else
strRedirectURL = "petition.asp"
End If
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Approved!</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=" & strRedirectURL & """>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strRedirectURL & """>Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" and intID <> 0 Then
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Approve this Petition entry?<br />" & vbNewLine & _
"<a href=""admin_petition.asp?action=approve&id=" & intID & "&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### EDIT PETITION SIGNATURE ###
'####################################
Case "edit"
If intID = 0 Then Response.Redirect("petition.asp")
If Request.QueryString("do") = "yes" Then
strFormName = ChkString(Request.Form("name"), "SQLString")
strFormEmail = ChkString(Request.Form("email"), "SQLString")
strFormMessage = ChkString(Request.Form("message"), "message")
strFormField1 = ChkString(Request.Form("field1"),"SQLString")
strFormField2 = ChkString(Request.Form("field2"),"SQLString")
strFormField3 = ChkString(Request.Form("field3"),"SQLString")
If strFormField1 = "" Then
strFormField1 = " "
End If
If strFormField2 = "" Then
strFormField2 = " "
End If
If strFormField3 = "" Then
strFormField3 = " "
End If
If Request.Form("name") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a name</li>" & vbNewLine
End If
If Request.Form("email") = "" Then
Err_Msg = Err_Msg & "<li>Please enter an email address</li>" & vbNewLine
End If
If Request.Form("message") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a message</li>" & vbNewLine
End if
If strPField1Req = 1 and trim(strFormField1) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField1 & "</li>" & vbNewLine
End If
If strPField2Req = 1 and trim(strFormField2) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField2 & "</li>" & vbNewLine
End If
If strPField3Req = 1 and trim(strFormField3) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField3 & "</li>" & vbNewLine
End If
If Err_Msg <> "" Then
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>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHiLiteFontColor & """><ul>" & Err_Msg & "</ul>" & vbNewLine & _
" </font>" & vbNewLine & _
" </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
WriteFooter
Response.End
Else
strsql = "UPDATE " & strTablePrefix & "PETITION SET"
strsql = strsql & " P_NAME='" & strFormName & "'"
strsql = strsql & ", P_EMAIL='" & strFormEmail & "'"
strsql = strsql & ", P_MESSAGE='" & strFormMessage & "'"
strsql = strsql & ", P_SWITCH="& strFormSwitch
If strPField1E = 1 Then
strsql = strsql & ", P_VARFIELD1='" & strFormField1 & "'"
End If
If strPField2E = 1 Then
strsql = strsql & ", P_VARFIELD2='" & strFormField2 & "'"
End If
If strPField3E = 1 Then
strsql = strsql & ", P_VARFIELD3='" & strFormField3 & "'"
End If
strsql = strsql & " WHERE P_ID=" & intID
my_conn.execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Updated!</font></p>" & vbNewLine & _
"<meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank You!</font></p>" & vbNewLine & _
"<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p><br />" & vbNewLine
End if
Else
strsql = "SELECT P_ID, P_NAME, P_EMAIL, P_MESSAGE, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_SWITCH FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
set grs = my_conn.Execute(strsql)
strTempID = grs("P_ID")
strTempName = grs("P_NAME")
strTempEmail = grs("P_EMAIL")
strTempMessage = grs("P_MESSAGE")
strTempDate = grs("P_DATE")
strTempSwitch = grs("P_SWITCH")
If strPField1E = 1 Then
strTempField1 = grs("P_VARFIELD1")
End If
If strPField2E = 1 Then
strTempField2 = grs("P_VARFIELD2")
End if
If strPField3E = 1 then
strTempField3 = grs("P_VARFIELD3")
End if
grs.Close
Set grs = Nothing
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _
" <form method=""post"" action=""admin_petition.asp?action=edit&do=yes&id=" & intID & """ name=""PostTopic"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Edit Petition Entry</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Your Name:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""name"" maxlength=""50"" value=""" & chkString(strTempName,"display") & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Email:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""email"" maxlength=""50"" value=""" & chkString(strTempEmail,"display") & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
If strPField1E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField1 & ":</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field1"" maxlength=""100"" value=""" & strTempField1 & """ size=""35"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField2E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField2 & ":</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field2"" maxlength=""100"" value=""" & strTempField2 & """ size=""35"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField3E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField3 & ":</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field3"" maxlength=""100"" value=""" & strTempField3 & """ size=""35"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
%>
<!--#include file="inc_post_buttons.asp""-->
<%
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Message:</b> <br /><br />" & vbNewLine & _
" <table border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap>" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
If strAllowHTML = "1" Then
Response.Write " * HTML is ON<br />" & vbNewLine
Else
Response.Write " * HTML is OFF<br />" & vbNewLine
End If
If strAllowForumCode = "1" Then
Response.Write " * <a href=""JavaScript:openWindow6('pop_forum_code.asp')"" tabindex=""-1"">Forum Code</a> is ON<br />" & vbNewLine
Else
Response.Write " * Forum Code is OFF<br />" & vbNewLine
End if
If strIcons = "1" and strShowSmiliesTable = "1" Then
%>
<!--#INCLUDE FILE="inc_smilies.asp" -->
<%
End If
Response.Write " </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""45"" name=""Message"" rows=""11"" wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & CleanCode(strTempMessage) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""center"" colspan=""2"">" & vbNewLine & _
" <input name=""Submit"" type=""submit"" value="" Submit "">" & vbNewLine & _
" <input name=""Preview"" type=""button"" value="" Preview "" onclick=""OpenPreview()"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table>" & vbNewLine & _
"<br />" & vbNewLine
end if
'#####################################################################################################
'### FORM SUBMISSION CHECK ###
'#################################
Case "options_info"
strFormWelcome = ChkString(Request.Form("petitionwelcome"),"message")
strFormTMessage = ChkString(Request.Form("tmessage"),"SQLString")
strFormPageCount = CLng(Request.Form("pagecount"))
strFormField1 = ChkString(Request.Form("field1"),"SQLString")
strFormField2 = ChkString(Request.Form("field2"),"SQLString")
strFormField3 = ChkString(Request.Form("field3"),"SQLString")
strFormTAuthor = ChkString(Request.Form("tauthor"),"SQLSTring")
strFormTReplyTo = ChkString(Request.Form("treplyto"),"email")
strFormSwitch = CLng(Request.Form("switch"))
If Request.Form("field1e") = "1" Then
strFormField1e = 1
Else
strFormField1e = 0
End If
If Request.Form("field2e") = "1" Then
strFormField2e = 1
Else
strFormField2e = 0
End If
If Request.Form("field3e") = "1" Then
strFormField3e = 1
Else
strFormField3e = 0
End If
If Request.Form("field1r") = "1" Then
strFormField1r = 1
Else
strFormField1r = 0
End If
If Request.Form("field2r") = "1" Then
strFormField2r = 1
Else
strFormField2r = 0
End If
If Request.Form("field3r") = "1" Then
strFormField3r = 1
Else
strFormField3r = 0
End If
If Request.Form("moderation") = "1" Then
strFormModeration = 1
Else
strFormModeration = 0
End If
If Request.Form("temail") = "1" Then
strFormTEmail = 1
Else
strFormTEMail = 0
End If
If Request.Form("wemail") = "1" Then
strFormWEmail = 1
Else
strFormWEMail = 0
End If
If Request.Form("antispam") = "1" Then
strFormAntispam = 1
Else
strFormAntispam = 0
End If
'strFormSwitch=Session("PSwitch")
if strFormSwitch<>strPSwitch then strFormSwitch=abs(strPSwitch+(-1))
Err_Msg = ""
If trim(strFormWelcome) = "" Then
Err_Msg = Err_Msg & "<li>You must enter a Petition Statement</li>" & vbNewLine
End If
If (trim(strFormField1) = "" and strFormField1e = 1) or (trim(strFormField2) = "" and strFormField2e = 1) or (trim(strFormField3) = "" and strFormField3e = 1) Then
Err_Msg = Err_Msg & "<li>You must enter an Optional Field title if you want to enable it</li>" & vbNewLine
End If
If (strFormField1e = 0 and strFormField1r = 1) or (strFormField2e = 0 and strFormField2r = 1) or (strFormField3e = 0 and strFormField3r = 1) Then
Err_Msg = Err_Msg & "<li>You must enable an Optional Field if you want to make it required</li>" & vbNewLine
End If
If trim(strFormTAuthor) = "" Then
Err_Msg = Err_Msg & "<li>You must enter a From Name</li>" & vbNewLine
End If
If trim(strFormTReplyTo) = "" or not EmailField(strFormTReplyTo) Then
Err_Msg = Err_Msg & "<li>You must enter a valid From Email</li>" & vbNewLine
End If
If Err_Msg = "" Then
strsql = "UPDATE " & strTablePrefix & "P_OPTIONS SET "
strsql = strsql & " P_VARFIELD1='" & strFormField1 & "', "
strsql = strsql & " P_VARFIELD2='" & strFormField2 & "', "
strsql = strsql & " P_VARFIELD3='" & strFormField3 & "', "
strsql = strsql & " P_MESSAGE = '" & strFormWelcome & "', "
strsql = strsql & " P_PAGECOUNT=" & strFormPageCount & ", "
strsql = strsql & " P_T_MAIL=" & strFormTEmail & ", "
strsql = strsql & " P_W_MAIL=" & strFormWEmail & ", "
strsql = strsql & " P_T_AUTHOR='" & strFormTAuthor & "', "
strsql = strsql & " P_T_REPLYTO='" & strFormTReplyTo & "', "
strsql = strsql & " P_T_MESSAGE='" & strFormTMessage & "', "
strsql = strsql & " P_MODERATION=" & strFormModeration & ", "
strsql = strsql & " P_ANTISPAM=" & strFormAntispam & ", "
strsql = strsql & " P_SWITCH=" & strFormSwitch & " "
strsql = strsql & " WHERE P_ID=1"
my_conn.execute(strsql)
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Configuration Posted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=admin_home.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_petition.asp"">Back To Petition Admin</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
'#####################################################################################################
'### OPTIONS MAIN PAGE ###
'#############################
Case Else
Response.Write "<table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <form action=""admin_petition.asp?action=options_info"" method=""post"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""1"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Petition Administration</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""1"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Petitions: </b>" & vbNewLine & _
" </font>" & vbNewLine & _
" <input type=""radio"" name=""switch"" value=""1"" " & chkCheckbox("1",strPSwitch,true) & ">On " & vbNewLine & _
" <input type=""radio"" name=""switch"" value=""0"" " & chkCheckbox("1",strPSwitch,false) & ">Off" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Petition Options</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Petition Statement:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""70"" name=""petitionwelcome"" rows=""15"" wrap=""VIRTUAL"">" & CleanCode(strPWelcome) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Moderate Petition Entries:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""moderation"" value=""1"" " & chkCheckbox("1",strPModeration,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""moderation"" value=""0"" " & chkCheckbox("1",strPModeration,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Enable Antispam Confirmation:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""antispam"" value=""1"" " & chkCheckbox("1",strPAntispam,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""antispam"" value=""0"" " & chkCheckbox("1",strPAntispam,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Signatures Per Page:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <select name=""pagecount"">" & vbNewLine & _
" <option value=""5"" " & chkSelect(5,strPPageCount) & ">5</option>" & vbNewLine & _
" <option value=""10"" " & chkSelect(10,strPPageCount) & ">10</option>" & vbNewLine & _
" <option value=""15"" " & chkSelect(15,strPPageCount) & ">15</option>" & vbNewLine & _
" <option value=""20"" " & chkSelect(20,strPPageCount) & ">20</option>" & vbNewLine & _
" <option value=""25"" " & chkSelect(25,strPPageCount) & ">25</option>" & vbNewLine & _
" <option value=""50"" " & chkSelect(50,strPPageCount) & ">50</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Email Options</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Send Thank You Email:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""temail"" value=""1"" " & chkCheckbox("1",strPTMail,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""temail"" value=""0"" " & chkCheckbox("1",strPTMail,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>From Name:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""text"" maxlength=""100"" size=""35"" name=""tauthor"" value=""" & chkString(strPTAuthor,"display") & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>From Email:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""text"" maxlength=""100"" size=""35"" name=""treplyto"" value=""" & chkString(strPTReplyTo,"display") & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Thank You Email Message:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""70"" name=""tmessage"" rows=""15"" wrap=""VIRTUAL"">" & CleanCode(strPTMessage) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Notify Admin Via Email:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""wemail"" value=""1"" " & chkCheckbox("1",strPWMail,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""wemail"" value=""0"" " & chkCheckbox("1",strPWMail,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Additional Fields Options</b>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 1:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field1"" maxlength=""100"" value=""" & strPField1 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field1e"" value=""1"" " & chkCheckBox("1",strPField1E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field1r"" value=""1"" " & chkCheckBox("1",strPField1Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 2:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field2"" maxlength=""100"" value=""" & strPField2 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field2e"" value=""1"" " & chkCheckBox("1",strPField2E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field2r"" value=""1"" " & chkCheckBox("1",strPField2Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 3:</b> " & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field3"" maxlength=""100"" value=""" & strPField3 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field3e"" value=""1"" " & chkCheckBox("1",strPField3E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field3r"" value=""1"" " & chkCheckBox("1",strPField3Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""center"" colspan=""2"">" & vbNewLine & _
" <input name=""Submit"" type=""submit"" value="" Submit "">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
"</table><br />" & vbNewLine
End Select
WriteFooter()
%>
Last one
petition.asp
<%
'################################################################################
'## Snitz Forums 2000 v3.4.06
'################################################################################
'## Copyright (C) 2000-06 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## 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 the 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 the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'################################################################################
'## MOD: Petition
'## Modified from the Guestbook MOD by Leatherlips
'## Based on the Guestbook MOD by Michael Reisinger (OneWayMule)
'## Added signature count feature with the help of phy1729
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="googiespell/inc_googie.asp" -->
<%
'Check Petitions on
set my_Conn=Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString
strSql="SELECT P_SWITCH FROM " & strTablePrefix & "P_OPTIONS"
set rsswitch = my_Conn.Execute(strSql)
if (not rsswitch.BOF and not rsswitch.EOF) then
strPSwitch=rsswitch("P_SWITCH")
rsswitch.close
set rsswitch=nothing
'Get Petition Count SQL
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strTablePrefix & "PETITION WHERE P_MODERATED = 0"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPCount = countrs("P_COUNT")
Else
intPCount = 0
End If
countrs.Close
Set countrs = Nothing
'Get Petition Count Code Above
end if
if strPSwitch=0 then
Response.Redirect "default.asp"
end if
strRCCode = Request.QueryString("rc")
strRC = Request.QueryString("code")
strRCP = Request.QueryString("p")
If strRC = "image" then
NullStop = False
RandCode = (strRCCode + 17456) / 50000
lenCode = Len(RandCode)
If LenCode < 6 and Nullstop = False then
For J = 1 to (6 - LenCode)
NullRC = NullRC & "0"
Next
NullStop = True
End If
RandCode = NullRC & RandCode
ImageP = Mid(RandCode, strRCP,1)
Response.Redirect "images/" & ImageP & ".gif"
End If
strsql = "SELECT P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_PAGECOUNT, P_T_MAIL, P_W_MAIL, P_T_AUTHOR, P_T_REPLYTO, P_T_MESSAGE, P_MESSAGE, P_MODERATION, P_ANTISPAM FROM " & strTablePrefix & "P_OPTIONS WHERE P_ID=1"
Set grs = my_conn.execute(strsql)
strPField1 = grs("P_VARFIELD1")
strPField2 = grs("P_VARFIELD2")
strPField3 = grs("P_VARFIELD3")
strPPageCount = CLng(grs("P_PAGECOUNT"))
strPTMail = grs("P_T_MAIL")
strPWMail = grs("P_W_MAIL")
strPTAuthor = grs("P_T_AUTHOR")
strPTReplyTo = grs("P_T_REPLYTO")
strPTMessage = grs("P_T_MESSAGE")
strPWelcome = grs("P_MESSAGE")
strPModeration = grs("P_MODERATION")
strPAntispam = grs("P_ANTISPAM")
grs.Close
Set grs = Nothing
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 0"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPCount = countrs("P_COUNT")
Else
intPCount = 0
End If
countrs.Close
Set countrs = Nothing
'##### Added to prevent same email address and name to sign the petition #####
'## Forum_SQL
strSql = "SELECT P_NAME FROM " & strMemberTablePrefix & "PETITION "
strSql = strSql & " WHERE P_NAME = '" & ChkString(Trim(Request.Form("Name")), "SQLString") &"'"
set rs = my_Conn.Execute (strSql)
if rs.BOF and rs.EOF then
'## Do Nothing
else
Err_Msg = Err_Msg & "<li>This name has already signed the petition.</li>"
end if
rs.close
set rs = nothing
'## Forum_SQL
strSql = "SELECT P_EMAIL FROM " & strMemberTablePrefix & "PETITION "
strSql = strSql & " WHERE P_EMAIL = '" & Trim(chkString(Request.Form("Email"),"SQLString")) &"'"
set rs = my_Conn.Execute(TopSQL(strSql,1))
if rs.BOF and rs.EOF then
'## Do Nothing
else
Err_Msg = Err_Msg & "<li>This email address has already been used to sign the petition.</li>"
end if
set rs = nothing
'##### Above added to prevent same email address and name to sign the petition #####
strAction = Request.Querystring("action")
If strAction = "" Then
strAction = "view"
End If
strMethod = Request.QueryString("method")
If strMethod = "approve" Then
strSortPaging = "&method=approve"
Else
strSortPaging = ""
End If
strSortMethod = Request.Querystring("sortby")
If strSortMethod = "" Then
strSortMethod = "DESC"
End If
If Not IsNumeric(Request.Querystring("page")) or Request.QueryString("page") = "" Then
intPage = 1
Else
intPage = CLng(Request.QueryString("page"))
End If
Response.Write " <script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
" function ChangePage(fnum){" & vbNewLine & _
" if (fnum == 1) {" & vbNewLine & _
" document.PageNum1.submit();" & vbNewLine & _
" }" & vbNewLine & _
" else {" & vbNewLine & _
" document.PageNum2.submit();" & vbNewLine & _
" }" & vbNewLine & _
" }" & vbNewLine & _
" </script>" & vbNewLine
If strAction <> "sign_info" Then
Response.Write " <table width=""100%"" border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine & _
" " & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Petition</font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <table border=""1"" width=""60%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""2"" class=""header""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine & _
" <center><b>"&strForumTitle&" Petition</b></center></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strForumCellColor & """ colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
" " & formatStr(strPWelcome) & "" & vbNewLine
Select Case intPCount
Case 0
Response.Write " <b><br><br>There are no signatures yet. Be the first one to sign this Petition!</b>" & vbNewLine
Case 1
Response.Write " <b><br><br>There is 1 signature.</b>" & vbNewLine
Case Else
Response.Write " <b><br><br>There are " & intPCount & " signatures.</b>" & vbNewLine
End Select
If mLev = 4 Then
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 1"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPUnmoderatedCount = countrs("P_COUNT")
Else
intPUnmoderatedCount = 0
End If
countrs.Close
Set countrs = Nothing
Select Case intPUnmoderatedCount
Case 0
Response.Write ""
Case 1
Response.Write " <a href=""petition.asp?action=view&method=approve"">(1 signature awaiting approval)</a>"
Case Else
Response.Write " <a href=""petition.asp?action=view&method=approve"">(" & intPUnmoderatedCount & " entries awaiting approval)</a>"
End Select
End If
Response.Write " <br /><br />" & vbNewLine
if mLev>2 then
Response.Write " <a href=""JavaScript:openWindow5('petition_print.asp')"">" & getCurrentIcon(strIconPrint,"","align=""absmiddle""") & "</a> |" & vbNewLine
end if
Response.Write " <a href=""petition.asp?action=sign"">Sign it</a> | <a href=""petition.asp?action=view"">View it</a><br />" & vbNewLine &_
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine
End If
Select Case strAction
'#####################################################################################################
'### VIEW PETITION / MAIN PAGE ###
'######################################
Case "view"
If intPCount > 0 Or (mLev = 4 And intPUnmoderatedCount > 0) Then
If strMethod = "approve" And mLev = 4 Then
strsql = "SELECT P_ID, P_NAME, P_EMAIL, P_MESSAGE, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_IP FROM " & strTablePrefix & "PETITION WHERE P_MODERATED = 1 ORDER BY P_ID " & strSortMethod
Else
strsql = "SELECT P_ID, P_NAME, P_EMAIL, P_MESSAGE, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_IP FROM " & strTablePrefix & "PETITION WHERE P_MODERATED = 0 ORDER BY P_ID " & strSortMethod
End If
Set grs = Server.CreateObject("ADODB.Recordset")
grs.CursorLocation = 3
grs.CursorType = 3
grs.Open strsql, my_Conn
if not grs.BOF and not grs.EOF then
grs.PageSize = strPPageCount
grs.CacheSize = grs.PageSize
strGTotalPages = grs.PageCount
grs.absolutepage = intPage
rec = 0
intPNum=intPCount-(intPage-1)*strPPageCount
If strGTotalPages > 1 Then
Response.Write " <table border=""1"" width=""60%"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td colspan=""2"" align=""right"" valign=""bottom"">" & vbNewLine & _
" <table border=""0"" align=""right"">" & vbNewLine & _
" <tr>" & vbNewLine
Call DropDownPaging(1)
Response.Write " </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
End If
Response.Write " <table border=""1"" width=""60%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""left"" colspan=""2"" class=""header""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>" & vbNewLine
If strMethod = "approve" And mLev = 4 Then
Response.Write " <table border=""0"" cellspacing=""0"" cellpadding=""0"" width=""100%""><tr><td width=""50%"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Signatures Awaiting Approval</b></font></td>" & vbNewLine & _
" <td width=""50%"" align=""right""><a href=""admin_petition.asp?action=approveall"" title=""Approve All Unapproved Entries""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>Approve All</font></a>" & vbNewLine & _
" <a href=""admin_petition.asp?action=deleteall"" title=""Delete All Unapproved Entries""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>Delete All</font></a></td></tr></table>" & vbNewLine
Else
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Signatures</b></font>" & vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
do until rec = grs.PageSize or grs.eof
strTempID = grs("P_ID")
strTempName = grs("P_NAME")
strTempEmail = grs("P_EMAIL")
strTempMessage = grs("P_MESSAGE")
strTempDate = grs("P_DATE")
If grs("P_VARFIELD1") <> "" and strPField1E = 1 Then
strTempField1 = grs("P_VARFIELD1")
Else
strTempField1 = ""
End If
If grs("P_VARFIELD2") <> "" and strPField2E = 1 Then
strTempField2 = grs("P_VARFIELD2")
Else
strTempField2 = ""
End If
If grs("P_VARFIELD3") <> "" and strPField3E = 1 Then
strTempField3 = grs("P_VARFIELD3")
Else
strTempField3 = ""
End If
strTempIP = grs("P_IP")
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ valign=""top"" colspan=""2"">" & vbNewLine & _
" <table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%""><tr><td align=""left"" width=""90%"">" & vbNewLine & _
" <font color=""" & strCategoryFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>Signature #" & intPNum & ": Signed by</font>" & vbNewLine & _
" <font color=""" & strCategoryFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b><span class=""spnMessageText"">" & ChkString(strTempName,"display") & "</span></b></font>" & vbNewLine & _
" <font color=""" & strCategoryFontColor & """ face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>- " & chkDate(strTempDate," :",true) & "</font>" & vbNewLine
If mLev = 4 And trim(strTempEmail) <> "" Then
Response.Write " <a href=""mailto:" & strTempEmail & """ target=""_blank"">" & getCurrentIcon(strIconEmail,"Email Poster","align=""absmiddle"" hspace=""6""") & "</a>"
End If
If mLev > 2 Then
Response.Write " " & getCurrentIcon(strIconIP,strTempName & "'s IP Address: " & strTempIP & "","align=""absmiddle"" hspace=""6""") & vbNewLine & _
" <a href=""admin_petition.asp?action=edit&id=" & strTempID & """ title=""Edit this Signature"">" & getCurrentIcon(strIconEditTopic,"Edit this Signature","align=""absmiddle"" hspace=""6""") & "</a>" & vbNewLine & _
" <a href=""admin_petition.asp?action=delete&id=" & strTempID & """ title=""Delete This Signature"">" & getCurrentIcon(strIconDeleteReply,"Delete this Signature","align=""absmiddle"" hspace=""6""")& "</a>" & vbNewLine
End If
If strMethod = "approve" And mLev = 4 Then
Response.Write " <a href=""admin_petition.asp?action=approve&id=" & strTempID & """ title=""Approve This Signature"">" & getCurrentIcon(strIconFolderModerate,"Approve This Signature","align=""absmiddle"" hspace=""6""")& "</a>" & vbNewLine
End If
Response.Write " </td><td width=""10%"" align=""right"">" & vbNewLine & _
" <a href=""#top"">" & getCurrentIcon(strIconGoUp,"Go To Top Of Page","align=""right""") & "</a>" & vbNewLine & _
" </td></tr></table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine
If trim(strTempField1) <> "" or trim(strTempField2) <> "" or trim(strTempField3) <> "" Then
Response.Write " <td bgcolor=""" & strForumCellColor & """ width=""15%"" nowrap valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine
If trim(strTempField1) <> "" Then
Response.Write " <b>" & strPField1 & ":</b> " & strTempField1 & "<br />" & vbNewLine
End If
If trim(strTempField2) <> "" Then
Response.Write " <b>" & strPField2 & ":</b> " & strTempField2 & "<br />" & vbNewLine
End If
If trim(strTempField3) <> "" Then
Response.Write " <b>" & strPField3 & ":</b> " & strTempField3 & "<br />" & vbNewLine
End If
Response.Write " </font>" & vbNewLine & _
" </td>" & vbNewLine
End If
Response.Write " <td bgcolor=""" & strForumCellColor & """ valign=""top"" align=""left"""
If trim(strTempField1) = "" and trim(strTempField2) = "" and trim(strTempField3) = "" Then
Response.Write " width=""100%"" colspan=""2"">" & vbNewLine
Else
Response.Write " width=""85%"">" & vbNewLine
End If
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strForumFontColor & """>" & vbNewLine & _
" " & formatStr(strTempMessage) & "</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
grs.MoveNext
rec = rec + 1
intPNum = intPNum - 1
Loop
grs.Close
Set grs = Nothing
end if
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ align=""left"" colspan=""2"">" & vbNewLine & _
" <table border=""0"" width=""100%"" cellpadding=""0"" cellspacing=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td> </td>" & vbNewLine
Call SortSelect()
Response.Write " </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
If strGTotalPages > 1 Then
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td colspan=""2"">" & vbNewLine & _
" <table border=""0"" align=""left"">" & vbNewLine & _
" <tr>" & vbNewLine
Call DropDownPaging(2)
Response.Write " </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
End If
Response.Write " <br />" & vbNewLine
End If
'#####################################################################################################
'### SIGN PETITION ###
'##########################
Case "sign"
Response.Write " <table border=""0"" width=""60%"" cellspacing=""0"" cellpadding=""1"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _
" <form method=""post"" action=""petition.asp?action=sign_info"" name=""PostTopic"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><center><b>Sign the Petition</b></center></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Your First & Last Name:</b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""name"" maxlength=""50"" size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Your Email:</b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""email"" maxlength=""50"" value="""" size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required but will not be made public)</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
If strPField1E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField1 & ":</b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field1"" maxlength=""100"" value="""" size=""35"">" & vbNewLine
If strPField1Req = 1 Then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField2E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField2 & ":</b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field2"" maxlength=""100"" value="""" size=""35"">" & vbNewLine
If strPField2Req = 1 Then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField3E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField3 & ":</b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field3"" maxlength=""100"" value="""" size=""35"">" & vbNewLine
If strPField3Req = 1 Then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
%>
<!--#include file="inc_post_buttons_basic.asp""-->
<%
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Message:</b><br /><br />" & vbNewLine & _
" <table border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
If strAllowHTML = "1" Then
Response.Write " * HTML is ON<br />" & vbNewLine
Else
Response.Write " * HTML is OFF<br />" & vbNewLine
End If
If strAllowForumCode = "1" Then
Response.Write " * <a href=""JavaScript:openWindow6('pop_forum_code.asp')"" tabindex=""-1"">Forum Code</a> is ON<br />" & vbNewLine
Else
Response.Write " * Forum Code is OFF<br />" & vbNewLine
End if
If strIcons = "1" and strShowSmiliesTable = "1" Then
' <!--#INCLUDE FILE="inc_smilies.asp" -->
End If
Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea id=""ta1"" class=""textarea"" cols=""70"" name=""Message"" rows=""11"" wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);""></textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
If strPAntispam = 1 Then
HowManyNbr = 6
NumbersToShow = ""
Randomize
For I = 1 to HowManyNbr
NumbersToShow = NumbersToShow & Fix(9*Rnd)
Next
RandomizedCode = NumbersToShow * 50000 - 17456
NullStop = False
Response.Write " <tr>" & vbNewLine & _
" <td valign=""top"" align=""center"" colspan=""2"" bgcolor=""" & strCategoryCellColor & """>" & vbNewLine & _
" <b><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """>Anti SPAM Confirmation</font></b>" & vbNewLine & _
" </td>"& vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""center"" bgColor=""" & strPopUpTableColor & """ colspan=""2"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>As an additional security measure, please enter the 6 digit code shown below.</b></font>" & vbNewLine & _
" </td>"& vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """ align=""right"">" & vbNewLine
For I = 1 to HowManyNbr
Response.Write " <img src=""petition.asp?code=image&rc=" & RandomizedCode &"&p=" & I & """ border=""0"" alt=""Code"" width=""8"" height=""12"">"& vbNewLine
Next
Response.Write " <input type=""hidden"" name=""regid"" value="""& RandomizedCode &""">" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgColor=""" & strPopUpTableColor & """>" & vbNewLine & _
" <input type=""text"" size=""7"" maxlength=""6"" name=""P_code"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""center"" colspan=""2"">" & vbNewLine & _
" <input name=""Submit"" type=""submit"" value=""Sign Petition"">" & vbNewLine & _
" <input name=""Preview"" type=""button"" value="" Preview "" onclick=""OpenPreview()""><span id=""spell_container""></span><SCRIPT type=""text/javascript""> var googie1 = new GoogieSpell(""googiespell/"", ""./googiespell/googie.asp?lang=""); googie1.setSpellContainer(""spell_container""); googie1.decorateTextarea(""ta1"");</SCRIPT>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine
Case "sign_info"
strFormName = ChkString(Request.Form("name"), "SQLString")
strFormEmail = ChkString(Request.Form("email"), "SQLString")
strFormDate = DateToStr(strForumTimeAdjust)
strFormMessage = ChkString(Request.Form("message"), "message")
strFormField1 = ChkString(Request.Form("field1"),"SQLString")
strFormField2 = ChkString(Request.Form("field2"),"SQLString")
strFormField3 = ChkString(Request.Form("field3"),"SQLString")
strFormIP = Request.ServerVariables("REMOTE_ADDR")
If strFormField1 = "" Then
strFormField1 = " "
End If
If strFormField2 = "" Then
strFormField2 = " "
End If
If strFormField3 = "" Then
strFormField3 = " "
End If
If Request.Form("name") = "" Then
Err_Msg = Err_Msg & "<li>Please enter your name</li>" & vbNewLine
End If
If Request.Form("email") = "" Then
Err_Msg = Err_Msg & "<li>Please enter your email address</li>" & vbNewLine
End If
' If Request.Form("message") = "" Then
' Err_Msg = Err_Msg & "<li>Please enter a message</li>" & vbNewLine
' End if
If strPField1Req = 1 and trim(strFormField1) = "" Then
Err_Msg = Err_Msg & "<li>Please enter your " & strPField1 & "</li>" & vbNewLine
End If
If strPField2Req = 1 and trim(strFormField2) = "" Then
Err_Msg = Err_Msg & "<li>Please enter your " & strPField2 & "</li>" & vbNewLine
End If
If strPField3Req = 1 and trim(strFormField3) = "" Then
Err_Msg = Err_Msg & "<li>Please enter your " & strPField3 & "</li>" & vbNewLine
End If
If strPAntispam = 1 Then
RandCode = Request.Form("P_code")
strRCCode = Request.Form("regid")
RandCode2 = (strRCCode + 17456) / 50000
lenCode = Len(RandCode2)
NullStop = False
If LenCode < 6 and Nullstop = False then
For J = 1 to (6 - LenCode)
NullRC = NullRC & "0"
Next
NullStop = True
End If
RandCode2 = NullRC & RandCode2
If RandCode <> RandCode2 then
Err_Msg = Err_Msg & "<li>You did not enter the confirmation code or it is incorrect!</li>"
End If
End If
If Err_Msg <> "" Then
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
WriteFooter
Response.End
Else
strsql = "INSERT INTO " & strTablePrefix & "PETITION (P_NAME, P_EMAIL, P_MESSAGE, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_IP, P_MODERATED)"
strsql = strsql & " VALUES('" & strFormName & "', '" & strFormEmail & "', '" & strFormMessage & "', '" & strFormDate & "', '" & strFormField1 & "', '" & strFormField2 & "', '" & strFormField3 & "', '" & strFormIP & "', " & strPModeration & ")"
my_conn.execute(strsql),,adCmdText + adExecuteNoRecords
If strEmail = "1" Then
'### SEND THANK YOU EMAIL
If strPTMail = 1 and strPModeration = 0 Then
strRecipientsName = strFormName
strRecipients = strFormEmail
strFrom = strPTReplyTo
strFromName = strPTAuthor
strSubject = "Thank you for signing the "&strForumTitle&" Petition"
strMessage = strPTMessage
strSender = strFrom
%>
<!--#include file="inc_mail.asp" -->
<%
End If
'### NOTIFY ADMIN
If strPWMail = 1 Then
strRecipientsName = strPTAuthor
strRecipients = strPTReplyTo
strFrom = strFormEmail
strFromName = strFormName
strSubject = "New Signature in your Petition"
strMessage = strFormName & " has signed your petition located at " & strForumURL & "."
strSender = strFrom
%>
<!--#include file="inc_mail.asp" -->
<%
End If
End If
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Your Signature Has Been Added To The Petition!</font></p>" & vbNewLine
If strPModeration = 1 Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>It will appear once approved by the administrator.</font></p>" & vbNewLine
End If
Response.Write " <meta http-equiv=""Refresh"" content=""30; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank You!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p><br />" & vbNewLine
End if
End Select
Sub SortSelect()
Response.Write " <form name=""sortmethod"" method=""get"" action=""petition.asp"">" & vbNewLine & _
" <input type=""hidden"" name=""action"" value=""view"">" & vbNewLine & _
" <input type=""hidden"" name=""method"" value=""" & strMethod & """>" & vbNewLine & _
" <td align=""right"" colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strHeadFontColor & """>" & vbNewLine & _
" <input type=""hidden"" name=""page"" value=""" & Request.querystring("page") & """>" & vbNewLine & _
" <b>Sort by: " & vbNewLine & _
" <select name=""sortby"" onChange=""document.sortmethod.submit();"" style=""font-size:10px;"">" & vbNewLine & _
" <option value=""DESC"" " & chkSelect("DESC", strSortMethod) & "> Last Post First</option>" & vbNewLine & _
" <option value=""ASC"" " & chkSelect("ASC", strSortMethod) & "> First Post First</option>" & vbNewLine & _
" </select></b></font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </form>" & vbNewLine
End Sub
sub DropDownPaging(fnum)
Response.Write " <form name=""PageNum" & fnum & """ action=""petition.asp"">" & vbNewLine & _
" <input type=""hidden"" name=""action"" value=""view"">" & vbNewLine & _
" <input type=""hidden"" name=""method"" value=""" & strMethod & """>" & vbNewLine & _
" <td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input name=""sortby"" type=""hidden"" value=""" & strSortMethod & """>" & vbNewLine & _
" <b>Page: <select name=""page"" size=""1"" onchange=""ChangePage(" & fnum & ");"">" & vbNewLine
for counter = 1 to strGTotalPages
if counter <> intPage then
Response.Write " <option value=""" & counter & """>" & counter & "</option>" & vbNewLine
else
Response.Write " <option selected value=""" & counter & """>" & counter & "</option>" & vbNewLine
end if
next
Response.Write " </select> of " & strGTotalPages & "</b>" & vbNewLine & _
" </font></td>" & vbNewLine & _
" </form>" & vbNewLine
end sub
WriteFooter()
%>
|
|
|
leatherlips
Senior Member
USA
1838 Posts |
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 31 July 2008 : 19:53:55
|
There are 3 custom fields in the mod AFTER I deleted those 6 - and all 3 are functional. There were 9 custom fields altogether, as well as another 7-8 which had specific uses that were never used.
Ridding yourself of unused variables will fix your problem, I believe. Three of those variables aren't accessed by any menu & are required as fields in the database. < |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 31 July 2008 : 21:15:55
|
I fixed it. There were some lines of P_Switch that weren't needed. My new file is here:
<%
'#################################################################################
'## Snitz Forums 2000 v3.4.04
'#################################################################################
'## Copyright (C) 2000-04 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or (at your option) any later version.
'##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## 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 the 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 the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
'##
'## Support can be obtained from our support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## manderson@snitz.com
'##
'#################################################################################
'## MOD: Petition
'## Modified from the Guestbook MOD by Leatherlips
'## Based on the Guestbook MOD by Michael Reisinger (OneWayMule)
'## Added signature count feature with the help of phy1729
'## Added On/Off feature and print feature with the help of Carefree
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!--#INCLUDE FILE="inc_func_posting.asp" -->
<!--#INCLUDE FILE="inc_func_member.asp" -->
<%
if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
strQS = Request.QueryString
Response.Redirect "admin_login.asp?target=" & Server.URLEncode(scriptname(ubound(scriptname)) & "?" & strQS)
end if
Response.Write " <table width=""100%"" align=""center"" border=""0"">" & 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,"","") & " Petition Administration<br /></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine
if Request.Form("switch") = "" then
' Do nothing
else
Session("Pswitch")=cInt(Request.Form("switch"))
end if
strsql = "SELECT P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_V1_SWITCH, P_V2_SWITCH, P_V3_SWITCH, P_V1_REQ, P_V2_REQ, P_V3_REQ, P_PAGECOUNT, P_T_MAIL, P_W_MAIL, P_T_AUTHOR, P_T_REPLYTO, P_T_MESSAGE, P_MESSAGE, P_MODERATION, P_ANTISPAM, P_SWITCH FROM " & strTablePrefix & "P_OPTIONS WHERE P_ID=1"
Set grs = my_conn.execute(strsql)
strPField1 = grs("P_VARFIELD1")
strPField2 = grs("P_VARFIELD2")
strPField3 = grs("P_VARFIELD3")
strPField1E = grs("P_V1_SWITCH")
strPField2E = grs("P_V2_SWITCH")
strPField3E = grs("P_V3_SWITCH")
strPField1Req = grs("P_V1_REQ")
strPField2Req = grs("P_V2_REQ")
strPField3Req = grs("P_V3_REQ")
strPPageCount = CLng(grs("P_PAGECOUNT"))
strPTMail = grs("P_T_MAIL")
strPWMail = grs("P_W_MAIL")
strPTAuthor = grs("P_T_AUTHOR")
strPTReplyTo = grs("P_T_REPLYTO")
strPTMessage = grs("P_T_MESSAGE")
strPWelcome = grs("P_MESSAGE")
strPModeration = grs("P_MODERATION")
strPAntispam = grs("P_ANTISPAM")
strPSwitch = grs("P_SWITCH")
grs.Close
Set grs = Nothing
strGAction = Request.Querystring("action")
If Not IsNumeric(Request.QueryString("id")) Then
intID = 0
Else
intID = Request.Querystring("id")
End If
Select Case strGAction
'#####################################################################################################
'### DELETE ALL UNAPPROVED PETITION SIGNATURES ###
'######################################################
Case "deleteall"
If Request.QueryString("do") = "yes" Then
strsql = "DELETE FROM " & strTablePrefix & "PETITION WHERE P_MODERATED = 1"
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Unmoderated Petition Entries Deleted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete all unmoderated Petition entries?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=deleteall&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### DELETE PETITION SIGNATURE ###
'######################################
Case "delete"
If Request.QueryString("do") = "yes" and intID <> 0 Then
strsql = "DELETE FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 1"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPUnmoderatedCount = countrs("P_COUNT")
Else
intPUnmoderatedCount = 0
End If
countrs.Close
Set countrs = Nothing
If intPUnmoderatedCount > 0 then
strRedirectURL = "petition.asp?method=approve"
Else
strRedirectURL = "petition.asp"
End If
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Deleted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=" & strRedirectURL & """>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strRedirectURL & """>Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" and intID <> 0 Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to delete this Petition entry?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=delete&id=" & intID & "&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### APPROVE ALL UNMODERATED PETITION ENTRIES ###
'#####################################################
Case "approveall"
If Request.QueryString("do") = "yes" Then
strsql = "UPDATE " & strTablePrefix & "PETITION SET P_MODERATED = 0 WHERE P_MODERATED = 1"
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>All Unmoderated Petition Entries Approved!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Are you sure you want to approve all unmoderated Petition entries?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=approveall&do=yes"">Yes</a> | <a href=""petition.asp?action=view&method=approve"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### APPROVE PETITION SIGNATURE ###
'######################################
Case "approve"
If Request.QueryString("do") = "yes" and intID <> 0 Then
strsql = "UPDATE " & strTablePrefix & "PETITION SET"
strsql = strsql & " P_MODERATED = 0 WHERE P_ID=" & intID
my_conn.Execute(strsql),,adCmdText + adExecuteNoRecords
'### SEND THANK YOU EMAIL
If strPTMail = 1 Then
strsql = "SELECT P_ID, P_NAME, P_EMAIL FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
set grs = my_conn.Execute(strsql)
strRecipientsName = grs("P_NAME")
strRecipients = grs("P_EMAIL")
strFrom = strPTReplyTo
strFromName = strPTAuthor
strSubject = "Thank you for signing " & strForumTitle & "'s Petition"
strMessage = strPTMessage
strSender = strFrom
grs.Close
Set grs = Nothing
%><!--#include file="inc_mail.asp" --><%
End If
strSql = "SELECT COUNT(P_ID) AS P_COUNT FROM " & strMemberTablePrefix & "PETITION WHERE P_MODERATED = 1"
Set countrs = my_conn.execute(strsql)
If Not countrs.EOF Then
intPUnmoderatedCount = countrs("P_COUNT")
Else
intPUnmoderatedCount = 0
End If
countrs.Close
Set countrs = Nothing
If intPUnmoderatedCount > 0 then
strRedirectURL = "petition.asp?method=approve"
Else
strRedirectURL = "petition.asp"
End If
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Approved!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=" & strRedirectURL & """>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strRedirectURL & """>Back To Petition</font></a></p>" & vbNewLine
ElseIf Request.Querystring("do") <> "yes" and intID <> 0 Then
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>Approve this Petition entry?<br />" & vbNewLine & _
" <a href=""admin_petition.asp?action=approve&id=" & intID & "&do=yes"">Yes</a> | <a href=""petition.asp"">No</a></font></p>" & vbNewLine
Else
Response.Redirect("petition.asp")
End If
'#####################################################################################################
'### EDIT PETITION SIGNATURE ###
'####################################
Case "edit"
If intID = 0 Then Response.Redirect("petition.asp")
If Request.QueryString("do") = "yes" Then
strFormName = ChkString(Request.Form("name"), "SQLString")
strFormEmail = ChkString(Request.Form("email"), "SQLString")
strFormMessage = ChkString(Request.Form("message"), "message")
strFormField1 = ChkString(Request.Form("field1"),"SQLString")
strFormField2 = ChkString(Request.Form("field2"),"SQLString")
strFormField3 = ChkString(Request.Form("field3"),"SQLString")
If strFormField1 = "" Then
strFormField1 = " "
End If
If strFormField2 = "" Then
strFormField2 = " "
End If
If strFormField3 = "" Then
strFormField3 = " "
End If
If Request.Form("name") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a name</li>" & vbNewLine
End If
If Request.Form("email") = "" Then
Err_Msg = Err_Msg & "<li>Please enter an email address</li>" & vbNewLine
End If
If Request.Form("message") = "" Then
Err_Msg = Err_Msg & "<li>Please enter a message</li>" & vbNewLine
End if
If strPField1Req = 1 and trim(strFormField1) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField1 & "</li>" & vbNewLine
End If
If strPField2Req = 1 and trim(strFormField2) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField2 & "</li>" & vbNewLine
End If
If strPField3Req = 1 and trim(strFormField3) = "" Then
Err_Msg = Err_Msg & "<li>Please enter a " & strPField3 & "</li>" & vbNewLine
End If
If Err_Msg <> "" Then
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
WriteFooter
Response.End
Else
strsql = "UPDATE " & strTablePrefix & "PETITION SET"
strsql = strsql & " P_NAME='" & strFormName & "'"
strsql = strsql & ", P_EMAIL='" & strFormEmail & "'"
strsql = strsql & ", P_MESSAGE='" & strFormMessage & "'"
If strPField1E = 1 Then
strsql = strsql & ", P_VARFIELD1='" & strFormField1 & "'"
End If
If strPField2E = 1 Then
strsql = strsql & ", P_VARFIELD2='" & strFormField2 & "'"
End If
If strPField3E = 1 Then
strsql = strsql & ", P_VARFIELD3='" & strFormField3 & "'"
End If
strsql = strsql & " WHERE P_ID=" & intID
my_conn.execute(strsql),,adCmdText + adExecuteNoRecords
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Petition Entry Updated!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=petition.asp"">" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank You!</font></p>" & vbNewLine & _
" <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""petition.asp"">Back To Petition</font></a></p><br />" & vbNewLine
End if
Else
strsql = "SELECT P_ID, P_NAME, P_EMAIL, P_MESSAGE, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3 FROM " & strTablePrefix & "PETITION WHERE P_ID=" & intID
set grs = my_conn.Execute(strsql)
strTempID = grs("P_ID")
strTempName = grs("P_NAME")
strTempEmail = grs("P_EMAIL")
strTempMessage = grs("P_MESSAGE")
strTempDate = grs("P_DATE")
If strPField1E = 1 Then
strTempField1 = grs("P_VARFIELD1")
End If
If strPField2E = 1 Then
strTempField2 = grs("P_VARFIELD2")
End if
If strPField3E = 1 then
strTempField3 = grs("P_VARFIELD3")
End if
grs.Close
Set grs = Nothing
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <script language=""JavaScript"" type=""text/javascript"" src=""inc_code.js""></script>" & vbNewLine & _
" <form method=""post"" action=""admin_petition.asp?action=edit&do=yes&id=" & intID & """ name=""PostTopic"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Edit Petition Entry</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Your Name:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""name"" maxlength=""50"" value=""" & chkString(strTempName,"display") & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""email"" maxlength=""50"" value=""" & chkString(strTempEmail,"display") & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine
If strPField1E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField1 & ":</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field1"" maxlength=""100"" value=""" & strTempField1 & """ size=""35"">" & vbNewLine
If strPField1Req = 1 Then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField2E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField2 & ":</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field2"" maxlength=""100"" value=""" & strTempField2 & """ size=""35"">" & vbNewLine
If strPField2Req = 1 Then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
If strPField3E = 1 Then
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>" & strPField3 & ":</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field3"" maxlength=""100"" value=""" & strTempField3 & """ size=""35"">" & vbNewLine
If strPField3Req = 1 Then
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """ color=""" & strDefaultFontColor & """>(required)</font>" & vbNewLine
End If
Response.Write " </td>" & vbNewLine & _
" </tr>" & vbNewLine
End If
%>
<!--#include file="inc_post_buttons_basic.asp""-->
<%
Response.Write " <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Message:</b> <br /><br />" & vbNewLine & _
" <table border=""0"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine
If strAllowHTML = "1" Then
Response.Write " * HTML is ON<br />" & vbNewLine
Else
Response.Write " * HTML is OFF<br />" & vbNewLine
End If
If strAllowForumCode = "1" Then
Response.Write " * <a href=""JavaScript:openWindow6('pop_forum_code.asp')"" tabindex=""-1"">Forum Code</a> is ON<br />" & vbNewLine
Else
Response.Write " * Forum Code is OFF<br />" & vbNewLine
End if
If strIcons = "1" and strShowSmiliesTable = "1" Then
' <!--#INCLUDE FILE="inc_smilies.asp" -->
End If
Response.Write " </font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""45"" name=""Message"" rows=""11"" wrap=""VIRTUAL"" onselect=""storeCaret(this);"" onclick=""storeCaret(this);"" onkeyup=""storeCaret(this);"" onchange=""storeCaret(this);"">" & CleanCode(strTempMessage) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""center"" colspan=""2"">" & vbNewLine & _
" <input name=""Submit"" type=""submit"" value="" Submit "">" & vbNewLine & _
" <input name=""Preview"" type=""button"" value="" Preview "" onclick=""OpenPreview()"">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table>" & vbNewLine & _
" <br />" & vbNewLine
end if
'#####################################################################################################
'### FORM SUBMISSION CHECK ###
'#################################
Case "options_info"
strFormWelcome = ChkString(Request.Form("petitionwelcome"),"message")
strFormTMessage = ChkString(Request.Form("tmessage"),"SQLString")
strFormPageCount = CLng(Request.Form("pagecount"))
strFormField1 = ChkString(Request.Form("field1"),"SQLString")
strFormField2 = ChkString(Request.Form("field2"),"SQLString")
strFormField3 = ChkString(Request.Form("field3"),"SQLString")
strFormTAuthor = ChkString(Request.Form("tauthor"),"SQLSTring")
strFormTReplyTo = ChkString(Request.Form("treplyto"),"email")
strFormSwitch = CLng(Request.Form("switch"))
If Request.Form("field1e") = "1" Then
strFormField1e = 1
Else
strFormField1e = 0
End If
If Request.Form("field2e") = "1" Then
strFormField2e = 1
Else
strFormField2e = 0
End If
If Request.Form("field3e") = "1" Then
strFormField3e = 1
Else
strFormField3e = 0
End If
If Request.Form("field1r") = "1" Then
strFormField1r = 1
Else
strFormField1r = 0
End If
If Request.Form("field2r") = "1" Then
strFormField2r = 1
Else
strFormField2r = 0
End If
If Request.Form("field3r") = "1" Then
strFormField3r = 1
Else
strFormField3r = 0
End If
If Request.Form("moderation") = "1" Then
strFormModeration = 1
Else
strFormModeration = 0
End If
If Request.Form("temail") = "1" Then
strFormTEmail = 1
Else
strFormTEMail = 0
End If
If Request.Form("wemail") = "1" Then
strFormWEmail = 1
Else
strFormWEMail = 0
End If
If Request.Form("antispam") = "1" Then
strFormAntispam = 1
Else
strFormAntispam = 0
End If
'strFormSwitch=Session("PSwitch")
If strFormSwitch<>strPSwitch Then strFormSwitch=abs(strPSwitch+(-1))
Err_Msg = ""
If trim(strFormWelcome) = "" Then
Err_Msg = Err_Msg & "<li>You must enter a Petition Statement</li>" & vbNewLine
End If
If (trim(strFormField1) = "" and strFormField1e = 1) or (trim(strFormField2) = "" and strFormField2e = 1) or (trim(strFormField3) = "" and strFormField3e = 1) Then
Err_Msg = Err_Msg & "<li>You must enter an Optional Field title if you want to enable it</li>" & vbNewLine
End If
If (strFormField1e = 0 and strFormField1r = 1) or (strFormField2e = 0 and strFormField2r = 1) or (strFormField3e = 0 and strFormField3r = 1) Then
Err_Msg = Err_Msg & "<li>You must enable an Optional Field if you want to make it required</li>" & vbNewLine
End If
If trim(strFormTAuthor) = "" Then
Err_Msg = Err_Msg & "<li>You must enter a From Name</li>" & vbNewLine
End If
If trim(strFormTReplyTo) = "" or not EmailField(strFormTReplyTo) Then
Err_Msg = Err_Msg & "<li>You must enter a valid From Email</li>" & vbNewLine
End If
If Err_Msg = "" Then
strsql = "UPDATE " & strTablePrefix & "P_OPTIONS SET "
strsql = strsql & " P_VARFIELD1='" & strFormField1 & "', "
strsql = strsql & " P_VARFIELD2='" & strFormField2 & "', "
strsql = strsql & " P_VARFIELD3='" & strFormField3 & "', "
strsql = strsql & " P_V1_SWITCH=" & strFormField1e & ", "
strsql = strsql & " P_V2_SWITCH=" & strFormField2e & ", "
strsql = strsql & " P_V3_SWITCH=" & strFormField3e & ", "
strsql = strsql & " P_MESSAGE = '" & strFormWelcome & "', "
strsql = strsql & " P_V1_REQ=" & strFormField1r & ", "
strsql = strsql & " P_V2_REQ=" & strFormField2r & ", "
strsql = strsql & " P_V3_REQ=" & strFormField3r & ", "
strsql = strsql & " P_PAGECOUNT=" & strFormPageCount & ", "
strsql = strsql & " P_T_MAIL=" & strFormTEmail & ", "
strsql = strsql & " P_W_MAIL=" & strFormWEmail & ", "
strsql = strsql & " P_T_AUTHOR='" & strFormTAuthor & "', "
strsql = strsql & " P_T_REPLYTO='" & strFormTReplyTo & "', "
strsql = strsql & " P_T_MESSAGE='" & strFormTMessage & "', "
strsql = strsql & " P_MODERATION=" & strFormModeration & ", "
strsql = strsql & " P_ANTISPAM=" & strFormAntispam & ", "
strsql = strsql & " P_SWITCH=" & strFormSwitch & " "
strsql = strsql & " WHERE P_ID=1"
my_conn.execute(strsql)
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Configuration Posted!</font></p>" & vbNewLine & _
" <meta http-equiv=""Refresh"" content=""2; URL=admin_home.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_petition.asp"">Back To Petition Admin</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
'#####################################################################################################
'### OPTIONS MAIN PAGE ###
'#############################
Case Else
Response.Write " <table border=""0"" width=""100%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strTableBorderColor & """>" & vbNewLine & _
" <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Petition Administration</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <form action=""admin_petition.asp?action=options_info"" method=""post"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Petition Options</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Petition Statement:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""70"" name=""petitionwelcome"" rows=""15"" wrap=""VIRTUAL"">" & CleanCode(strPWelcome) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Turn Petition On or Off:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""switch"" value=""1"" " & chkCheckbox("1",strPSwitch,true) & ">On " & vbNewLine & _
" <input type=""radio"" name=""switch"" value=""0"" " & chkCheckbox("1",strPSwitch,false) & ">Off" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Moderate Petition Entries:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""moderation"" value=""1"" " & chkCheckbox("1",strPModeration,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""moderation"" value=""0"" " & chkCheckbox("1",strPModeration,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Enable Antispam Confirmation:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""antispam"" value=""1"" " & chkCheckbox("1",strPAntispam,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""antispam"" value=""0"" " & chkCheckbox("1",strPAntispam,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Signatures Per Page:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <select name=""pagecount"">" & vbNewLine & _
" <option value=""5"" " & chkSelect(5,strPPageCount) & ">5</option>" & vbNewLine & _
" <option value=""10"" " & chkSelect(10,strPPageCount) & ">10</option>" & vbNewLine & _
" <option value=""15"" " & chkSelect(15,strPPageCount) & ">15</option>" & vbNewLine & _
" <option value=""20"" " & chkSelect(20,strPPageCount) & ">20</option>" & vbNewLine & _
" <option value=""25"" " & chkSelect(25,strPPageCount) & ">25</option>" & vbNewLine & _
" <option value=""50"" " & chkSelect(50,strPPageCount) & ">50</option>" & vbNewLine & _
" </select>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Email Options</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Send Thank You Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""temail"" value=""1"" " & chkCheckbox("1",strPTMail,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""temail"" value=""0"" " & chkCheckbox("1",strPTMail,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>From Name:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""text"" maxlength=""100"" size=""35"" name=""tauthor"" value=""" & chkString(strPTAuthor,"display") & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>From Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""text"" maxlength=""100"" size=""35"" name=""treplyto"" value=""" & chkString(strPTReplyTo,"display") & """>" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"" valign=""top"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Thank You Email Message:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <textarea cols=""70"" name=""tmessage"" rows=""15"" wrap=""VIRTUAL"">" & CleanCode(strPTMessage) & "</textarea>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Notify Admin Via Email:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <input type=""radio"" name=""wemail"" value=""1"" " & chkCheckbox("1",strPWMail,true) & ">Yes " & vbNewLine & _
" <input type=""radio"" name=""wemail"" value=""0"" " & chkCheckbox("1",strPWMail,false) & ">No" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strCategoryCellColor & """ colspan=""2""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strCategoryFontColor & """><b>Additional Fields Options</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 1:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field1"" maxlength=""100"" value=""" & strPField1 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field1e"" value=""1"" " & chkCheckBox("1",strPField1E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field1r"" value=""1"" " & chkCheckBox("1",strPField1Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 2:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field2"" maxlength=""100"" value=""" & strPField2 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field2e"" value=""1"" " & chkCheckBox("1",strPField2E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field2r"" value=""1"" " & chkCheckBox("1",strPField2Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" <b>Field 3:</b> </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
" <input type=""text"" name=""field3"" maxlength=""100"" value=""" & strPField3 & """ size=""35"">" & vbNewLine & _
" <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
" Enabled: <input type=""checkbox"" name=""field3e"" value=""1"" " & chkCheckBox("1",strPField3E,true) & ">" & vbNewLine & _
" Required: <input type=""checkbox"" name=""field3r"" value=""1"" " & chkCheckBox("1",strPField3Req,true) & ">" & vbNewLine & _
" </font>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpTableColor & """ align=""center"" colspan=""2"">" & vbNewLine & _
" <input name=""Submit"" type=""submit"" value="" Submit "">" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </form>" & vbNewLine & _
" </table>" & vbNewLine & _
" </td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" </table><br />" & vbNewLine
End Select
WriteFooter()
%>
I have updated the mod on snitzbitz to have the newer file. |
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
|
|
leatherlips
Senior Member
USA
1838 Posts |
Posted - 31 July 2008 : 21:23:50
|
quote: Originally posted by Carefree
There are 3 custom fields in the mod AFTER I deleted those 6 - and all 3 are functional. There were 9 custom fields altogether, as well as another 7-8 which had specific uses that were never used.
I'm not sure I know what you are talking about. The variables from the database that you want to remove are needed:
P_V1_SWITCH - Makes the custom field enabled or disabled P_V2_SWITCH - Makes the custom field enabled or disabled P_V3_SWITCH - Makes the custom field enabled or disabled P_V1_REQ - Makes the custom field required or not P_V2_REQ - Makes the custom field required or not P_V3_REQ - Makes the custom field required or not
I'm not sure where the other 7-8 are that you are talking about.
Regardless, the mod as I currently have it along with your on/off and print features seems to be working perfectly now.
Thanks for all your help! < |
Mangione Magic Forum - The Music of Chuck Mangione
My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD |
Edited by - leatherlips on 31 July 2008 21:24:17 |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 01 August 2008 : 03:50:25
|
quote: Originally posted by Carefree (Posted - 31 July 2008 : 12:37:05)above
Andy, if you still want the seconds gone; look for this line in "inc_func_common" (appx line 506):(Code left out for space)
Thank you CF, I tried that but the secs remained. However amending the function chktime to this it works
What I have done is removed all the occasions where Mid(fTime, 13,2) occurs after Mid(fTime, 11,2) and adjusted the line endings ie &_'s etc Thanks CF again for you assistance..Andy I must admit the forum looks tidier without all the seconds on the times.< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 01 August 2008 : 03:54:37
|
Good, as long as it's working. I'll return to the next mod LOL< |
|
|
Andy Humm
Average Member
United Kingdom
908 Posts |
Posted - 01 August 2008 : 04:14:18
|
Petition_PRINT Nominally the petition_print.asp which has been provided by CF, is viewed by admin and moderators. However if an 'unapproved visitor' types the url in /forum/petition_print.asp the page is open for view. I have added/amended the code at the top of petition_print (around the INCLUDES) to: You might find this useful at the top of petition_print.asp add items in red %> <!--#INCLUDE FILE="config.asp" --> <!--#INCLUDE file="inc_sha256.asp"--> <!--#INCLUDE FILE="inc_header_short.asp" --> <!--#INCLUDE FILE="inc_func_common.asp" --> <% if mlev=<3 then Response.Redirect "default.asp" else Sign=0 set my_Conn= Server.CreateObject("ADODB.Connection")
Then at botton of file: WriteFooterShort Response.End end if %> < |
Edited by - Andy Humm on 01 August 2008 07:22:48 |
|
|
Topic |
|
|
|