Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Restrict Access on a Page

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
Zuel Posted - 12 October 2005 : 16:36:32
I am creating my own asp pages not relevent to the forums just the website itself and I included

config.asp
inc_func_secure.asp
inc_header.asp

To prevent people from accessing the page without logging in. Now is there is a way to incorporate the usergroup mod in that page so only a certain group or groups can see the page?

I think I will have to hardcode the values. Anyone play with this before?<
15   L A T E S T    R E P L I E S    (Newest First)
pdrg Posted - 16 November 2005 : 05:22:25
quote:
Originally posted by Zuel

Bah, still get an internal server error with that. Man I wish I had debugging enabled on the server. I'm going to try to push for it.



Depending on what tools you're using, you may find server-side debugging more problematic than just doing without - Visual Interdev *could* Server-side debug, but only with a *perfect* environment (full moon, blood of a chicken, etc), and probably wasted more hours with people trying to get it working than it ever saved in productivity. MS people didn't use SS Debugging, and informally often recommneded against it.

Not saying 'don't do it' at all, just a friendly warning that if you can't get it working, don't invest too much time in it!<
tribaliztic Posted - 16 November 2005 : 05:05:46
Well, I've stumbled upon some problems...
If I add a group to another group, then check the second group via the code in this thread, I get no hit. How does this work? =)

User1 is a member of usergroupA.
I have usergroupA and usergroupB, I add usergroupA INTO usergroupB, then check for User1 in usergroupB and get no hit.
<
Zuel Posted - 25 October 2005 : 10:36:24
Just talked to my website contact, he's going to try to push for debugging. I don't think the code killed the server I think there is a timeout feature that is causing the internal server errors.

I can't wait to fix the problem, I got it working on localhost perfect!<
Zuel Posted - 25 October 2005 : 10:23:52
Bah, still get an internal server error with that. Man I wish I had debugging enabled on the server. I'm going to try to push for it.

I think I killed the server....it doesn't come up now.<
Roger Fredriksson Posted - 24 October 2005 : 14:19:10
Tribaliztic, you are right. Delete the file connection_snitz.asp. In my first post with code: replace the line
ors.Open oSql, cnobj
with
oRS.Open oSql, strConnString
<
tribaliztic Posted - 24 October 2005 : 10:49:22
Can't you use your already established connection from config.asp?
<
Zuel Posted - 24 October 2005 : 10:29:54
Awe, I tried to carry over the pages to the server and I get an internal server error. I can't get this line to point to my database correctly.

cnObj.Open "Provider=Microsoft.Jet.OLEDB.4.0; User ID=Admin; Password=; Data Source=" & sPath & "../your_folder_for_db/name_of_your_db.mdb; Persist Security Info=True;"%><
Zuel Posted - 24 October 2005 : 10:09:13
Okay it is working!

Roger's method works except for a few things I had to change.

FORUM_USERGROUPS_MEMBERS doesn't exist. It is actually called FORUM_USERGROUP_USERS.

Also I get a syntax error when trying to set the ADO Constant. So I just commented that line out.
'adUseClient = 3

Everything else works as it should.

Also as a note, this will not pick up members who aren't assigned to any usergroup. Which is good, so if user is undefined then deny them.

Thanks Roger!<
Zuel Posted - 24 October 2005 : 09:41:01
Not yet. Still playing around with it though.<
tribaliztic Posted - 24 October 2005 : 03:34:15
Did you solve this or should I dig up my solution?
<
Zuel Posted - 21 October 2005 : 11:47:00
Sorry for the late response. Been working on a few other projects at the same time

<
Roger Fredriksson Posted - 19 October 2005 : 06:06:46
quote:
Originally posted by Zuel

Wait a minute...what is the connection_snitz.asp include file?


Remember that I am a non-pro-coder with code that works. I would appreciate if some Snitzer stepped in and gave you a pro-solution too.
The file connection_snitz.asp looks like this :
<%'Construct database path
sPath = Request.ServerVariables("Path_Translated")
'Response.Write ("sPath=" & sPath & "<br>")
sPath = Left(sPath,InStrRev(sPath,"\"))

'Open Connection and Recordset
set cnObj = Server.CreateObject("ADODB.Connection")
'Response.Write ("Create Object OK<br>")
cnObj.Open "Provider=Microsoft.Jet.OLEDB.4.0; User ID=Admin; Password=; Data Source=" & sPath & "../your_folder_for_db/name_of_your_db.mdb; Persist Security Info=True;"%>
<
tribaliztic Posted - 19 October 2005 : 02:59:17
Probably the config.asp-page?
<
Zuel Posted - 18 October 2005 : 20:18:39
Wait a minute...what is the connection_snitz.asp include file?<
Zuel Posted - 18 October 2005 : 20:17:30
quote:
Originally posted by Roger Fredriksson

tribaliztic, it wouldn´t surprise me a bit if the solution is very simple. My solution has really nothing to do with the user groups mod, it only uses the tables usergroups and usergroups_member. As far as I can see the main disadvantage with my solution is that Zuel has to hard-code the number of which usergroup has accesss to the non-Snitz-page.



Sorry, I haven't been around for a bit. Been working late and class.

I'll test it out now.<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000 Version 3.4.07