Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Upgrading Nuke
Author Message
CodyG
Life Cycles Becoming CPU Cycles



Joined: Jan 02, 2003
Posts: 714
Location: Vancouver Island

PostPosted: Fri Mar 03, 2006 7:56 am Reply with quote

This is the code from my index.php nuke ver 6.9

Code:
require_once("mainfile.php");

global $user;
if(!is_user($user)) {
        header("Location: modules.php?name=Join_Form");
}
$_SERVER['PHP_SELF'] = "modules.php";


Because it is a closed site, I need the above method to keep non-users only in the Join_Form module where there is a custom registration form.

However, in the new code 7.6 there is this :

Code:
require_once("mainfile.php");

global $prefix, $db, $admin_file;
$modpath = '';
define('MODULE_FILE', true);
$_SERVER['PHP_SELF'] = "modules.php";


Can I combine the two? Will the following work?
Code:
require_once("mainfile.php");

global $user, $prefix, $db, $admin_file;
if(!is_user($user)) {
        header("Location: modules.php?name=Join_Form");
}
$modpath = '';
define('MODULE_FILE', true);
$_SERVER['PHP_SELF'] = "modules.php";


Thanks for any enlightenment and have a happy nuking day. Smile

_________________
"We want to see if life is ubiquitous." D.Goldin 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Fri Mar 03, 2006 8:08 am Reply with quote

It looks like it should work just fine

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
CodyG







PostPosted: Fri Mar 03, 2006 10:36 am Reply with quote

And it does! Smile Thanks.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Upgrading Nuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©