Author |
Topic |
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 20 July 2001 : 15:21:50
|
<% If Session(strCookieURL & "Approval") = "15916941253" Then %>
What in the world does that line do? It can be found at the top of all the admin_config_xxxxxx.asp pages. Where does this hard-coded 15916941253 number come from?
-Dan |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 20 July 2001 : 22:16:10
|
That Session is created when you log into the admin section. That number is stored in the session and then the admin pages check to see if the Session has that number. If it does, it lets you see the admin pages, if not, it directs you to the admin login page.
The number i believe was just a randomly created number.
- David |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 21 July 2001 : 00:28:55
|
So...hmmm, basically...that number doesn't mean anything?
Basically...I'm trying to write an admin mod...and I wanted to know how the admin authentication works. That code is AWFUL strange.
Any reason why it's done that way? |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 21 July 2001 : 00:44:21
|
If you want to make an admin mod that integrates with the snitz forum, just make sure you have this at the top of your admin page<!--#INCLUDE FILE="config.asp" --> <% If Session(strCookieURL & "Approval") = "15916941253" Then %> and this at the bottom<% Else %> <% Response.Redirect "admin_login.asp" %> <% End IF %> The content of your admin page will go between the code.
- David |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 21 July 2001 : 00:54:03
|
Thanks for your help.
Sorry to keep pushing this. I know I could go on what you said...but I still have questions.
Why don't the admin pages do: If m_level >= 4 Then
instead???????? (I think 4 is admin....) |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 21 July 2001 : 01:47:19
|
Because they decided to have a seperate login to the admin section. I think the mLev variable is defined in the inc_top.asp file. So if you place the check after all in the includes<!--#INCLUDE FILE="config.asp" --> <!--#INCLUDE FILE="inc_functions.asp" --> <!--#INCLUDE file="inc_top.asp" --> <% If mLev = "4" Then %> you're gonna run into some errors along the way. I can't remember exactly the errors you are gonna run into but you can try it and see for yourself. This has been talked about before some time ago. So I'm telling you this by memory of that topic. I also believe it was a more secure way also to store the admin login for the admin pages in a session variable.
I will do a search and see if I can come up with the topic for you.
- David |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 23 July 2001 : 23:26:50
|
Thanks for your help Davio! I think you've got me covered....cept the link is leading me to an ODBC error.
I'll check back in a day to see if it magically goes away.
-Dan |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 24 July 2001 : 16:25:33
|
It seems like the admins are working on it or something. I'll check with them to see what's up with it.
- David |
|
|
gor
Retired Admin
Netherlands
5511 Posts |
Posted - 24 July 2001 : 16:42:43
|
quote:
It seems like the admins are working on it or something. I'll check with them to see what's up with it.
Yep, my error, upgraded the database for the new version, forgot to make the needed changes at that forum....fixed now.
Pierre Join a Snitz Mailinglist |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 25 July 2001 : 17:46:44
|
Thanks gor.
quote:
After a few minutes of searching, found the topic: http://forum.snitz.com/forum_archive_working/link.asp?TOPIC_ID=7115
Rob was trying to create an admin/morderator mod and gor and I went into detail about the same thing you are asking about. Hope it helps.
- David
I see the initial post, but I don't see any replies. You mention "gor and I went into detail" so I'm assuming I'm missing something. I've never looked at archived posts before.
-Dan
|
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 25 July 2001 : 21:04:24
|
quote: I see the initial post, but I don't see any replies. You mention "gor and I went into detail" so I'm assuming I'm missing something. I've never looked at archived posts before.
Yeah you're right. Gor's replies are missing.
- David |
|
|
Dan Martin
Average Member
USA
528 Posts |
Posted - 27 July 2001 : 11:50:19
|
Hmm, I'll look around and see if I can't dig up more info.
-Dan |
|
|
|
Topic |
|