rendered paste body<?php
session_start();
$TOP="../";
include_once( $TOP."Utils/PHP.php");
addClassPath( $TOP."EditTrain/" );
//assertLoggedIn();
if(!isset($_SESSION['FY_UserID']){
header("Location:../Login/login.phtml" );
}
......
?>
and assertLoggedIn() :
function assertLoggedIn() {
global $TOP;
global $FY_UserID;
if( ! isset( $_SESSION ) ) {
session_start();
}
$FY_UserID = $_SESSION['FY_UserID'];
if ( $FY_UserID == "" ) {
header("Location:../Login/login.phtml" );
exit(2);
}
... and then some code to log which users logs in
}