Hello, First one to give the correct advice will get the $5 via paypal The login system for my site works like this: Members of group_id 2, are redirected to a specific/page/. All other members are redirected to the account/home/ if ($SESSION->auth) { if ( isset($_SESSION['REQUEST_URI']) && $_SESSION['REQUEST_URI'] ) { $request_uri = $_SESSION['REQUEST_URI']; $_SESSION['REQUEST_URI'] = ''; if ( isset($_POST['islogin']) && $_POST['islogin'] && (strcmp($request_uri, VIR_PATH) == 0 || strcmp($request_uri.'/', VIR_PATH) == 0 || strpos($request_uri, 'account_login') !== false || strpos($request_uri, 'account/login') !== false) ) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "account/home/" : "index.php?m=account_home"); } if ($SESSION->conf['group_id'] == 2) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page/" : "index.php?m=specific_page"); } redirect( $request_uri ); } elseif ( isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] ) { $request_uri = $_SERVER['HTTP_REFERER']; if ( isset($_POST['islogin']) && $_POST['islogin'] && (strcmp($request_uri, VIR_PATH) == 0 || strcmp($request_uri.'/', VIR_PATH) == 0 || strpos($request_uri, 'account_login') !== false || strpos($request_uri, 'account/login') !== false) ) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "account/home/" : "index.php?m=account_home"); } if ($SESSION->conf['group_id'] == 2) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page/" : "index.php?m=specific_page"); } redirect( $request_uri ); } else { if ($SESSION->conf['group_id'] == 2) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page" : "index.php?m=specific_page"); } else redirect( VIR_PATH . ($PREFS->conf['fancy_urls'] ? "account/home/" : "index.php?m=account_home") ); } } PHP: I want to work like this: Members of group_id 2, are redirected to a specific/page. Members of group_id 6 are redirected to a specific/page2. All other members are redirected to the account/home/ First one to give the correct advice will get the $5 via paypal
<?php if ($SESSION->auth) { if (isset($_SESSION['REQUEST_URI']) && $_SESSION['REQUEST_URI']) { $request_uri = $_SESSION['REQUEST_URI']; $_SESSION['REQUEST_URI'] = ''; if (isset($_POST['islogin']) && $_POST['islogin'] && (strcmp($request_uri, VIR_PATH) == 0 || strcmp($request_uri . '/', VIR_PATH) == 0 || strpos($request_uri, 'account_login') !== false || strpos($request_uri, 'account/login') !== false)) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "account/home/" : "index.php?m=account_home"); } if ($SESSION->conf['group_id'] == 2) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page/" : "index.php?m=specific_page"); } if ($SESSION->conf['group_id'] == 6) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page2/" : "index.php?m=specific_page2"); } redirect($request_uri); } elseif (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER']) { $request_uri = $_SERVER['HTTP_REFERER']; if (isset($_POST['islogin']) && $_POST['islogin'] && (strcmp($request_uri, VIR_PATH) == 0 || strcmp($request_uri . '/', VIR_PATH) == 0 || strpos($request_uri, 'account_login') !== false || strpos($request_uri, 'account/login') !== false)) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "account/home/" : "index.php?m=account_home"); } if ($SESSION->conf['group_id'] == 2) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page/" : "index.php?m=specific_page"); } if ($SESSION->conf['group_id'] == 6) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page2/" : "index.php?m=specific_page2"); } redirect($request_uri); } else { if ($SESSION->conf['group_id'] == 2) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page" : "index.php?m=specific_page"); } elseif ($SESSION->conf['group_id'] == 6) { $request_uri = VIR_PATH . ($PREFS->conf['fancy_urls'] ? "specific/page2/" : "index.php?m=specific_page2"); } else redirect(VIR_PATH . ($PREFS->conf['fancy_urls'] ? "account/home/" : "index.php?m=account_home")); } } ?> PHP: