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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Petition MOD
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 6

leatherlips
Senior Member

USA
1838 Posts

Posted - 26 July 2008 :  22:31:03  Show Profile  Visit leatherlips's Homepage
I uploaded a new Petition MOD on SnitzBitz.

You can get it here.

I've modified OneWayMule's guestbook mod to behave as a petition.

Thanks to OneWayMule for writing the guestbook mod, phy1729 for helping with the signature count and Andy Humm for helping me test it. <

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 26 July 2008 22:32:12

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 July 2008 :  01:06:26  Show Profile
I looked at it, Leather. It's a good job but I think the admin should have a on/off toggle (most won't have a petition running regularly). So I made the modifications that should enable a toggle from the admin page.

If I manually set the switch to "on" within the database, using the toggle from the admin page will turn it off. However, it will not turn it back on. Weird behavior.

Can somebody read through this thing and see why the switch only works one direction?

Here's what I did:
admin_petition.txt

To use the switch feature, you'll have to use a modified dbs file:

MOD: Petition
[CREATE]
PETITION
P_ID
P_NAME#VARCHAR (50)#NULL#
P_EMAIL#VARCHAR (100)#NULL#
P_WEBSITE#VARCHAR (100)#NULL#
P_ICQ#VARCHAR (30)#NULL#
P_MESSAGE#memo#NOT NULL#
P_DATE#VARCHAR (50)#NOT NULL#
P_VARFIELD1#VARCHAR (100)#NULL#
P_VARFIELD2#VARCHAR (100)#NULL#
P_VARFIELD3#VARCHAR (100)#NULL#
P_IP#VARCHAR (15)#NULL#'0.0.0.0'
P_MODERATED#INT#NULL#0
P_SWITCH#INT#NULL#0
[END]
[CREATE]
P_OPTIONS
P_ID
P_VARFIELD1#VARCHAR (100)#NULL#
P_VARFIELD2#VARCHAR (100)#NULL#
P_VARFIELD3#VARCHAR (100)#NULL#
P_V1_SWITCH#INT#NULL#
P_V2_SWITCH#INT#NULL#
P_V3_SWITCH#INT#NULL#
P_MESSAGE#memo#NULL#
P_V1_REQ#INT#NOT NULL#0
P_V2_REQ#INT#NOT NULL#0
P_V3_REQ#INT#NOT NULL#0
P_PAGECOUNT#INT#NOT NULL#
P_T_MAIL#INT#NOT NULL#0
P_W_MAIL#INT#NOT NULL#0
P_T_AUTHOR#VARCHAR (150)#NOT NULL#
P_T_REPLYTO#VARCHAR (150)#NOT NULL#
P_T_MESSAGE#memo#NOT NULL#
P_MODERATION#INT#NULL#0
P_ANTISPAM#INT#NULL#0
P_SWITCH#INT#NULL#0
[END]
[INSERT]
P_OPTIONS
(P_VARFIELD1, P_VARFIELD2, P_VARFIELD3, P_V1_SWITCH, P_V2_SWITCH, P_V3_SWITCH, P_MESSAGE, 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_MODERATION, P_ANTISPAM, P_SWITCH)#('State', 'Country', 'Age', 1, 1, 1, 'Thank you for signing the petition', 0, 0, 0, 10, 0, 0, 'Admin', 'you@yourdomain.com', 'Thank you for signing the petition', 0, 0, 1)
[END]
<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 July 2008 :  08:35:21  Show Profile  Visit leatherlips's Homepage
The on/off switch is a good idea. I was going to simply remove the link from the inc_header when I wanted to end my petition.<

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
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 27 July 2008 :  08:40:00  Show Profile  Visit leatherlips's Homepage
Looking at your admin_petition.asp file,

On line 266 you have:

strsql = strsql & ", P_SWITCH="& strFormSwitch

Should it be?

strsql = strsql & ", P_SWITCH="& strFormSwitch & "'"
<

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 27 July 2008 08:40:21
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 27 July 2008 :  11:13:55  Show Profile
No, the apostrophe is only needed for text variables, this one is a numeric.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 July 2008 :  00:57:27  Show Profile
While puzzling myself with this mod, my brain pulled something out from the 70's programming days. Instead of the five line on/off toggle routine which most currently use in Snitz, here's a routine that takes one line:


if (variable) <> Request.Form("variable") then variable=abs(variable+(-1))


So, if the variable = 1 (on), then variable=abs(1+(-1)) or 1-1 = 0
and if the variable = 0 (off), the variable=abs(0+(-1)) or abs(0-1) = 1<

Edited by - Carefree on 28 July 2008 01:01:32
Go to Top of Page

phy1729
Average Member

USA
589 Posts

