<% '################################################################################# '## 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 call LangDebug("===== inc_top.asp") 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 if strAuthType = "db" then if (Request.Cookies(strUniqueID & "User")("Name") <> "" and Request.Cookies(strUniqueID & "User")("PWord") <> "") then '## Forum_SQL strSql = "SELECT MEMBER_ID, M_NAME, M_PASSWORD " strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(Request.Cookies(strUniqueID & "User")("Name"), "SQLString") & "' " strSql = strSql & " AND M_PASSWORD = '" & ChkString(Request.Cookies(strUniqueID & "User")("Pword"), "SQLString") &"'" Set rsCheck = my_Conn.Execute(strSql) if rsCheck.BOF or rsCheck.EOF then Call ClearCookies() strDBNTUserName = "" else strDBNTUserName = rsCheck("M_NAME") end if rsCheck.close set rsCheck = nothing else strDBNTUserName = "" end if end if 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 "" & vbNewline & vbNewline & _ "" & vbNewline & _ "" & vbNewline & _ "" & strForumTitle & "" & vbNewline '## START - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE SNTIZ FORUMS 2000 LICENSE AGREEMENT Response.Write "" & vbNewline '## END - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE SNTIZ FORUMS 2000 LICENSE AGREEMENT %>
<% select case Request.Form("Method_Type") case "login" %>
<% =strForumTitle %>
<% call sForumNavigation() %>
<% if strLoginStatus = 0 then %>

<% =fLang(strLangInc_Top00010) %>

<% =fLang(strLangInc_Top00020) %>

<% else %>

<% =fLang(strLangInc_Top00030) %>

<% =fLang(strLangInc_Top00040) %>

<% end if %> ">

"><% =fLang(strLangInc_Top00050) %>

<% WriteFooter Response.End case "logout" %>

<% =fLang(strLangInc_Top00060) %>

<% =fLang(strLangInc_Top00040) %>

">

"><% =fLang(strLangInc_Top00050) %>

<% WriteFooter Response.End end select if (chkUser((strDBNTUserName), (Request.Cookies(strUniqueID & "User")("Pword"))) = 0) then %>
" method="post" id=form1 name=form1> <% if (strAuthType = "db") then %> <% else if (strAuthType = "nt") then %> <% end if end if %> <% if (lcase(strEmail) = "1") then %> <% end if %>
<% =fLang(strLangInc_Top00080) %>
<% =fLang(strLangInc_Top00090) %>
<% if strGfxButtons <> "0" then %> button_login.gif type="image" value="Login" id=submit1 name=submit1 border=0 hspace=4> <% else if strGfxButtons = "0" then %> <% end if end if %> <% Call LangShowLanguageSelector("") %>
<% =fLang(strLangInc_Top00110) %> <% =fLangN(strLangInc_Top00120, "" & "|" & "") %>
<% if strAuthType = "nt" then response.write fLang(strLangInc_Top00160) else response.write fLang(strLangInc_Top00150) end if %> <% if (lcase(strNoCookies) = "1") then %> | <% =fLang(strLangInc_Top00180) %> <% end if %>
<% else %>
" method="post" id=form2 name=form2>
<% if strAuthType="nt" then %> <% =fLangN(strLangInc_Top00190, "" & Session(strCookieURL & "username") & " " & Session(strCookieURL & "userid") & "") %>)   <% else if strAuthType = "db" then %> <% =fLangN(strLangInc_Top00190, "" & ChkString(strDBNTUserName, "display") & "") %> <% if strGfxButtons <> "0" then %> button_logout.gif type="image" value="Logout" id=submit1 name=submit1 border=0 hspace=4> <% else if strGfxButtons = "0" then %> <% end if end if end if end if %> <% Call LangShowLanguageSelector("") %>
<% if (mlev = 4) or (lcase(strNoCookies) = "1") then %> <% =fLang(strLangInc_Top00180) %> <% end if %>
<% end if %>
<% 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 " " & fLang(strLangInc_Top00230) & "" & vbNewline & _ " |" & vbNewline if strUseExtendedProfile then Response.Write " " & fLang(strLangInc_Top00250) & "" & vbNewline else Response.Write " " & fLang(strLangInc_Top00250) & "" & vbNewline end if if strAutoLogon <> 1 then Response.Write " |" & vbNewline & _ " " & fLang(strLangInc_Top00270) & "" & vbNewline end if Response.Write " |" & vbNewline & _ " " & fLang(strLangInc_Top00290) & "" & vbNewline ' DEM --> Start of code added to show subscriptions if they exist if SubCount > 0 then if mlev = 4 then Response.Write " |" & vbNewline & _ " " & fLang(strLangInc_Top00310) & "" & vbNewline end if Response.Write " |" & vbNewline & _ " " & fLang(strLangInc_Top00330) & "" & vbNewline end if ' DEM --> End of Code added to show subscriptions if they exist Response.Write " |" & vbNewline & _ " " & fLang(strLangInc_Top00350) & "" & vbNewline & _ " |" & vbNewline & _ " " & fLang(strLangInc_Top00370) & "" & vbNewline & _ " |" & vbNewline & _ " " & fLang(strLangInc_Top00390) & "" & vbNewline end sub %>