vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Add security to non VB pages and block user groups (https://vborg.vbsupport.ru/showthread.php?t=41833)

WouterW 02-03-2003 11:36 PM

Yeah, I checked it all, and I do have a connection to the data base, because if I enter wrong information I get an 'Access Denied'.
One thing I'm wondering about is that you don't use $DBNAME in membercheck.php. Why is that? I need it, I guess because I have more then 1 database running on the server...
Could you please give me the code that uses $DBNAME? Or is that not the problem??


EDIT: I found mysql_select_db("vbulletin", $db_conn);
Replacing "vbulletin" with my databasename does the trick! Yeah! :)

WouterW 02-04-2003 03:56 AM

Hey buddy,

A friend edited your version for me and I think you might like this, so I post it for you;
Code:

//    Additions:                                                              //
//    - Allow only users from specific groups                                //
//    - Return to the wanted page after successfull logon (redirect)        //
//    - Set the databasename using $DBNAME                                  //
//    - connect.php is no longer needed!                                    //

Also, he wrote a short installation instruction.

Bytheway: It works great now! ;)

mt_100 02-04-2003 11:28 AM

The database is selected in line 41 of the file, so that shouldn't be the issue.

papa 03-12-2003 08:58 PM

This is the error I get

Warning: Cannot send session cookie - headers already sent by (output started at /home2/mmdclab/mmdclab-www/phptests/index5.php:4) in /home2/mmdclab/mmdclab-www/phptests/membercheck2.php on line 58

Warning: Cannot send session cache limiter - headers already sent (output started at /home2/mmdclab/mmdclab-www/phptests/index5.php:4) in /home2/mmdclab/mmdclab-www/phptests/membercheck2.php on line 58

I am not sure what to fix to get this going?

papa 03-13-2003 02:55 PM

we got the script working now we just have one little problem to overcome. The script takes them to the wrong page. Here is the senario:
Page A > Page B

We have a link on page a to go to page b which we want to protect. So of course the form comes up and says login- (works great so far) Then when you log in it takes you to Page A in stead of showing you Page B.

The think is when you click back on the link to go to page B it all works great. So for some reason it isn't taking us to the right place.

Any ideas?

mt_100 03-13-2003 10:28 PM

That is odd that is is going to the wrong page. Let me run through a few things and see what I can come up with.

Hey, thatnks for the additions, glad to know my code is liked and I appreciate the additions to it.

Let me know if anyone is still having problems. I have been on the road a lot like a traveling fool and have lost track of a few things and do not want to leave anyone hanging.

Thanks everyone.

Jujimufu 04-24-2003 05:41 AM

I have a question about this. You state certain user groups can be allowed to view it only. I'd like admins to be the only people able to enter through this membercheck portal thingy password thingmajigger ;) How can I do that? I see a code line in it that is obvious but.. could you toss an example please? Say only allowing admins to enter?

Matrixgl 08-09-2003 04:00 AM

Quote:

04-24-03 at 07:41 AM Jujimufu said this in Post #27
I have a question about this. You state certain user groups can be allowed to view it only. I'd like admins to be the only people able to enter through this membercheck portal thingy password thingmajigger ;) How can I do that? I see a code line in it that is obvious but.. could you toss an example please? Say only allowing admins to enter?
Change this:
PHP Code:

        if ($usergroupid!=and $usergroupid!=and $usergroupid!=and $usergroupid!=and $usergroupid!=11

to this:
PHP Code:

        if ($usergroupid!=1

Assuming 1 is the admin group id.

Great hack MT_100 and great mod WouterW (using yours :) ).

This is a great hack, and I am gonna make a non vb (just using the user table) members area login page with this :D

By the way, anyone interested adding a logout? I know it could be done, and I am trying to come up with something.

mt_100 08-11-2003 12:14 PM

Here is my logout file.

Matrixgl 08-12-2003 12:04 AM

awesome man! Thanks a ton!

and I am running into some problems here, I cant display any info about the logged in user, like their name or anything. I tried in some method ut none of them worked....any help? thanks.

Edit: After logging in, when I click on the logout link, the logout page says it couldnt log me out because I am not logged in :(


All times are GMT. The time now is 12:13 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01198 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete