All pastes #147206 Raw Edit

Someone

public text v1 · immutable
#147206 ·published 2006-08-24 06:05 UTC
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

}