Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Stripped down inc_header.asp
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

lovduv
Starting Member

40 Posts

Posted - 07 May 2007 :  20:35:41  Show Profile  Reply with Quote
I was hoping that someone has or could strip down the inc_header.asp to just the code and includes needed for the log-in and out functions.

I want to have an include for the rest of my site for login boxes...


oops this probably needs to be moved to the MOD forum....I'll pack my bag....lol

<Moved - AnonJr><

Edited by - AnonJr on 08 May 2007 06:32:45

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 08 May 2007 :  02:44:30  Show Profile  Visit Jezmeister's Homepage  Reply with Quote
why don't you use the site login mod and just remove all visible code so you simply have all the variables set etc? - might be easier

otherwise the bit of visible code you need to keep is something like this (but not exactly the same I don't think):
 if (mLev = 0) then		
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """><b>Username:</b>" & vbNewLine & _
" <input type=""text"" name=""Name"" size=""10"" maxLength=""25"" value=""""" & vbNewLine & _
" <em><b>Password:</b></em></font>" & vbNewLine & _
" <input type=""password"" name=""Password"" size=""10"" maxLength=""25"" value="""">" & vbNewLine
Response.Write " <input type=""submit"" value=""Login"" id=""submit1"" name=""submit1"">" & vbNewLine
Response.Write " <font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>" & vbNewLine & _
" <input type=""checkbox"" name=""SavePassWord"" value=""true"" tabindex=""-1"" CHECKED><b> Save Password</b></font>" & vbNewLine
else
Response.Write " <form action=""" & Request.ServerVariables("URL") & """ method=""post"" id=""form2"" name=""form2"">" & vbNewLine & _
" <input type=""hidden"" name=""Method_Type"" value=""logout"">" & vbNewLine & _
"<font face=""" & strDefaultFontFace & """ size=""" & strFooterFontSize & """>You are logged on as "
if strAuthType="nt" then
Response.Write "<b>" & Session(strCookieURL & "username") & " (" & Session(strCookieURL & "userid") & ")</b>" & vbNewLine & _
" <td> "
else
if strAuthType = "db" then

Response.Write "<b><a href=""pop_profile.asp?mode=display&id=" & MemberID & """>" & strDBNTUserName & "</a></b>." & vbNewLine & _
" <a href=""../logout.asp"">Logout</a>" & _
" <p style=""margin-top:0;margin-bottom:0;"">Click <a href=""pop_profile.asp?mode=Edit"">here</a> to edit your profile</p>"
end if
end if
Response.Write " </form>" & vbNewLine
end if
<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 08 May 2007 :  06:37:39  Show Profile  Visit AnonJr's Homepage  Reply with Quote
This topic may be of some help too. There are a couple different ways to get what I think you want done outlined there, and a link to another topic along the same lines.<
Go to Top of Page

lovduv
Starting Member

40 Posts

Posted - 06 June 2007 :  10:46:41  Show Profile  Reply with Quote
AnonJr....

I have been able to get this working....I am now able to have a simple log-in for pages I am restricting access too. I have a new question....

The association I work for wants the forum and most of the site to be open to the public, but on the site we have a member section for the members of our association. I need to restrict access to these pages, my first thought was to simply add a user level, let's say #7

So mlev = 7 would be what I would use to check a logged in level for these pages.....

So I searched and read over the posts and although I saw it alluded to, I never saw any specific code for adding a member level, which is all I need.

So then I looked to the next idea, the UsersGroups Mod, and I saw several posts about errors and bugs. Then I found yours where you referred to an updated version you were working on, with a bug fix for the log-in workaround??.....So my question is, can I simply add a level or do I need to add a MOD (UserGroups Mod) that I really don't need with lot's of potential bugs?<
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 06 June 2007 :  11:43:53  Show Profile  Visit AnonJr's Homepage  Reply with Quote
I would add the UserGroup MOD - its the easier way to do what you want (I tried both ways, and abandoned adding an mLev as it was more work than it was worth). I've not gotten around to getting the updates included, but the only real "bug" that isn't in the thread with the MOD is that a member can post by not logging in and using the post form to pass their credentials - and a fix for that has been posted... if I could only remember where...

I think you'll find the UserGroup MOD to be a much better long-term solution as its much more flexible. Just my 2c.

I'll see what I can get up later tonight, but no promises - I've got a lot of neglected projecst on my plate. <
Go to Top of Page

lovduv
Starting Member

40 Posts

Posted - 07 June 2007 :  15:34:26  Show Profile  Reply with Quote
No problem, I don't mind searching for fixes when I know there is one to find!

If you could track down the fix for the bypass that would be much appreciated!!<
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07