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
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 6

Massimo
Junior Member

Italy
125 Posts

Posted - 30 July 2008 :  06:16:14  Show Profile  Visit Massimo's Homepage
News Petition.asp code work...

;)

Mods ok<

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

Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 30 July 2008 :  07:33:21  Show Profile
Thank you CF! Spot on.

Leatherlips, as an additional thought with the idea of using electronic petitions, great idea!, when we come to hand the signatures/entries over to the people who we are petitioning too, has a thought gone into a printer friendly output? If we printout the current list format of names/signatures we would have a few trees awaiting for the chop.(just a notion!)<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 30 July 2008 :  08:48:42  Show Profile  Visit leatherlips's Homepage
I'm still having issues with your addon.

My petition link will not stay on the same line as my other links.

I have to remove the & _ from the line above it. If I keep it then I get this error:

Microsoft VBScript compilation  error '800a03ea'

Syntax error

/forumbeta/inc_header.asp, line 654

set my_Conn=Server.CreateObject("ADODB.Connection")


The whole section looks like this:

"          <a href=""faq.asp""" & dWStatus("Answers to Frequently Asked Questions...") & " tabindex=""-1""><acronym title=""Answers to Frequently Asked Questions..."">FAQ</acronym></a>" & vbNewline & _

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
   'Do nothing
else
   Response.Write "| <a href=""petition.asp""" & dWStatus("Sign The Petition!") & "><acronym title=""There are currently " & intPCount & " signatures!""><font face=""" & strDefaultFontFace & """ size=""" & strfooterFontSize & """><br>Sign The Petition! (" & intPCount & ")</acronym></a>     " & vbNewline
end if
<

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 30 July 2008 09:00:33
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 30 July 2008 :  09:05:28  Show Profile  Visit HuwR's Homepage
is the code you posted the exact code ? if so then it shouldn't have & _ at the end of the first line since the second line is a new command and not a string continuation of the first line.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 30 July 2008 :  09:09:43  Show Profile  Visit leatherlips's Homepage
Yes that is the exact code in my inc_header.asp.

Removing the & _ does fix the error but then my petition link appears on a new line. I want the link to be lined up with the others (Home, Profile, Register, etc.)

How would I do that?<

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

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 July 2008 :  11:14:51  Show Profile
Leather, you forgot the tab index.

Response.Write "| <a href=""petition.asp""" & dWStatus("Sign The Petition!") & " tabindex=""-1""><acronym title=""There are currently " & intPCount & " signatures!""><font face=""" & strDefaultFontFace & """ size=""" & strfooterFontSize & """><br>Sign The Petition! (" & intPCount & ")</acronym></a>     " & vbNewline
<
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 July 2008 :  11:17:47  Show Profile
quote:
Originally posted by Andy Humm

Thank you CF! Spot on.

Leatherlips, as an additional thought with the idea of using electronic petitions, great idea!, when we come to hand the signatures/entries over to the people who we are petitioning too, has a thought gone into a printer friendly output? If we printout the current list format of names/signatures we would have a few trees awaiting for the chop.(just a notion!)



If Leather doesn't want to tackle the print configuration, I'll write it for you.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 30 July 2008 :  13:27:54  Show Profile  Visit leatherlips's Homepage
I'm sorry Carefree, I think I'm going crazy.

I added the tabindex=""-1"" but it still goes to a new line. See here:

http://mangionemagic.com/forumbeta

Here is the code I currently have:

"          <a href=""faq.asp""" & dWStatus("Answers to Frequently Asked Questions...") & " tabindex=""-1""><acronym title=""Answers to Frequently Asked Questions..."">FAQ</acronym></a>" & vbNewline

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
   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
end if
if strPSwitch=0 then
   'Do nothing
