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
 an include removes admin options
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

zerakh
Junior Member

120 Posts

Posted - 14 September 2005 :  22:27:44  Show Profile
I have an include in my inc_header.asp that when placed where Im told to place it, removes the ability of the Admin to get to the admin_home.asp.

Unfortunately when I remove it, my forum stops working. Any suggestions on how to circumvent this problem and get the link for admin options to show again?

The second include is the problem file.
quote:
%>
<!--#INCLUDE FILE="inc_func_common.asp" -->
<!--#INCLUDE FILE="inc_AdminLevel.asp" -->
<%


inc_AdminLevel.asp::
quote:
<%
function IsAdminAllowed(fName, fPassword, fAuthor)

dim rsCheck
dim strSql

'## Forum_SQL
strSql = "SELECT MEMBER_ID, M_ALEVEL, M_LEVEL, M_NAME, M_PASSWORD "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & ChkString(fName, "SQLString") & "' "
if strAuthType="db" then
strSql = strSql & " AND M_PASSWORD = '" & ChkString(fPassword, "SQLString") &"'"
End If
strSql = strSql & " AND M_STATUS = " & 1
Set rsCheck = my_Conn.Execute(strSql)
if rsCheck.BOF or rsCheck.EOF or not(ChkQuoteOk(fName)) or not(ChkQuoteOk(fPassword)) then
IsAdminAllowed = 0 '## Invalid user
else
if rsCheck("M_ALEVEL")>0 and not(isnull(rsCheck("M_ALEVEL"))) then IsAdminAllowed = 1 '## allowed

end if
rsCheck.close
set rsCheck = nothing

end function
%>


Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 September 2005 :  05:05:21  Show Profile
Double check the changes you made to inc_header.asp against the readme, sounds like you've missed something out. If you still can't get it to work, post a link to a *.txt copy of your inc_header.asp file.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 15 September 2005 :  11:35:58  Show Profile
I have tried to redo the inc_header.asp to make sure that there weren't any problems with a missed code compared to the readme file.

I still dont have the Admin options.

Here is the link to the .txt file::

http://www.ichabod.org/tests/inc_header.txt
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 September 2005 :  11:45:37  Show Profile
Can you do a response.write on the aAllowed variable to see what its value is?


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 15 September 2005 :  12:04:14  Show Profile
how/where would I do that?
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 September 2005 :  12:11:28  Show Profile
On the line after the <% following the new include:

response.write aAllowed


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 15 September 2005 :  12:19:14  Show Profile
when I look at the page inc_header.asp I get this as a message::
quote:


There has been a problem...

Your strDBType is not set, please edit your config.asp
to reflect your database type.
Click here to retry.



Edited by - zerakh on 15 September 2005 12:19:30
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 September 2005 :  12:22:57  Show Profile
Open it in your text editor not your browser, add that line and then go to any page on your forums, you should see a number in the top left corner. Take a note of it and post it here before removing that line and reuploading it.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 15 September 2005 :  12:30:20  Show Profile
I'm not seeing any number. I uploaded the file with that command entered and have viewed several pages on my browser.
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 September 2005 :  12:35:20  Show Profile
Sorry, my bad; you should insert that line after line 204 which should read:
if mLev = 4 then aAllowed = cLng(IsAdminAllowed(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 15 September 2005 :  12:40:03  Show Profile
ok...the number I am getting is:: 0
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 September 2005 :  12:42:36  Show Profile
That means that you have not given the admin in question access to the admin options. To clarify this, have a in the database at the M_ALEVEL value for that member, it need to be 1 to grant them access.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

zerakh
Junior Member

120 Posts

Posted - 15 September 2005 :  12:53:30  Show Profile
I understand. My only problem now is that everywhere that I have M_ALEVEL the value is 1. I cant find any instance of it being different. The only location that I found would be in the inc_AdminLevel.asp::
quote:
if rsCheck("M_ALEVEL")>0 and not(isnull(rsCheck("M_ALEVEL"))) then IsAdminAllowed = 1 '## allowed


*edit* after changing it- it still doesnt work

Edited by - zerakh on 15 September 2005 12:55:03
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.35 seconds. Powered By: Snitz Forums 2000 Version 3.4.07