Exemple #1
0
    }
    spl_autoload_register("classLoad"); 
    include('config.php');  
	include('lib/pagination.php');
    //classes loading end
    session_start();
    if ( isset($_SESSION['userMerlaTrav']) ){
    	//les sources
    	$projetManager = new ProjetManager($pdo);
		$locauxManager = new LocauxManager($pdo);
		$appartement = "";
		$idLocaux = 0;
		$idProjet = $_GET['idProjet'];
        $projet = $projetManager->getProjetById($idProjet);
		if( isset($_GET['idLocaux']) and 
		( $_GET['idLocaux']>0 and $_GET['idLocaux']<=$locauxManager->getLastId() ) ){
			$idLocaux = htmlentities($_GET['idLocaux']);
			$locaux = $locauxManager->getLocauxById($idLocaux);
			$piecesManager = new PiecesLocauxManager($pdo);
			$piecesNumber = $piecesManager->getPiecesLocauxNumberByIdLocaux($idLocaux);
			if($piecesNumber != 0){
				$piecesLocaux = $piecesManager->getPiecesLocauxByIdLocaux($idLocaux);
			}	
		}
		
?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- BEGIN HEAD -->
    } elseif (file_exists('controller/' . $myClass . '.php')) {
        include 'controller/' . $myClass . '.php';
    }
}
spl_autoload_register("classLoad");
include 'config.php';
include 'lib/pagination.php';
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav'])) {
    //les sources
    $idProjet = 0;
    $idLocaux = 0;
    $projetManager = new ProjetManager($pdo);
    $locauxManager = new LocauxManager($pdo);
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId() and (isset($_GET['idLocaux']) and ($_GET['idLocaux'] > 0 and $_GET['idLocaux'] <= $locauxManager->getLastId()))) {
        $idProjet = $_GET['idProjet'];
        $idLocaux = $_GET['idLocaux'];
        $projet = $projetManager->getProjetById($idProjet);
        $local = $locauxManager->getLocauxById($idLocaux);
        $piecesManager = new PiecesLocauxManager($pdo);
        $piecesLocaux = "";
        //test the terrain object number: if exists get terrain else do nothing
        $piecesNumber = $piecesManager->getPiecesLocauxNumberByIdLocaux($idLocaux);
        if ($piecesNumber != 0) {
            $piecesLocaux = $piecesManager->getPiecesLocauxByIdLocaux($idLocaux);
        }
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->