else
   Response.Write "| <a href=""petition.asp""" & dWStatus("Sign The Petition!") & " tabindex=""-1""><acronym title=""There are currently " & intPCount & " signatures!""><font face=""" & strDefaultFontFace & """ size=""" & strfooterFontSize & """><br>Sign The Petition! (" & intPCount & ")</acronym></a>     " & vbNewline
end if
<

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

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 July 2008 :  16:00:26  Show Profile
quote:
Originally posted by leatherlips

I'm sorry Carefree, I think I'm going crazy.


In inc_header.asp, look for the following lines (appx 278-288, just above the heading navigation):

		"<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
		"  <tr>" & vbNewLine & _
		"    <td valign=""top"" width=""50%""><a href=""default.asp"" tabindex=""-1"">" & getCurrentIcon(strTitleImage & "||",strForumTitle,"") & "</a></td>" & vbNewLine & _
		"    <td align=""center"" valign=""top"" width=""50%"">" & vbNewLine & _
		"      <table border=""0"" cellPadding=""2"" cellSpacing=""0"">" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"          <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><b>" & strForumTitle & "</b></font></td>" & vbNewLine & _
		"        </tr>" & vbNewLine & _
		"        <tr>" & vbNewLine & _
		"          <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine
call sForumNavigation()


Change the value in red to something smaller (it'll let your menu extend). 25% should get you about 60% of your screen width.<

Edited by - Carefree on 30 July 2008 16:00:57
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 July 2008 :  16:46:53  Show Profile
OK for your other request, Andy<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Leatherlips, as an additional thought with the idea of using electronic petitions, great idea!, when we come to hand the signatures/entries over to the people who we are petitioning too, has a thought gone into a printer friendly output? If we printout the current list format of names/signatures we would have a few trees awaiting for the chop.(just a notion!)<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

Replace your "petition.asp" with this:

<%
'################################################################################
'## 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_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 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")
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()
%>


Save this file as "petition_print.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
'##
'################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<%
 Sign=0
 set my_Conn= Server.CreateObject("ADODB.Connection")
 my_Conn.Open strConnString
 strSql = "SELECT P_MESSAGE FROM "& strTablePrefix & "P_OPTIONS"
 set rsPrint = my_Conn.Execute (strSql)
 if rsPrint.BOF or rsPrint.EOF then
  'Do nothing
 else
  P_MESS=rsPrint("P_MESSAGE")
  P1="<br><br>"
  P_MESSAGE=P1+P_MESS+P1
 end if
 rsPrint.close
 set rsPrint=nothing

 Response.Write "<table border=""1"" width=""60%"" align=""center"">" & vbNewLine & _
  " <tr>" & vbNewLine & _
  "  <td align=""center"">" & vbNewLine & _
  "   <table border=""0"" width=""100%"" align=""center"">" & vbNewLine & _
  "    <tr>" & vbNewLine & _
  "     <td colspan=""8"" align=""center"">Petition" & vbNewLine & _
  "     </td>" & vbNewLine & _
  "    <tr>" & vbNewLine & _
  "    <tr>" & vbNewLine & _
  "     <td colspan=""8"" align=""left"">" & P_MESSAGE & "" & vbNewLine & _
  "     </td>" & vbNewLine & _
  "    </tr>" & vbNewLine

 set my_Conn= Server.CreateObject("ADODB.Connection")
 my_Conn.Open strConnString
 strSql = "SELECT P_NAME, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3 FROM "& strTablePrefix & "PETITION"
 set rsPrint = my_Conn.Execute (strSql)
 rsPrint.movefirst
 Do Until rsPrint.EOF
  strPName=rsPrint("P_NAME")
  strPDT=DateToStr(rsPrint("P_DATE"))
  strPState=rsPrint("P_VARFIELD1")
  strPCountry=rsPrint("P_VARFIELD2")
  strPAge=rsPrint("P_VARFIELD3")
  Sign=Sign+1
  strPDAT=strtodate(rsPrint("P_DATE").Value)
  'strPDAT=chkDate(" & strPDT, "", true)
  Response.Write "   <a href=""javascript:onClick=window.print()"">Print Petition</a> | <a href=""JavaScript:onClick=window.close()"">Close Window</a></font><br />" & vbNewline & _
   "    <tr>" & vbNewLine & _
   "     <td colspan=""1"">" & Sign & ". " & strPName & " " & vbNewLine & _
   "     </td>" & vbNewLine & _
   "     <td colspan=""1"">" & strPAge & " " & vbNewLine & _
   "     </td>" & vbNewLine & _
   "     <td colspan=""1"">" & strPState & " " & vbNewLine & _
   "     </td>" & vbNewLine & _
   "     <td colspan=""1"">" & strPCountry & " " & vbNewLine & _
   "     </td>" & vbNewLine & _
   "     <td colspan=""1"">"  & strPDAT & "" & vbNewLine & _
   "     </td>" & vbNewLine & _
   "    </tr>" & vbNewLine
  rsPrint.movenext
 Loop
 rsPrint.close
 set rsPrint=nothing
 Response.Write "   </table>" & vbNewLine & _
 "  </td>" & vbNewLine & _
 " </tr>" & vbNewLine & _
 "</table>"
WriteFooterShort
Response.End
%>
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 30 July 2008 :  17:35:18  Show Profile
CF. I appreciate as always your awesome support and time spent in the developement of this print version.
Edit:
CF I have added this edit in here to ensure leatherlip's response is not missed and an observation I have spotted with the petition_print

line 82
'Response.Write " <a href=""javascript:onClick=window.print()"">Print Petition</a> | <a href=""JavaScript:onClick=window.close()"">Close Window</a></font><br />" & vbNewline & _

seems to be trapped into the loop and you get as many signatures as you have Print petition|Close window links at the top.

I have moved this line to insert after line 57
" <tr>" & vbNewLine & _

Thanks as always. andy
BTW The more we utilise the grey matter the better tuned it becomes...
Yours seems spot on resonance frequency and well tuned! lol<

Edited by - Andy Humm on 30 July 2008 19:29:07
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 30 July 2008 :  17:57:12  Show Profile
You're welcome. Helps keep my brain alive a few more weeks. It's now almost 24 months since the medical team gave me four months to live.<
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 30 July 2008 :  18:05:47  Show Profile  Visit leatherlips's Homepage
I know I'm probably starting to be a pain, but I don't have anything on that page that says 50%.

Also, when I keep the link without the on/off it fits just fine. When I add the code for the on/off it goes to a new line.

I'm losing my mind!

Here is my inc_header:

<%
'#################################################################################
'## Snitz Forums 2000 v3.4.05
'#################################################################################
'## Copyright (C) 2000-05 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
'##
'#################################################################################
%>
<!--#INCLUDE FILE="inc_func_common.asp" -->
<%
if strShowTimer = "1" then
   '### start of timer code
   Dim StopWatch(19) 

   sub StartTimer(x)
      StopWatch(x) = timer
   end sub

   function StopTimer(x)
      EndTime = Timer

      'Watch for the midnight wraparound...
      if EndTime < StopWatch(x) then
         EndTime = EndTime + (86400)
      end if

      StopTimer = EndTime - StopWatch(x)
   end function

   StartTimer 1

   '### end of timer code
end if

strArchiveTablePrefix = strTablePrefix & "A_"
strScriptName = request.servervariables("script_name")
'############### Referer Mod #############
strRefScriptName = "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("PATH_INFO") 'added by me

If Len(Request.QueryString) > 0 Then
   strRefScriptName = strRefScriptName & "?" & Request.ServerVariables("QUERY_STRING")
End If

If (StrComp(Session("CurrentPage"),strRefScriptName)<>0) or  ( ((InStr(Session("CurrentPage"),"default.asp")<>0) and (InStr(strRefScriptName,"default.asp")<>0)) ) Then
   If (InStr(Session("CurrentPage"),"post_info.asp")=0) and (InStr(Session("CurrentPage"),"post.asp")=0) Then
      Session("LastPage") = Session("CurrentPage")
   End if
   Session("CurrentPage") = chkString(strRefScriptName, "refer")
End If
strReferer = Session("LastPage")

If (InStr(strReferer,"register.asp")<>0) Then 
   strReferer = "default.asp"
End If
'##########################################

if Application(strCookieURL & "down") then
   if not Instr(strScriptName,"admin_") > 0 then
      Response.redirect("down.asp")
   end if
end if

if strPageBGImageURL = "" then
   strTmpPageBGImageURL = ""
elseif Instr(strPageBGImageURL,"/") > 0 or Instr(strPageBGImageURL,"\") > 0 then
   strTmpPageBGImageURL = " background=""" & strPageBGImageURL & """"
else
   strTmpPageBGImageURL = " background=""" & strImageUrl & strPageBGImageURL & """"
end if

If strDBType = "" then 
   Response.Write "<html>" & vbNewLine & _
         "<head>" & vbNewline & _
         "<title>" & strForumTitle & "</title>" & vbNewline


'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END   - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
%>
<!--#INCLUDE FILE="inc_rss.asp" -->
<!--#INCLUDE FILE="addedheadercontent.asp" -->
<%
   Response.Write "</head>" & vbNewLine & _
         "<body" & strTmpPageBGImageURL & " bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine & _
         "<table border=""0"" cellspacing=""0"" cellpadding=""5"" width=""50%"" height=""40%"" align=""center"">" & vbNewLine & _
         "  <tr>" & vbNewLine & _
         "    <td bgColor=""navyblue"" align=""center""><p><font face=""Verdana, Arial, Helvetica"" size=""2"">" & _
         "<b>There has been a problem...</b><br /><br />" & _
         "Your <b>strDBType</b> is not set, please edit your <b>config.asp</b><br />to reflect your database type." & _
         "</font></p></td>" & vbNewLine & _
         "  </tr>" & vbNewLine & _
         "  <tr>" & vbNewLine & _
         "    <td align=""center""><font face=""Verdana, Arial, Helvetica"" size=""2"">" & _
         "<a href=""default.asp"" target=""_top"">Click here to retry.</a></font></td>" & vbNewLine & _
         "  </tr>" & vbNewLine & _
         "</table>" & vbNewLine & _
         "</body>" & vbNewLine & _
         "</html>" & vbNewLine
   Response.End
end if

set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

if (strAuthType = "nt") then
   call NTauthenticate()
   if (ChkAccountReg() = "1") then
      call NTUser()
   end if
end if

if strGroupCategories = "1" then
   if Request.QueryString("Group") = "" then
      if Request.Cookies(strCookieURL & "GROUP") = "" Then
         Group = 2
      else 
         Group = cLng(Request.Cookies(strCookieURL & "GROUP"))
      end if
   else
      Group = cLng(Request.QueryString("Group"))
   end if
   'set default
   Session(strCookieURL & "GROUP_ICON") = "icon_group_categories.gif"
   Session(strCookieURL & "GROUP_IMAGE") = strTitleImage
   'Forum_SQL - Group exists ?
   strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE " 
   strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
   strSql = strSql & " WHERE GROUP_ID = " & Group
   set rs2 = my_Conn.Execute (strSql)
   if rs2.EOF or rs2.BOF then
      Group = 2
      strSql = "SELECT GROUP_ID, GROUP_NAME, GROUP_ICON, GROUP_IMAGE " 
      strSql = strSql & " FROM " & strTablePrefix & "GROUP_NAMES "
      strSql = strSql & " WHERE GROUP_ID = " & Group
      set rs2 = my_Conn.Execute (strSql)
   end if   
   Session(strCookieURL & "GROUP_NAME") = rs2("GROUP_NAME")
   if instr(rs2("GROUP_ICON"), ".") then
      Session(strCookieURL & "GROUP_ICON") = rs2("GROUP_ICON")
   end if
   if instr(rs2("GROUP_IMAGE"), ".") then
      Session(strCookieURL & "GROUP_IMAGE") = rs2("GROUP_IMAGE")
   end if
   rs2.Close  
   set rs2 = nothing  
   Response.Cookies(strCookieURL & "GROUP") = Group
   Response.Cookies(strCookieURL & "GROUP").Expires =  dateAdd("d", intCookieDuration, strForumTimeAdjust)
   if Session(strCookieURL & "GROUP_IMAGE") <> "" then
      strTitleImage = Session(strCookieURL & "GROUP_IMAGE") 
   end if 
end if

strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")
strDBNTFUserName = trim(chkString(Request.Form("Name"),"SQLString"))
if strDBNTFUserName = "" then strDBNTFUserName = trim(chkString(Request.Form("User"),"SQLString"))
if strAuthType = "nt" then
   strDBNTUserName = Session(strCookieURL & "userID")
   strDBNTFUserName = Session(strCookieURL & "userID")
end if

if strRequireReg = "1" and strDBNTUserName = "" then
   if not Instr(strScriptName,"policy.asp") > 0 and _
   not Instr(strScriptName,"register.asp") > 0 and _
   not Instr(strScriptName,"password.asp") > 0 and _
   not Instr(strScriptName,"faq.asp") > 0 and _
   not Instr(strScriptName,"login.asp") > 0 then
      scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
      if Request.QueryString <> "" then
         Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))) & "?" & Request.QueryString)
      else
         Response.Redirect("login.asp?target=" & lcase(scriptname(ubound(scriptname))))
      end if
   end if
end if

select case Request.Form("Method_Type")
   case "login"
      strEncodedPassword = sha256("" & Request.Form("Password"))
      select case chkUser(strDBNTFUserName, strEncodedPassword,-1)
         case 1, 2, 3, 4
            Call DoCookies(Request.Form("SavePassword"))
            strLoginStatus = 1
         case else
            strLoginStatus = 0
         end select
   case "logout"
      Call ClearCookies()
end select

if trim(strDBNTUserName) <> "" and trim(Request.Cookies(strUniqueID & "User")("Pword")) <> "" then
   chkCookie = 1
   mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
   chkCookie = 0
else
   MemberID = -1
   mLev = 0
end if
select case Request.Form("Method_Type")
  case "login"
   if strLoginStatus = 1 then
     AUHandleLoging() 
   end if
  case "logout"
    AUHandleLoging() 
end select
ActiveUserTracker()
' Get Private Message count for display
   if strDBType = "access" then
      strSqL = "SELECT count(M_TO) as [pmcount] "
   else
         strSqL = "SELECT count(M_TO) as pmcount "
      end if
   strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
   strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
   strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
   strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "

   Set rsPM = my_Conn.Execute(strSql)
   pmcount = rsPM("pmcount")

   rsPM.close
   set rsPM = nothing

if mLev = 4 and strEmailVal = "1" and strRestrictReg = "1" and strEmail = "1" then
   '## Forum_SQL - Get membercount from DB 
   strSql = "SELECT COUNT(MEMBER_ID) AS U_COUNT FROM " & strMemberTablePrefix & "MEMBERS_PENDING WHERE M_APPROVE = " & 0

   set rs = Server.CreateObject("ADODB.Recordset")
   rs.open strSql, my_Conn

   if not rs.EOF then
      User_Count = cLng(rs("U_COUNT"))
   else
      User_Count = 0
   end if

   rs.close
   set rs = nothing
end if

Response.Write "<html>" & vbNewline & vbNewline & _
      "<head>" & vbNewline & _
      "<title>" & GetNewTitle(strScriptName) & "</title>" & vbNewline


'## START - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This Forum code is Copyright (C) 2000-05 Michael Anderson, Pierre Gorissen, Huw Reddick and Richard Kinser, Non-Forum Related code is Copyright (C) " & strCopyright & """>" & vbNewline
'## END   - REMOVAL, MODIFICATION OR CIRCUMVENTING THIS CODE WILL VIOLATE THE SNITZ FORUMS 2000 LICENSE AGREEMENT
%>
<!--#INCLUDE FILE="inc_rss.asp" -->
<!--#INCLUDE FILE="addedheadercontent.asp" -->
<%




