Author |
Topic |
|
zerakh
Junior Member
120 Posts |
Posted - 14 September 2005 : 22:27:44
|
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
|
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.” |
|
|
zerakh
Junior Member
120 Posts |
Posted - 15 September 2005 : 11:35:58
|
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 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 September 2005 : 11:45:37
|
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.” |
|
|
zerakh
Junior Member
120 Posts |
Posted - 15 September 2005 : 12:04:14
|
how/where would I do that? |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 September 2005 : 12:11:28
|
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.” |
|
|
zerakh
Junior Member
120 Posts |
Posted - 15 September 2005 : 12:19:14
|
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 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 September 2005 : 12:22:57
|
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.” |
|
|
zerakh
Junior Member
120 Posts |
Posted - 15 September 2005 : 12:30:20
|
I'm not seeing any number. I uploaded the file with that command entered and have viewed several pages on my browser. |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 September 2005 : 12:35:20
|
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.” |
|
|
zerakh
Junior Member
120 Posts |
Posted - 15 September 2005 : 12:40:03
|
ok...the number I am getting is:: 0 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 15 September 2005 : 12:42:36
|
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.” |
|
|
zerakh
Junior Member
120 Posts |
Posted - 15 September 2005 : 12:53:30
|
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 |
|
|
|
Topic |
|