Get support from Xavier Media
It is currently Sun Dec 08, 2013 2:36 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject:
PostPosted: Sun Jul 01, 2007 8:20 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Add something like this on your main protected page:
Code:
<?
$usergroup = mysql_results($user_info,0,"ugroup");
if (file_exists("hidden dir name/$usergroup.php"))
include("hidden dir name/$usergroup.php");
else
echo "No user file found! - $usergroup";
?>

Make sure you create a file for each group in your hidden directory and also that the name of your hidden directory is something random like KlekK3ei8.

If you need help fining a random name for your hidden directory you can use our random password tool at http://www.xaviermedia.com/webmasters/p ... generator/

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Sun Jul 01, 2007 6:08 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
CLanham wrote:
Just to make sure its clear what I am trying to achieve, I would like all users to sign in on the home page (i.e. http://www.sampleaddress.com). Then depending on the group they belong to it directs them to their group page (i.e. http://www.sampleaddress.com/usergroup.php)

In regards to your sample code, which main protected page are you referring to?

Do to I am not going to use the file protection feature right now I do not believe I would need to creat each group there own private folder. I just need to direct each group to a different page.

A feature such as this may be a great thing to add in the admin under the user tab.

Thanks for the help!!!

CL
If you're users are going to sign in at http://www.sampleaddress.com then you should add the above code at that page. Remember to add the protection code at the top of the page too.

The users will not be redirected to a new page, instead they will see the group page as http://www.sampleaddress.com. That way you get increased security and the users don't have to care about what group they belong (they don't even have to know that they belong to another group then all the other members).

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Mon Jul 02, 2007 2:58 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
To start with you have to remove this line from your code:
Code:
$user_info = mysql_query('SELECT * FROM pp29_users');

Then make sure you have something in the file (the page for the specific user group). If you login with your admin account that file should be named admin.php. Make sure admin.php actually got some text in it so you can see if it gets included or not.

Also it's recommended that you move your group files into a directory called something random like KdjytEp9 to increase security, otherwise peope may guess the URLs of the group pages.

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 04, 2007 4:15 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Make sure you name the page you try to include as the group code (not the group name) found in the admin page.

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 04, 2007 6:13 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Ahh, that's good :D Was it the groupd code/group name problem or something else (it's good to know since I haven't tested the code above myself).

It took only five posts to get this fixed so it's not that much :wink:

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject:
PostPosted: Wed Jul 04, 2007 8:12 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
Use the unlock.php file.

/Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Registered users: xlreariasd


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]