Response.Write "<link rel=""stylesheet"" type=""text/css"" href=""anylinkvertical.css"" />" & vbNewLine

Response.Write "<script type=""text/javascript"" src=""anylinkvertical.js""></script>" & vbNewLine

Response.Write "<script type=""text/javascript"" src=""overlib.js""><!-- overLIB (c) Erik Bosrup --></script>" & vbNewLine
Response.Write "<script type=""text/javascript"" src=""overlib_fade.js""><!-- overLIB (c) Erik Bosrup --></script>" & vbNewLine
Response.Write "<script type=""text/javascript"" src=""video.js""></script>"
Response.Write "<script language=""JavaScript1.2"" src=""resizeimgs.js""></script>" & vbNewLine
Response.Write "<script src=""smooth.pack.js"" type=""text/javascript""></script>"
Response.Write "<script language=""JavaScript"" type=""text/javascript"">" & vbNewLine & _
      "<!-- hide from JavaScript-challenged browsers" & vbNewLine & _
      "function openWindow(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=400,height=400')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow2(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=400,height=450')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow3(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=400,height=450,scrollbars=yes')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow4(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=400,height=525')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow5(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=450,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow6(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=500,height=450,scrollbars=yes')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow7(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=575,height=475,scrollbars=yes')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow8(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=300,height=575,scrollbars=yes')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow9(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=600,height=500,scrollbars=no')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindow10(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=700,height=275')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openSOTW(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=270,height=325,scrollbars=no')" & vbNewLine & _
      "}" & vbNewLine & _
      "function openWindowHelp(url) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width=470,height=200,scrollbars=yes')" & vbNewLine & _
      "}" & vbNewLine & _
      "// ################## Poll Mod ##################" & vbNewLine & _
      "function openPollWindow(url,w,h) {" & vbNewLine & _
      "  popupWin = window.open(url,'new_page','width='+w+',height='+h+',scrollbars=yes')" & vbNewLine & _
      "}" & vbNewLine & _
      "function submitPoll(btnPressed) {" & vbNewLine & _
      "  btnPressed.disabled=true;" & vbNewLine & _
      "  if (btnPressed.name == ""results"") {" & vbNewLine & _
      "     document.Poll.Method_Type.value = ""guest_vote"";" & vbNewLine & _
      "  } else {" & vbNewLine & _
      "     document.Poll.Method_Type.value = ""member_vote"";" & vbNewLine & _
      "  }" & vbNewLine & _
      "  document.Poll.submit();" & vbNewLine & _
      "}" & vbNewLine & _
      "// #############################################" & vbNewLine & _
      "// done hiding -->" & vbNewLine & _
      "</script>" & vbNewLine & _
      "<style type=""text/css"">" & vbNewLine & _
      "<!--" & vbNewLine & _
      "a:link    {color:" & strLinkColor & ";text-decoration:" & strLinkTextDecoration & "}" & vbNewLine & _
      "a:visited {color:" & strVisitedLinkColor & ";text-decoration:" & strVisitedTextDecoration & "}" & vbNewLine & _
      "a:hover   {color:" & strHoverFontColor & ";text-decoration:" & strHoverTextDecoration & "}" & vbNewLine & _
      "a:active  {color:" & strActiveLinkColor & ";text-decoration:" & strActiveTextDecoration & "}" & vbNewLine & _
      "acronym   {text-decoration:none}" & vbNewLine & _
      ".spnMessageText a:link    {color:" & strForumLinkColor & ";text-decoration:" & strForumLinkTextDecoration & "}" & vbNewLine & _
      ".spnMessageText a:visited {color:" & strForumVisitedLinkColor & ";text-decoration:" & strForumVisitedTextDecoration & "}" & vbNewLine & _
      ".spnMessageText a:hover   {color:" & strForumHoverFontColor & ";text-decoration:" & strForumHoverTextDecoration & "}" & vbNewLine & _
      ".spnMessageText a:active  {color:" & strForumActiveLinkColor & ";text-decoration:" & strForumActiveTextDecoration & "}" & vbNewLine & _
      ".spnSearchHighlight {background-color:" & strSearchHiLiteColor & "}" & vbNewLine & _

      "#keywords{color:#333399;text-decoration:none;border-bottom:1px dashed;line-height:18px;cursor:help;}" & vbNewLine & _
      "#keywords:hover{color:red;text-decoration:none;border-bottom:1px dashed;line-height:18px;cursor:help;}" & vbNewLine & _

      "table.quote {width: 90%; border: 0px " & strTableBorderColor & " solid}" & vbNewLine & _
      ".quotetd {width: 100%; border: 0px #000000 solid}" & vbNewLine & _
      ".quotetd2 {background-color: #FFFFFF ; width: 100%; border: 1px "& strForumLinkColor &" solid; border-collapse: separate; padding: 5}" & vbNewLine & _
      ".quotetext {font-family: ""Verdana"", ""sans-serif""; font-size: 7.5pt}" & vbNewLine & _

      "input.radio {background:" & strPopUpTableColor & ";color:#000000}" & vbNewLine & _
      "textarea {font-family:" & strDefaultFontFace & ";font-size: 10pt;backgroundcolor: #FFFFFF;background-image: url(http://mangionemagic.com/forum/images/textareabackground.jpg);background-position: center;background-repeat: no-repeat;overflow: auto;}" & vbNewLine &_
      "-->" & vbNewLine & _
      "</style>" & vbNewLine & _
      "</head>" & vbNewLine & _
      vbNewLine & _
      "<body onload=walkImages() " & strTmpPageBGImageURL & " bgColor=""" & strPageBGColor & """ text=""" & strDefaultFontColor & """ link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strVisitedLinkColor & """>" & vbNewLine & _
