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: General / Classic ASP versions(v3.4.XX)
 Inc_top.asp
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Darthmyr
Starting Member

USA
20 Posts

Posted - 18 May 2002 :  21:27:31  Show Profile  Visit Darthmyr's Homepage
Could someone look at my code and see why my "Subscription" item is not displaying in the menu?

Here's the current code, note that there are some add-ins, which I probably caused the problem when I installed it.

I should mention before you read through the entire code that the only changes I made were near the bottom, when you define the menu choices.

You can see the actual forum at http://www.sawgrasstech.com/ac2/default.asp

<%
'#################################################################################
'## Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen
'##
'## 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 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 support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################

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


dim mLev, strLoginStatus, MemberID
dim strArchiveTablePrefix

strArchiveTablePrefix = strTablePrefix & "A_"

if Application("down") then
if not Instr(request.servervariables("script_name"),"admin_") > 0 then
Response.redirect("down.asp")
end if
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

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

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

mLev = cint(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword")))
' DEM --> Added code for moderation and subscription
if strDBNTUserName <> "" then
MemberID = getMemberNumber(strDBNTUserName)
else
MemberID=0
end if

Response.Write "<html>" & vbNewline & vbNewline & _
"<head>" & vbNewline & _
"<title>" & strForumTitle & "</title>" & vbNewline
'## START - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE Snitz FORUMS 2000 LICENSE AGREEMENT
Response.Write "<meta name=""copyright"" content=""This code is Copyright (C) 2000-01 Michael Anderson and Pierre Gorissen"">" & vbNewline
'## END - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE Snitz FORUMS 2000 LICENSE AGREEMENT
%>
<script language="JavaScript">
<!-- hide from JavaScript-challenged browsers
function openWindow(url) {
popupWin = window.open(url,'new_page','width=400,height=400')
}
function openWindow2(url) {
popupWin = window.open(url,'new_page','width=400,height=450')
}
function openWindow3(url) {
popupWin = window.open(url,'new_page','width=400,height=450,scrollbars=yes')
}
function openWindow4(url) {
popupWin = window.open(url,'new_page','width=400,height=525')
}
<%'###################### SMILIE MOD ################### %>
function openWindow5(url) {
popupWin = window.open(url,'new_page','width=500,height=500,scrollbars=yes')
}
<%'######################################################%>

function openWindow5(url) {
popupWin = window.open(url,'new_page','width=450,height=525,scrollbars=yes,toolbars=yes,menubar=yes,resizable=yes')
}
// done hiding -->
</script>
<style type=text/css>
<!--
a:link {color:<% =strLinkColor %>;text-decoration:<% =strLinkTextDecoration %>}
a:visited {color:<% =strVisitedLinkColor %>;text-decoration:<% =strVisitedTextDecoration %>}
a:hover {color:<% =strHoverFontColor %>;text-decoration:<% =strHoverTextDecoration %>}
input.radio {background: <% = strPopUpTableColor %>; color:#000000}
-->
</style>
<meta name="Microsoft Border" content="tlb, default">
</head>
<!--#INCLUDE FILE="inc_activeusers.asp" --><% '<-- ACTIVE USERS 3.5 CODE: 1 LINE%>
<body bgColor="<% =strPageBGColor %>" text="<% =strDefaultFontColor %>" link="<% =strLinkColor %>" aLink="<% =strActiveLinkColor %>" vLink="<% =strActiveLinkColor %>"><!--msnavigation--><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td><table border="0" cellpadding="0" cellspacing="0" width="100%" height="70">
<tr>
<td rowspan="3" background="_borders/SleekGrey/sgylogo.gif" width="145" height="70" valign="top" align="left">
<img border="0" src="_borders/SleekGrey/sgytoplogo.gif" width="145" height="5"><br>
<img border="0" src="_borders/SleekGrey/sgyleftlogo.gif" width="6" height="65"><img border="0" src="_borders/ac2_logo.jpg" align="top" width="125" height="65"></td>
<td rowspan="3" width="65" height="70">
<img border="0" src="_borders/SleekGrey/sgybanL.gif" width="65" height="70"></td>
<th nowrap width="100%" background="_borders/SleekGrey/sgybannerbg.gif" valign="top" height="40"> 
<font size="2"><em>
</em></font> </th>
<td rowspan="3" width="70" height="70">
<img border="0" src="_borders/SleekGrey/sgybanR.gif" width="70" height="70"></td>
</tr>
<tr>
<td nowrap width="100%" background="_borders/SleekGrey/sgybanbot1.gif" height="20">
<p align="center" style="text-indent: 0; line-height: 0; word-spacing: 0; margin: 0"><font size="1">  
</font></td>
</tr>
<tr>
<th nowrap width="100%" background="_borders/SleekGrey/sgybanbot2.gif" height="10">
<img border="0" src="_borders/SleekGrey/sgybanbot2.gif" width="25" height="10"></th>
</tr>
</table></td></tr><!--msnavigation--></table><!--msnavigation--><table dir="ltr" border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top" width="1%" background="_borders/SleekGrey/sgyLbg1.gif"><table border="0" cellpadding="0" cellspacing="0" width="145" height="100%" background="_borders/SleekGrey/sgyLbg.gif">
<tr>
<td colspan="3" background="_borders/SleekGrey/sgyapplet.gif" height="38" width="145"><font size="2">   
</font><a href="http://www.frontlook.com">
<applet codebase ="_frontlook" code ="Ticker.class" width ="100" height ="18">
<param name=AppBGImage value=_frontlook/sgyappletbg.gif>
<param name=DelayBetweenChars value=18>
<param name=DelayBetweenRuns value=991>
<param name=HorizCenter value=true>
<param name=VertCenter value=true>
<param name=Font value=Helvetica>
<param name=Style value=Bold>
<param name=PointSize value=12>
<param name=TextCount value=1>
<param name=text1 value="Welcome to Darthmyr's new Asheron's Call 2 Site!! Email me with what you would like to see added OR removed from the site.">
<param name=MoveDist value=1>
You need a Java enabled browser!</applet>

</a></td>
</tr>
<tr>
<td colspan="3" width="145" height="27">
<img border="0" src="_borders/SleekGrey/sgyappletbot.gif" width="145" height="27"></td>
</tr>
<tr>
<td width="15" valign="top" background="_borders/SleekGrey/sgyvnleft.gif">
<img border="0" src="_borders/SleekGrey/sgyvnleft.gif" width="15" height="30"></td>
<td width="120" valign="top" background="_borders/SleekGrey/sgyvnbgr.gif"><font color="#D398D3" size="2"><em>
</em></font></td>
<td width="10" valign="top" background="_borders/SleekGrey/sgyvnright.gif">
<img border="0" src="_borders/SleekGrey/sgyvnright.gif" width="10" height="30"></td>
</tr>
<tr>
<td valign="top" height="100%" background="_borders/SleekGrey/sgyLbg.gif" colspan="3" width="145">
<p align="center"><br>
<font size="2">
<a target="_blank" style="color: #FFFFFF" href="http://zone.msn.com/asheronscall2/default.asp">
AC2 Support Site</a></font></p>
<p align="center"><font size="2" color="#FFFFFF">
<a target="_blank" href="http://vnboards.ign.com/board.asp?brd=5427">
<font color="#FFFFFF">Vault AC2 Forum</font></a></font><br>
<br>
<font size="2" face="Arial"><b><span style="background-color: #FFFFFF"></span></b></font><br>
<br>
<br>
</td>
</tr>
</table></td><td valign="top" width="24"></td><!--msnavigation--><td valign="top">
<a name="top"></a><font face="<% =strDefaultFontFace %>">

<table align="center" border="0" cellPadding="0" cellSpacing="0" width="100%">
<tr>
<td valign="top" width="50%"><a href="default.asp"><img alt="<% =strForumTitle %>" border="0" src="<%=strTitleImage%>"></a></td>
<td align="center" valign="top" width="50%">
<table border="0" cellPadding="2" cellSpacing="0">
<tr>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b><% =strForumTitle %></b></font></td>
</tr>
<tr>
<td align="center"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<% call sForumNavigation() %>
</font></td>
</tr>
<%
select case Request.Form("Method_Type")

case "login"
%>
</table>
</td>
</tr>
</table>
<% if strLoginStatus = 0 then %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Your username and/or password were incorrect.</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Please either try again or register for an account.</font></p>
<% else %>
<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">You logged on successfully!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Thank you for your participation.</font></p>
<% end if %>
<meta http-equiv="Refresh" content="2; URL=<% =Request.ServerVariables("HTTP_REFERER") %>">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% =Request.ServerVariables("HTTP_REFERER") %>">Back To Forum</font></a></p>

<% WriteFooter
Response.End
case "logout"
%>
</table>
</td>
</tr>
</table>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">You logged out successfully!</font></p>

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strHeaderFontSize %>">Thank you for your participation.</font></p>

<meta http-equiv="Refresh" content="2; URL=<% =Request.ServerVariables("HTTP_REFERER") %>">

<p align="center"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><a href="<% =Request.ServerVariables("HTTP_REFERER") %>">Back To Forum</font></a></p>

<% WriteFooter
Response.End
end select

if (chkUser((strDBNTUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 0) then
%>
<form action="<% =Request.ServerVariables("URL") %>" method="post" id=form1 name=form1>
<INPUT type="hidden" name="Method_Type" value="login">
<tr>
<td align="center">
<table>
<tr>
<% if (strAuthType = "db") then %>
<td><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><b>Username:</b></font><br>
<INPUT type="text" name="Name" size="10" value=""></td>
<td><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>"><b>Password:</b></font><br>
<INPUT type="password" name="Password" size="10" value=""></td>
<td valign="bottom">
<% if strGfxButtons <> "0" then %>
<INPUT src=button_login.gif type="image" value="Login" id=submit1 name=submit1 border=0 hspace=4>
<%
else
if strGfxButtons = "0" then
%>
<INPUT type="submit" value="Login" id=submit1 name=submit1>
<%
end if
end if
%>
</td>
</tr>
<tr>
<td colspan="3" align="left"><font face="<% =strDefaultFontFace %>" size="<%=strFooterFontSize %>">
<INPUT type="checkbox" name="SavePassWord" value="true" CHECKED><b> Save Password</b></font>
</td>
<%
else
if (strAuthType = "nt") then
%>
<td><font face="<% =strDefaultFontFace %>" size="1" color="red">Please <a href="policy.asp">register</a> to post in these Forums</font></td>
<%
end if
end if
%>
</tr>
<% if (lcase(strEmail) = "1") then %>
<tr>
<td colspan="3" align="left"><font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<a href="JavaScript:openWindow('pop_pword.asp')">Forgot your <% if strAuthType = "nt" then %>admin <% end if %>Password?</a>
<% if (lcase(strNoCookies) = "1") then %>
|
<a href="admin_home.asp">Admin Options</a>
<% end if %>
</font></td>
</tr>
<% end if %>
</table>
</td>
</tr>
</form>
<% else %>
<form action="<% =Request.ServerVariables("URL") %>" method="post" id=form2 name=form2>
<INPUT type="hidden" name="Method_Type" value="logout">
<tr>
<td align="center">
<table>
<tr>
<td align="center">
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
You are logged on as<br>
<% if strAuthType="nt" then %>
<b><% =Session(strCookieURL & "username")%> (<% =Session(strCookieURL & "userid") %>)</b>
</font>
</td>
<td> 
<%
else
if strAuthType = "db" then
%>
<b><% = ChkString(strDBNTUserName, "display") %></b>
</font>
</td>
<td>
<% if strGfxButtons <> "0" then %>
<INPUT src=button_logout.gif type="image" value="Logout" id=submit1 name=submit1 border=0 hspace=4>
<%
else
if strGfxButtons = "0" then
%>
<INPUT type="submit" value="Logout" id=submit1 name=submit1>
<%
end if
end if
end if
end if
%>
</td>
</tr>
</table>
</td>
</tr>
<% if (mlev = 4) or (lcase(strNoCookies) = "1") then %>
<tr>
<td align="center">
<font face="<% =strDefaultFontFace %>" size="<% =strFooterFontSize %>">
<a href="admin_home.asp">Admin Options</a>
</font>
</td>
</tr>
<% end if %>
</form>
<% end if %>
</table>
</td>
</tr>
</table>
<table align="center" border="0" cellPadding="0" cellSpacing="0" width="95%">
<tr>
<td>
<%
sub sForumNavigation()
' DEM --> Added code to show the subscription line
if mlev > 0 then
strSql = "SELECT COUNT(*) AS SubCount FROM " & strTablePrefix & "SUBSCRIPTIONS"
if mlev <> 4 then
strSql = strSql & " WHERE MEMBER_ID = " & MemberID
end if
set rsCount = my_Conn.Execute (strSql)
if rsCount.BOF or rsCount.EOF then
' No Subscriptions found, do nothing
else
SubCount = rsCount("SubCount")
rsCount.Close
set rsCount = nothing
end if
else
SubCount = 0
end if

Response.Write " <a target=""_parent"" href=""" & strHomeURL & """> <acronym title=""Homepage"">Home</acronym></a>" & vbNewline & _
" |" & vbNewline
if strUseExtendedProfile then
Response.Write " <a href=""pop_profile.asp?mode=Edit""><acronym title=""Edit your personal profile..."">Profile</acronym></a>" & vbNewline
else
Response.Write " <a href=""javascript:openWindow3('pop_profile.asp?mode=Edit')""><acronym title=""Edit your personal profile..."">Profile</acronym></a>" & vbNewline
end if
if strAutoLogon <> 1 then
Response.Write " |" & vbNewline & _
" <a href=""policy.asp""><acronym title=""Register to post to our forum..."">Register</acronym></a>" & vbNewline
end if
Response.Write " |" & vbNewline & _
" <a href=""active.asp""><acronym title=""See what topics have been active since your last visit..."">Active Topics</acronym></a>" & vbNewline
' DEM --> Start of code added to show subscriptions if they exist
if SubCount > 0 then
if mlev = 4 then
Response.Write " |" & vbNewline & _
" <a href=""subscription_list.asp?MODE=all""><acronym title=""See all current subscriptions"">All Subscriptions</acronym></a>" & vbNewline
end if
Response.Write " |" & vbNewline & _
" <a href=""subscription_list.asp""><acronym title=""See all of my subscriptions"">My Subscriptions</acronym></a>" & vbNewline
end if
' DEM --> End of Code added to show subscriptions if they exist
Response.Write " |" & vbNewline & _
" <a href=""statistics.asp""><acronym title=""Statistics..."">Statistics</acronym></a>" & vbNewline & _
" |" & vbNewline & _
" <a href=""statistics2.asp""><acronym title=""Statistics..."">Statistics 2</acronym></a>" & vbNewline & _
" |" & vbNewline & _
" <a href=""members.asp""><acronym title=""Current members of these forums..."">Members</acronym></a>" & vbNewline & _
" |" & vbNewline & _
" <a href=""search.asp""><acronym title=""Perform a search by keyword, date, and/or name..."">Search</acronym></a>" & vbNewline & _
" |" & vbNewline & _
" <a href=""faq.asp""><acronym title=""Answers to Frequently Asked Questions..."">FAQ</acronym></a>" & vbNewline
end sub

%>

Thanks to anyone who can solve this for me.



Edited by - Darthmyr on 18 May 2002 21:29:11

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 18 May 2002 :  21:37:24  Show Profile
i would say that

  
if SubCount > 0 then
if mlev = 4 then


subcount is not > than 0 and mlev is not 4

.:: Brother Beyond::.
Go to Top of Page

Darthmyr
Starting Member

USA
20 Posts

Posted - 18 May 2002 :  21:44:59  Show Profile  Visit Darthmyr's Homepage
I don't know ASP yet. I see the lines you are referring to, but what change do you suggest?

Thanks

Go to Top of Page

Hamlin
Advanced Member

United Kingdom
2386 Posts

Posted - 18 May 2002 :  21:50:15  Show Profile
sorry i dont know where these variables are set, as far as i can see that part of the code is the same as mine so i assume its correct...cant be any more help

it does say if subscriptions exist, are u sure that they do? thats all i can think off

.:: Brother Beyond::.

Edited by - brother beyond on 18 May 2002 21:51:10

Edited by - brother beyond on 18 May 2002 21:52:57
Go to Top of Page

Nathan
Help Moderator

USA
7664 Posts

Posted - 18 May 2002 :  23:36:34  Show Profile  Visit Nathan's Homepage
You have to have made subscriptions before your subscriptions thing will show.

Nathan Bales
Snitz Exchange | Do's and Dont's
Go to Top of Page
  Previous Topic Topic Next Topic  
 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.54 seconds. Powered By: Snitz Forums 2000 Version 3.4.07