Posted - 28 July 2008 :  01:42:16  Show Profile
or
then variable=variable+1 mod 1
Anyone want to test which is faster? Probably less than a ns difference but would be interesting to know.<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 July 2008 :  04:04:57  Show Profile
OK - got the toggle working, it was a stupid variable error. To use
the check & count, embed this code where you want it to appear:


   'Check Petitions on
   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=1 then
     Response.Write "<a href=""petition.asp""" & dWStatus("Sign The Petition!") & "><acronym title=""There are currently " & intPCount & " signatures!""><b>Sign The Petition! (" & intPCount & ")</b></acronym></a>     " & vbNewline
    end if


Here's the admin page with toggle for on/off.


<%
'#################################################################################
'## 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")
   strFormWebsite = ChkString(Request.Form("website"), "SQLString")
   strFormIcq  = ChkString(Request.Form("icq"), "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_WEBSITE='" & strFormWebsite & "'"
   strsql = strsql & ", P_ICQ='" & strFormICQ & "'"
   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_WEBSITE, P_ICQ, 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")
   strTempWebsite = grs("P_WEBSITE")
   strTempICQ  = grs("P_ICQ")
   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 & _
  "    <tr>" & vbNewLine & _
  "    <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
  "    <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
  "  <b>Website:</b> </font>" & vbNewLine & _
  "  </td>" & vbNewLine & _
  "    <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
  "    <input type=""text"" name=""website"" maxlength=""100"" value=""" & chkString(strTempWebsite,"display") & """ size=""35"">" & vbNewLine & _
  "  </td>" & vbNewLine & _
  "  </tr>" & vbNewLine & _
  "    <tr>" & vbNewLine & _
  "    <td bgcolor=""" & strPopUpTableColor & """ align=""right"" width=""30%"">" & vbNewLine & _
  "    <font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & vbNewLine & _
  "  <b>ICQ:</b> </font>" & vbNewLine & _
  "  </td>" & vbNewLine & _
  "    <td bgcolor=""" & strPopUpTableColor & """ align=""left"" width=""70%"">" & vbNewLine & _
  "    <input type=""text"" name=""icq"" maxlength=""20"" value=""" & chkString(strTempICQ,"display") & """ size=""35"">" & 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=""1""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Petition Administration</b></font></td>" & vbNewLine & _
  "    <td bgcolor=""" & strHeadCellColor & """ colspan=""1""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b>Petitions:  </b></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></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>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()
%>
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 28 July 2008 :  08:00:11  Show Profile  Visit leatherlips's Homepage
Is there a way to insert the new database field into an existing table? I would like to add the new on/off switch but don't want to risk ruining my active petition.<

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
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 28 July 2008 :  08:46:44  Show Profile
Leatherlips, I will look at the differences of the modified dbs and try the changed code in the alternative mod update. (I'll try it on my site when I get home from work tonight) rgds andy<
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 28 July 2008 :  10:02:38  Show Profile  Visit Massimo's Homepage
only on first signature If admin panel voice: Moderate Petition Entries: is on


displays this error

ADODB.Recordset error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/platinum/petition.asp, line 230




petition.asp, line 230 = grs.absolutepage = intPage<

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/


Edited by - Massimo on 28 July 2008 10:14:22
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 28 July 2008 :  10:19:17  Show Profile  Visit leatherlips's Homepage
quote:
Originally posted by Massimo

only on first signature If admin panel voice: Moderate Petition Entries: is on


displays this error

ADODB.Recordset error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/platinum/petition.asp, line 230




petition.asp, line 230 = grs.absolutepage = intPage

Is this with the original petition mod or with the changes added by Carefree? I can not recreate the error on my petition.<

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
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 28 July 2008 :  10:31:30  Show Profile  Visit Massimo's Homepage
quote:
Originally posted by leatherlips

quote:
Originally posted by Massimo

only on first signature If admin panel voice: Moderate Petition Entries: is on


displays this error

ADODB.Recordset error '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/platinum/petition.asp, line 230




petition.asp, line 230 = grs.absolutepage = intPage

Is this with the original petition mod or with the changes added by Carefree? I can not recreate the error on my petition.



Yes added changes by Carefree<

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/

Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 28 July 2008 :  10:33:53  Show Profile  Visit leatherlips's Homepage
The MOD as I have posted it does not cause any error. You may want to undo the changes added by carefree at the moment. The only thing he is trying to do as add an on/off switch in the admin panel. He will have to suggest the fix for the error.<

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
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 28 July 2008 :  10:49:08  Show Profile  Visit Massimo's Homepage
awaiting updates<

Massimo Farieri
Snitz Italian Community
===============
http://www.snitz.it
http://www.superdeejay.net/forum/

Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 28 July 2008 :  11:50:38  Show Profile
Did you add the field to the database as described earlier?

You can either do it when first creating the petition mod, or use this as an update dbs file.


MOD: Petition Update
[P_OPTIONS]
[ALTER]
ADD#P_SWITCH#INT#NULL#0
[END]

[PETITION]
[ALTER]
ADD#P_SWITCH#INT#NULL#0
[END]


Save as dbs_petition_update.asp and run in Admin Home.<
Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.68 seconds. Powered By: Snitz Forums 2000 Version 3.4.07