"<script type=""text/javascript"" src=""wz_tooltip.js""></script>" & vbNewLine & _
"<script type=""text/javascript"" src=""./tip_balloon/tip_balloon.js""></script>" & vbNewLine & _
      "<a name=""top""></a>" & vbNewLine
if strSiteIntegEnabled = "1" then
  response.write "<table width=""100%"" border="""
   if strSiteBorder = "1" then
      response.write "1"
   else
      response.write "0"
   end if
   response.write """ cellspacing=""0"" cellpadding=""0"">" & vbNewLine
  if strSiteHeader = "1" then
    response.write "  <tr>" & vbNewLine & _
    "    <td"
    if strSiteLeft = "1" or strSiteRight = "1" then
      if strSiteLeft = "1" and strSiteRight = "1" then
        Response.write " colspan=""3"""
      else
      Response.write " colspan=""2"""
      end if
    end if
    response.write ">"
    %><!--#include file="inc_site_header.asp"--><%
    response.write "</td>" & vbNewLine & _
    "  </tr>" & vbNewLine
  end if
  response.write "  <tr>" & vbNewLine & _
  "    <td valign=""top"">" & vbNewLine
  if strSiteLeft = "1" then
    %><!--#include file="inc_site_left.asp"--><%
    response.write "</td>" & vbNewLine & _
    "  <td valign=""top"">" & vbNewLine
  end if
