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
 HELP! admins logging into different admin pages
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

MikeB.Lynn
New Member

54 Posts

Posted - 13 March 2009 :  10:11:16  Show Profile
I've tried the Admin Level Mod and it's not giving me the effect I want.

I would like my level of administrators to be able to log onto the admin options but get different admin_home.asp pages.
in other words if I set a member to Alevel 2 in the data base he/she would get admin_homeXXX.asp page
if I set them to Alevel 3 they would get admin_homeYYY.asp page

I believe the issue can be done in the admin_login.asp file.
what changes would have to be made to get this
here is where I think the code should be changed but I'm not sure.
From admin_login.asp

'## Forum_SQL
strSql = "SELECT MEMBER_ID "
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE M_NAME = '" & trim(fName) & "' AND "
strSql = strSql & " M_PASSWORD = '" & trim(strEncodedPassword) & "' AND "
strSql = strSql & " M_LEVEL = 3 AND M_STATUS = 1"
strSql = strSql & " AND M_ALEVEL > 0"
Set dbRs = my_Conn.Execute(strSql)

If not(dbRS.EOF) and ChkQuoteOk(fName) and ChkQuoteOk(strEncodedPassword) Then

Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize & """>Login was successful!</font></p>" & vbNewLine
Session(strCookieURL & "Approval") = "15916941253"
Response.Write " <p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """><a href="""
if strTarget = "" then
Response.Write "admin_home.asp"
else
Response.Write strTarget
end if
Response.Write """>Click here to Continue</a></font></p>" & vbNewLine

Response.Write " <meta http-equiv=""Refresh"" content=""2; URL="
if strTarget = "" then
Response.Write "admin_home.asp"
else
Response.Write strTarget
end if
Response.Write """>" & vbNewline & _
" <br />"

WriteFooter
Response.End

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 13 March 2009 :  11:21:44  Show Profile
You could do something like this:

Conditional Positioning:

Response.Write	"	<table border=""0"" width=""100%"">" & vbNewLine & _
	"		<tr>" & vbNewLine & _
	"			<td width=""33%"" align=""left"" nowrap><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>" & vbNewLine & _
	"			" & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""default.asp"">All Forums</a><br />" & vbNewLine
if mLev > 3 then
	Response.Write	"			" & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpen,"","") & " <a href=""admin_home.asp"">Admin Section</a><br />" & vbNewLine
else
	Response.Write	"			" & getCurrentIcon(strIconBar,"","align=""absmiddle""") & getCurrentIcon(strIconFolderOpenTopic,"","align=""absmiddle""") & "Staff Tools<br /></font></td>" & vbNewLine
end if
Response.Write	"			" & getCurrentIcon(strIconBlank,"","") & getCurrentIcon(strIconBar,"","") & getCurrentIcon(strIconFolderOpenTopic,"","") & " Staff Tasking<br /></font></td>" & vbNewLine & _
	"		</tr>" & vbNewLine & _
	"	</table>" & vbNewLine

Conditional Menu:

if mLev < 2 then
	'	Ordinary member or not-registered, no access.
	'	Next 3 lines are used to redirect to new page.	
	strDest=Request.ServerVariables("HTTP_REFERER")
	if strDest="" then strDest=strForumURL
	Response.Redirect strDest
else if mLev = 2 then
	'	Next line is used to redirect to new page.
	Response.Redirect "admin_staff.asp"
	'	Alternatively, use to bypass functions on one page.
	'	Do moderator features only.
	Response.Write	"This is the moderator menu ...." & vbNewLine & _
		"... End of moderator menu."
else if mLev = 3 and MEMBERID<>intAdminMemberID then
	'	Next line is used to redirect to new page with conditional filename.
	Response.Redirect "admin_staff"+cStr(MEMBERID)+".asp
	'	Alternatively, use to bypass functions on one page.
	'	Do moderator features and specific admin features.
	Response.Write	"This is the conditional admin menu ...." & vbNewLine
	Select Case(MEMBERID)
		Case "2"
			Response.Write	"Menu for admin with user ID #2 ..." & vbNewLine & _
				"Menu continues ..." & vbNewLine
		Case "57"
			Response.Write	"Menu for admin with user ID #57 ..." & vbNewLine & _
				"Menu continues ..." & vbNewLine
		Case Else
			Response.Write	"Menu for forum admin" & vbNewLine & _
				"Menu continues ..." & vbNewLine
	End Select
	Response.Write	"... End of admin menu." & vbNewLine
end if

Edited by - Carefree on 13 March 2009 11:22:55
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.27 seconds. Powered By: Snitz Forums 2000 Version 3.4.07