254 |
* Purpose : redirect following the user's profile |
* Purpose : redirect following the user's profile |
255 |
* |
* |
256 |
* parm : |
* parm : |
|
* - p_profile (ac_users.use_usertype) |
|
257 |
* - php_session PHPSESSID |
* - php_session PHPSESSID |
258 |
* gen : |
* gen : |
259 |
* - none |
* - none |
260 |
* return: none |
* return: none |
261 |
*/ |
*/ |
262 |
function Redirect($p_profile,$php_session) { |
function Redirect($php_session) { |
263 |
include_once("debug.php"); |
include_once("debug.php"); |
264 |
echo_debug(__FILE__,__LINE__,"Session is $php_session"); |
echo_debug(__FILE__,__LINE__,"Session is $php_session"); |
265 |
|
$URL="user_login.php"; |
|
if ( $p_profile =="compta" ) { |
|
|
$URL="compta_login.php"; |
|
|
} else if ( $p_profile == "user") { |
|
|
$URL="user_login.php"; |
|
|
} |
|
|
else { |
|
|
echo_error ("Undefined profile"); |
|
|
exit (-1); |
|
|
} |
|
266 |
echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=$URL?PHPSESSID=$php_session\">"; |
echo "<META HTTP-EQUIV=\"REFRESH\" content=\"0;url=$URL?PHPSESSID=$php_session\">"; |
267 |
|
|
268 |
} |
} |