end if
response.write vbNewLine & _
      "<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
      "  <tr>" & vbNewLine & _
      "    <td align=""left"" valign=""top"">" & vbNewLine & _
      "      <table border=""0"" cellPadding=""2"" cellSpacing=""0"">" & vbNewLine & _
      "        <tr>" & vbNewLine & _
      "          <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine
call sForumNavigation()
Response.Write "</font></td>" & vbNewLine & _
      "        </tr>" & vbNewLine

select case Request.Form("Method_Type")

   case "login"
      Response.Write "      </table>" & vbNewLine & _
            "    </td>" & vbNewLine & _
            "  </tr>" & vbNewLine & _
            "</table>" & vbNewLine
      if strLoginStatus = 0 then
         Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Your username and/or password were incorrect.</font></p>" & vbNewLine & _
               "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Please either try again or register for an account.</font></p>" & vbNewLine
      else
         Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged on successfully!</font></p>" & vbNewLine & _
               "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine
      end if
      Response.Write "<meta http-equiv=""Refresh"" content=""2; URL=" & strReferer & """>" & vbNewLine & _
            "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""" & strReferer & """>Back To Forum</font></a></p>" & vbNewLine & _
            "<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""95%"">" & vbNewLine & _
            "  <tr>" & vbNewLine & _
            "    <td>" & vbNewLine
      WriteFooter
      Response.End
   case "logout" 
      Response.Write "      </table>" & vbNewLine & _
            "    </td>" & vbNewLine & _
            "  </tr>" & vbNewLine & _
            "</table>" & vbNewLine & _
            "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>You logged out successfully!</font></p>" & vbNewLine & _
            "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Thank you for your participation.</font></p>" & vbNewLine & _
            "<meta http-equiv=""Refresh"" content=""2; URL=default.asp"">" & vbNewLine & _
            "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""default.asp"">Back To Forum</font></a></p>" & vbNewLine & _
            "<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine & _
            "  <tr>" & vbNewLine & _
            "    <td>" & vbNewLine
      WriteFooter
      Response.End
end select

if (mlev = 0) then
   if not(Instr(Request.ServerVariables("Path_Info"), "register.asp") > 0) and _
   not(Instr(Request.ServerVariables("Path_Info"), "policy.asp") > 0) and _
   not(Instr(Request.ServerVariables("Path_Info"), "pop_profile.asp") > 0) and _
   not(Instr(Request.ServerVariables("Path_Info"), "searchforum.asp") > 0) and _
   not(Instr(Request.ServerVariables("Path_Info"), "login.asp") > 0) and _
   not(Instr(Request.ServerVariables("Path_Info"), "password.asp") > 0) and _
   not(Instr(Request.ServerVariables("Path_Info"), "faq.asp") > 0) and _
   not(Instr(Request.ServerVariables("Path_Info"), "post.asp") > 0) then
      Response.Write "        <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form1"" name=""form1"">" & vbNewLine & _
            "        <input type=""hidden"" name=""Method_Type"" value=""login"">" & vbNewLine & _
            "        <tr>" & vbNewLine & _
            "          <td align=""left"">" & vbNewLine & _
            "            <table>" & vbNewLine & _
            "              <tr>" & vbNewLine
      if (strAuthType = "db") then
         Response.Write "                <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Username:</b></font><br />" & vbNewLine & _
               "                <input type=""text"" name=""Name"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
               "                <td><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Password:</b></font><br />" & vbNewLine & _
               "                <input type=""password"" name=""Password"" size=""10"" maxLength=""25"" value=""""></td>" & vbNewLine & _
               "                <td valign=""bottom"">" & vbNewLine
         if strGfxButtons = "1" then
            Response.Write "                <input src=""" & strImageUrl & "button_login.gif"" type=""image"" border=""0"" value=""Login"" id=""submit1"" name=""Login"">" & vbNewLine
         else
            Response.Write "                <input type=""submit"" value=""Login"" id=""submit1"" name=""submit1"">" & vbNewLine
         end if 
         Response.Write "                </td>" & vbNewLine & _
               "              </tr>" & vbNewLine & _
               "              <tr>" & vbNewLine & _
               "                <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
               "                <input type=""checkbox"" name=""SavePassWord"" value=""true"" tabindex=""-1"" CHECKED><b> Save Password</b></font></td>" & vbNewLine
      else
         if (strAuthType = "nt") then 
            Response.Write "                <td><font face=""" & strDefaultFontFace & """ size=""1""  color=""" & strHiLiteFontColor & """>Please <a href=""policy.asp"" tabindex=""-1"">register</a> to post in these Forums</font></td>" & vbNewLine
         end if
      end if 
      Response.Write "              </tr>" & vbNewLine
      if (lcase(strEmail) = "1") then
         Response.Write "              <tr>" & vbNewLine & _
               "                <td colspan=""3"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
               "                <a href=""password.asp""" & dWStatus("Choose a new password if you have forgotten your current one...") & " tabindex=""-1"">Forgot your "
         if strAuthType = "nt" then Response.Write("Admin ")
         Response.Write "Password?</a>" & vbNewLine
         if (lcase(strNoCookies) = "1") then
            Response.Write "                |" & vbNewLine & _
                  "                <a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>" & vbNewLine
         end if
         Response.Write "                <br /><br /></font></td>" & vbNewLine & _
               "              </tr>" & vbNewLine
      end if
      Response.Write "            </table>" & vbNewLine & _
            "          </td>" & vbNewLine & _
            "        </tr>" & vbNewLine & _
            "        </form>" & vbNewLine
   end if
else
   Response.Write "        <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _
         "        <input type=""hidden"" name=""Method_Type"" value=""logout"">" & vbNewLine & _
         "        <tr>" & vbNewLine & _
         "          <td align=""left"">" & vbNewLine & _
         "            <table>" & vbNewLine & _
         "              <tr>" & vbNewLine & _
         "                <td align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>"
call getGreeting()
Response.Write  "" & vbNewLine
   if strAuthType="nt" then
      Response.Write "<b>" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")</b></font></td>" & vbNewLine & _
            "                <td> "
   else 
      if strAuthType = "db" then 
         Response.Write "<b>" & profileLink(ChkString(strDBNTUserName, "display"),MemberID) & "</b></font></td>" & vbNewLine & _
               "                <td>"
         if strGfxButtons = "1" then
            Response.Write "<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
         else
            Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"
         end if 
      end if 
   end if 
   Response.Write "</td>" & vbNewLine & _
         "              </tr>" & vbNewLine & _
         "            </table>" & vbNewLine & _
         "          </td>" & vbNewLine & _
         "        </tr>" & vbNewLine
'###Chat###
KCname=strDBNTUserName
'###Chat###
   if (mlev = 4) or (lcase(strNoCookies) = "1") then
      Response.Write "        <tr>" & vbNewLine & _
            "          <td align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><a href=""admin_home.asp""" & dWStatus("Access the Forum Admin Functions...") & " tabindex=""-1"">Admin Options</a>"
      if mLev = 4 and (strEmailVal = "1" and strRestrictReg = "1" and strEmail = "1" and User_Count > 0) then Response.Write(" | <a href=""admin_accounts_pending.asp""" & dWStatus("(" & User_Count & ") Member(s) awaiting approval") & " tabindex=""-1"">(" & User_Count & ") Member(s) awaiting approval</a>")
      Response.Write "<br /><br /></font></td>" & vbNewLine & _
            "        </tr>" & vbNewLine
   end if
   Response.Write "        </form>" & vbNewLine
end if
Response.Write "      </table>" & vbNewLine & _
      "    </td>" & vbNewLine & _
      "  </tr>" & vbNewLine & _
      "</table>" & vbNewLine & _
      "<table align=""center"" border=""0"" cellPadding=""0"" cellSpacing=""0"" width=""100%"">" & vbNewLine
'########### GROUP Categories ########### %>
<!--#INCLUDE FILE="inc_groupjump_to.asp" -->
<% '######## GROUP Categories ##############
Response.Write "  <tr>" & vbNewLine & _
      "    <td>" & vbNewLine

sub sForumNavigation()
   ' DEM --> Added code to show the subscription line
   if strSubscription > 0 and strEmail = "1" then
      if mlev > 0 then
         strSql = "SELECT COUNT(*) AS MySubCount FROM " & strTablePrefix & "SUBSCRIPTIONS"
         strSql = strSql & " WHERE MEMBER_ID = " & MemberID
         set rsCount = my_Conn.Execute (strSql)
         if rsCount.BOF or rsCount.EOF then
            ' No Subscriptions found, do nothing
            MySubCount = 0
            rsCount.Close
            set rsCount = nothing
         else
            MySubCount = rsCount("MySubCount")
            rsCount.Close
            set rsCount = nothing
         end if
         if mLev = 4 then
            strSql = "SELECT COUNT(*) AS SubCount FROM " & strTablePrefix & "SUBSCRIPTIONS"
            set rsCount = my_Conn.Execute (strSql)
            if rsCount.BOF or rsCount.EOF then
               ' No Subscriptions found, do nothing
               SubCount = 0
               rsCount.Close
               set rsCount = nothing
            else
               SubCount = rsCount("SubCount")
               rsCount.Close
               set rsCount = nothing
            end if
         end if
      else
         SubCount = 0
         MySubCount = 0
      end if
   else
      SubCount = 0
      MySubCount = 0
   end if
   Response.Write "          <a href=""default.asp""" & dWStatus("Forum Home") & " tabindex=""-1""><acronym title=""Mangione Magic Forum Home"">Forum</acronym></a>" & vbNewline & _
         "          |" & vbNewline
   if strUseExtendedProfile then 
      Response.Write "          <a href=""pop_profile.asp?mode=Edit""" & dWStatus("Edit your personal profile...") & " tabindex=""-1""><acronym title=""Edit your personal profile..."">Profile</acronym></a>" & vbNewline
   else
      Response.Write "          <a href=""javascript:openWindow3('pop_profile.asp?mode=Edit')""" & dWStatus("Edit your personal profile...") & " tabindex=""-1""><acronym title=""Edit your personal profile..."">Profile</acronym></a>" & vbNewline
   end if 
   if strAutoLogon <> "1" then
      if strProhibitNewMembers <> "1" then
         Response.Write "          |" & vbNewline & _
               "          <a href=""policy.asp""" & dWStatus("Register to post to our forum...") & " tabindex=""-1""><acronym title=""Register to post to our forum..."">Register</acronym></a>" & vbNewline
      end if
   end if
   Response.Write "          |" & vbNewline & _
         "          <a href=""active.asp""" & dWStatus("See what topics have been active since your last visit...") & " tabindex=""-1""><acronym title=""See what topics have been active since your last visit..."">Active Topics</acronym></a>" & vbNewline
Response.Write "          |"  & vbNewline & _
         "          <a href=""active_polls.asp""" & dWStatus("See all the active polls...") & " tabindex=""-1""><acronym title=""See all the active polls..."">Polls</acronym></a>" & vbNewline 
   ' DEM --> Start of code added to show subscriptions if they exist
   if (strSubscription > 0) then
      if mlev = 4 and SubCount > 0 then
         Response.Write "          |" & vbNewline & _
               "          <a href=""subscription_list.asp?MODE=all""" & dWStatus("See all current subscriptions") & " tabindex=""-1""><acronym title=""See all current subscriptions"">Subscriptions</acronym></a>" & vbNewline
      end if
      if MySubCount > 0 then
         Response.Write "          |" & vbNewline & _
               "          <a href=""subscription_list.asp""" & dWStatus("See all of your subscriptions") & " tabindex=""-1""><acronym title=""See all of your subscriptions"">My Subscriptions</acronym></a>" & vbNewline
      end if
   end if
   ' DEM --> End of Code added to show subscriptions if they exist
   Response.Write "          |" & vbNewline & _
         "          <a href=""members.asp""" & dWStatus("Current members of these forums...") & " tabindex=""-1""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _
         "          |" & vbNewline
         If strPMStatus = "1" then
   Response.Write "          <a href=""pm_view.asp""" & dWStatus("Check Your Private Messages...") & " tabindex=""-1""><acronym title=""Check Your Private Messages..."">PM"
         if pmcount > 0 then Response.Write " (<font color=""" & strActiveLinkColor & """><b>" & pmcount & " New</b></font>) " & getCurrentIcon(strIconPmAlert,"Check Your Private Messages...","hspace=""0""")
   Response.Write "</acronym></a>" & vbNewline & _
         "          |" & vbNewline
         end if
   Response.Write "          <a href=""searchforum.asp"
   if Request.QueryString("FORUM_ID") <> "" then Response.Write("?FORUM_ID=" & cLng(Request.QueryString("FORUM_ID")))
   Response.Write """" & dWStatus("Perform a search by keyword, date, and/or name...") & " tabindex=""-1""><acronym title=""Perform a search by keyword, date, and/or name..."">Search Forum</acronym></a>" & vbNewline & _
         "          |" & vbNewline & _


         "          <a href=""faq.asp""" & dWStatus("Answers to Frequently Asked Questions...") & " tabindex=""-1""><acronym title=""Answers to Frequently Asked Questions..."">FAQ</acronym></a>" & vbNewline

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
   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
end if
if strPSwitch=0 then
   'Do nothing
else
   Response.Write "| <a href=""petition.asp""" & dWStatus("Sign The Petition!") & " tabindex=""-1""><acronym title=""There are currently " & intPCount & " signatures!""><font face=""" & strDefaultFontFace & """ size=""" & strfooterFontSize & """><br>Sign The Petition! (" & intPCount & ")</acronym></a>     " & vbNewline
end if


'         "          <a href=""petition.asp""" & dWStatus("Sign the petition") & " tabindex=""-1""><acronym title=""Sign the petition"">Sign The Petition!</acronym></a>" & vbNewline
'            "          |" & vbNewline & _
'         "<a href=""JavaScript:openWindow('pop_tell_a_friend.asp?url=" & strForumURL & "')""" & dWStatus("Invite a friend") & " tabindex=""-1""><acronym title=""Invite a Friend"">Invite</acronym></a>" & vbNewline
'      "        |" & vbNewline & _
'        "<a href=""javascript:openSOTW('sotw_popup.asp?url=" & strForumURL & "')""" & dWStatus("Listen to the Song of the Week") & " tabindex=""-1""><acronym title=""Listen to the Song of the Week"">SOTW</acronym></a>"
'########### STATs LINK  ###########
'if mLev = 4 then
'  Response.Write "          |" & vbNewline & _
'        "          <a href=""member_stats.asp""" & dWStatus("Site Stats") & " tabindex=""-1""><acronym 'title=""Site Statistics"">Stats</a>" & vbNewLine 
'end if
'########### STATs LINK ###########         
end sub
'###Include file for Chat###
%>
<!--#INCLUDE FILE="chat/inc_chat.asp" --><br /><br />
<%
'###Chat File Above###
if strGroupCategories = "1" then
   if Session(strCookieURL & "GROUP_NAME") = "" then
      GROUPNAME = " Default Groups "
   else
      GROUPNAME = Session(strCookieURL & "GROUP_NAME")
   end if
   'Forum_SQL - Get Groups
   strSql = "SELECT GROUP_ID, GROUP_CATID " 
   strSql = strSql & " FROM " & strTablePrefix & "GROUPS "
   strSql = strSql & " WHERE GROUP_ID = " & Group
   set rsgroups = Server.CreateObject("ADODB.Recordset")
   rsgroups.Open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText
   if rsgroups.EOF then
      recGroupCatCount = ""
   else
      allGroupCatData = rsgroups.GetRows(adGetRowsRest)
      recGroupCatCount = UBound(allGroupCatData, 2)
   end if
   rsgroups.Close
   set rsgroups = nothing
end if
%>
<!--#INCLUDE FILE="inc_ipgate.asp"-->

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 30 July 2008 19:15:25
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 30 July 2008 :  19:35:13  Show Profile  Visit leatherlips's Homepage
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Andy Humm</i>
<br />line 82
<font color="green">'Response.Write " <a href=""javascript:onClick=window.print()"">Print Petition</a> | <a href=""JavaScript:onClick=window.close()"">Close Window</a></font><br />" & vbNewline & _</font id="green">

seems to be trapped into the loop and you get as many signatures as you have Print petition|Close window links at the top.
<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">

I spotted that too. I made a little more modifications as well. Here is the one I currently have thanks to Carefree's help:

<%
'## 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
'##
'################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<%
   Sign=0
   set my_Conn= Server.CreateObject("ADODB.Connection")
   my_Conn.Open strConnString
   strSql = "SELECT P_MESSAGE FROM "& strTablePrefix & "P_OPTIONS"
   set rsPrint = my_Conn.Execute (strSql)
   if rsPrint.BOF or rsPrint.EOF then
      'Do nothing
   else
      P_MESS=rsPrint("P_MESSAGE")
      P1="<br><br>"
      P_MESSAGE=P1+P_MESS+P1
   end if
   rsPrint.close
   set rsPrint=nothing

      Response.Write "<table border=""0"" width=""95%"" cellspacing=""0"" cellpadding=""0"" align=""center"">" & vbNewLine & _
      "  <tr>" & vbNewLine & _
      "     <td bgcolor=""#FFFFFF"">" & vbNewLine & _
      "        <table border=""0"" width=""100%"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
      "           <tr>" & vbNewLine & _
      "              <td colspan=""8"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href=""javascript:onClick=window.print()"">Print Signatures</a> | <a href=""JavaScript:onClick=window.close()"">Close Window</a></font><br />" & vbNewline & _
      "              </td>" & vbNewLine & _
      "           </tr>" & vbNewLine & _
      "           <tr>" & vbNewLine & _
      "              <td colspan=""8"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Petition Signatures" & vbNewLine & _
      "              </td>" & vbNewLine & _
      "           </tr>" & vbNewLine & _
      "           <tr>" & vbNewLine & _
      "              <td colspan=""8"" align=""left""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & P_MESSAGE & "" & vbNewLine & _
      "              </td>" & vbNewLine & _
      "           </tr>" & vbNewLine

   set my_Conn= Server.CreateObject("ADODB.Connection")
   my_Conn.Open strConnString
   strSql = "SELECT P_NAME, P_DATE, P_VARFIELD1, P_VARFIELD2, P_VARFIELD3 FROM "& strTablePrefix & "PETITION"
   set rsPrint = my_Conn.Execute (strSql)
   rsPrint.movefirst
   Do Until rsPrint.EOF
      strPName=rsPrint("P_NAME")
      strPDT=DateToStr(rsPrint("P_DATE"))
      strPField1=rsPrint("P_VARFIELD1")
      strPField2=rsPrint("P_VARFIELD2")
      strPField3=rsPrint("P_VARFIELD3")
      Sign=Sign+1
      strPDAT=strtodate(rsPrint("P_DATE").Value)
      'strPDAT=chkDate(" & strPDT, "", true)
Response.Write"           <tr>" & vbNewLine & _
         "              <td colspan=""1""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & Sign & ". " & strPName & " " & vbNewLine & _
         "              </td>" & vbNewLine & _
         "              <td colspan=""1""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strPField1 & " " & vbNewLine & _
         "              </td>" & vbNewLine & _
         "              <td colspan=""1""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strPField2 & " " & vbNewLine & _
         "              </td>" & vbNewLine & _
         "              <td colspan=""1""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>" & strPField3 & " " & vbNewLine & _
         "              </td>" & vbNewLine & _
         "              <td colspan=""1""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>"  & strPDAT & "" & vbNewLine & _
         "              </td>" & vbNewLine & _
         "           </tr>" & vbNewLine
      rsPrint.movenext
   Loop
   rsPrint.close
   set rsPrint=nothing
   Response.Write "        </table>" & vbNewLine & _
   "     </td>" & vbNewLine & _
   "  </tr>" & vbNewLine & _
   "</table>"
WriteFooterShort
Response.End
%>

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 30 July 2008 19:41:19
Go to Top of Page

Massimo
Junior Member

Italy
125 Posts

Posted - 30 July 2008 :  20:10:13  Show Profile  Visit Massimo's Homepage
Remove in petition.asp this include not on original snitz:

<!--#INCLUDE FILE="googiespell/inc_googie.asp" -->


and...

End if
If strIcons = "1" and strShowSmiliesTable = "1" Then

<!--#INCLUDE FILE="inc_smilies.asp" --> (why this include? this not work?!)


replace whit:


If strIcons = "1" and strShowSmiliesTable = "1" Then
%>
<!--#INCLUDE FILE="inc_smilies.asp" -->
<%
End If

End If
Response.Write " </font></td>" & vbNewLine & _
<

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


Edited by - Massimo on 30 July 2008 20:34:18
Go to Top of Page
Page: of 6 Previous Topic Topic Next Topic  
Previous Page | 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.75 seconds. Powered By: Snitz Forums 2000 Version 3.4.07