{
    if (file_exists('model/' . $myClass . '.php')) {
        include 'model/' . $myClass . '.php';
    } 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']) and ($_SESSION['userMerlaTrav']->profil() == "admin" or $_SESSION['userMerlaTrav']->profil() == "consultant")) {
    //classManagers
    $projetManager = new ProjetManager($pdo);
    $chargeManager = new ChargeManager($pdo);
    $typeChargeManager = new TypeChargeManager($pdo);
    //
    if (isset($_GET['idProjet']) and ($_GET['idProjet'] >= 1 and $_GET['idProjet'] <= $projetManager->getLastId())) {
        $idProjet = $_GET['idProjet'];
        $charges = $chargeManager->getChargesByGroupByIdProjet($idProjet);
        $typeCharges = $typeChargeManager->getTypeCharges();
        $projet = $projetManager->getProjetById($idProjet);
    }
    ?>
<!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 -->
<head>
Example #2
0
            include('controller/'.$myClass.'.php');
        }
    }
    spl_autoload_register("classLoad"); 
    include('config.php');  
    //classes loading end
    session_start();
    if(isset($_SESSION['userMerlaTrav']) and (isset($_GET['idProjet']))){
    	//classes managers
    	$appartementManager = new AppartementManager($pdo);
        $locauxManager = new LocauxManager($pdo);
		$usersManager = new UserManager($pdo);
		$projetManager = new ProjetManager($pdo);
		$contratManager = new ContratManager($pdo);
		$clientManager = new ClientManager($pdo);
        $chargeManager = new ChargeManager($pdo);
        $chargeCommunManager = new ChargeCommunManager($pdo);
		$livraisonsManager = new LivraisonManager($pdo);
        $livraisonDetailManager = new LivraisonDetailManager($pdo);
		$fournisseursManager = new FournisseurManager($pdo);
		$reglementsFournisseurManager = new ReglementFournisseurManager($pdo);
		$caisseEntreesManager = new CaisseEntreesManager($pdo);
		$caisseSortiesManager = new CaisseSortiesManager($pdo);
		$operationsManager = new OperationManager($pdo);
		//classes and vars
		$idProjet = $_GET['idProjet'];
        $projet = $projetManager->getProjetById($idProjet);
		//Container 1 : Statistiques
		$chiffreAffaireTheorique = 
		ceil(
		  $appartementManager->getTotalPrixAppartementsByIdProjet($idProjet)
{
    if (file_exists('model/' . $myClass . '.php')) {
        include 'model/' . $myClass . '.php';
    } 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']) and ($_SESSION['userMerlaTrav']->profil() == "admin" or $_SESSION['userMerlaTrav']->profil() == "consultant")) {
    //classManagers
    $projetManager = new ProjetManager($pdo);
    $chargeManager = new ChargeManager($pdo);
    $typeChargeManager = new TypeChargeManager($pdo);
    //
    $typeCharge = $_GET['type'];
    $nomTypeCharge = $typeChargeManager->getTypeChargeById($typeCharge)->nom();
    if (isset($_GET['idProjet']) and ($_GET['idProjet'] >= 1 and $_GET['idProjet'] <= $projetManager->getLastId())) {
        $idProjet = $_GET['idProjet'];
        $charges = $chargeManager->getChargesByIdProjetByType($idProjet, $typeCharge);
        $total = number_format($chargeManager->getTotalByIdProjetByType($idProjet, $typeCharge), 2, ',', ' ');
        $typeCharges = $typeChargeManager->getTypeCharges();
        $projet = $projetManager->getProjetById($idProjet);
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
Example #4
0
         include('controller/'.$myClass.'.php');
     }
 }
 spl_autoload_register("classLoad"); 
 include('config.php');  
 //classes loading end
 session_start();
 if(isset($_SESSION['userMerlaTrav']) ){
     //classes managers
     $appartementManager = new AppartementManager($pdo);
     $locauxManager = new LocauxManager($pdo);
     $usersManager = new UserManager($pdo);
     $projetManager = new ProjetManager($pdo);
     $contratManager = new ContratManager($pdo);
     $clientManager = new ClientManager($pdo);
     $chargeManager = new ChargeManager($pdo);
     $chargeCommunManager = new ChargeCommunManager($pdo);
     $livraisonsManager = new LivraisonManager($pdo);
     $livraisonDetailManager = new LivraisonDetailManager($pdo);
     $fournisseursManager = new FournisseurManager($pdo);
     $reglementsFournisseurManager = new ReglementFournisseurManager($pdo);
     $caisseEntreesManager = new CaisseEntreesManager($pdo);
     $caisseSortiesManager = new CaisseSortiesManager($pdo);
     $operationsManager = new OperationManager($pdo);
     //classes and vars
     //$idProjet = $_GET['idProjet'];
     //$projet = $projetManager->getProjetById($idProjet);
     //Container 1 : Statistiques
     $chiffreAffaireTheorique = 
     ceil($appartementManager->getTotalPrixAppartements() + $locauxManager->getTotalPrixLocaux());
     
    } elseif (file_exists('../controller/' . $myClass . '.php')) {
        include '../controller/' . $myClass . '.php';
    }
}
spl_autoload_register("classLoad");
include '../config.php';
include '../lib/image-processing.php';
//classes loading end
session_start();
//post input processing
$action = htmlentities($_POST['action']);
//This var contains result message of CRUD action
$actionMessage = "";
$typeMessage = "";
//Component Class Manager
$chargeManager = new ChargeManager($pdo);
//The History Component is used in all ActionControllers to mention a historical version of each action
$historyManager = new HistoryManager($pdo);
//Action Add Processing Begin
$idProjet = htmlentities($_POST['idProjet']);
//begin process: test the action
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['type'])) {
        $type = htmlentities($_POST['type']);
        $dateOperation = htmlentities($_POST['dateOperation']);
        $montant = htmlentities($_POST['montant']);
        $societe = htmlentities($_POST['societe']);
        $designation = htmlentities($_POST['designation']);
        $createdBy = $_SESSION['userMerlaTrav']->login();
        $created = date('Y-m-d h:i:s');
    } elseif (file_exists('../controller/' . $myClass . '.php')) {
        include '../controller/' . $myClass . '.php';
    }
}
spl_autoload_register("classLoad");
include '../config.php';
include '../lib/image-processing.php';
//classes loading end
session_start();
//post input processing
$action = htmlentities($_POST['action']);
//This var contains result message of CRUD action
$actionMessage = "";
$typeMessage = "";
//Component Class Manager
$chargeManager = new ChargeManager($pdo);
$projetManager = new ProjetManager($pdo);
//The History Component is used in all ActionControllers to mention a historical version of each action
$historyManager = new HistoryManager($pdo);
//Action Add Processing Begin
$idProjet = htmlentities($_POST['idProjet']);
$nomProjet = $projetManager->getProjetById($idProjet)->nom();
//begin process: test the action
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['type'])) {
        $type = htmlentities($_POST['type']);
        $dateOperation = htmlentities($_POST['dateOperation']);
        $montant = htmlentities($_POST['montant']);
        $societe = htmlentities($_POST['societe']);
        $designation = htmlentities($_POST['designation']);
function classLoad($myClass)
{
    if (file_exists('../model/' . $myClass . '.php')) {
        include '../model/' . $myClass . '.php';
    } elseif (file_exists('../controller/' . $myClass . '.php')) {
        include '../controller/' . $myClass . '.php';
    }
}
spl_autoload_register("classLoad");
include '../config.php';
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav'])) {
    //classes managers
    $projetManager = new ProjetManager($pdo);
    $chargeManager = new ChargeManager($pdo);
    $idProjet = htmlentities($_POST['idProjet']);
    $projet = $projetManager->getProjetById($idProjet);
    $criteria = htmlentities($_POST['criteria']);
    if ($criteria == "parDate") {
        $dateFrom = htmlentities($_POST['dateFrom']);
        $dateTo = htmlentities($_POST['dateTo']);
        $type = htmlentities($_POST['type']);
        if ($type == "Toutes") {
            $charges = $chargeManager->getChargesByIdProjetByDates($idProjet, $dateFrom, $dateTo);
            $totalCharges = number_format($chargeManager->getTotalByIdProjetByDates($idProjet, $dateFrom, $dateTo), 2, ',', ' ');
            $titreDocument = "Liste des charges entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo));
        } else {
            $charges = $chargeManager->getChargesByIdProjetByDatesByType($idProjet, $dateFrom, $dateTo, $type);
            $totalCharges = number_format($chargeManager->getTotalByIdProjetByDatesByType($idProjet, $dateFrom, $dateTo, $type), 2, ',', ' ');
            $titreDocument = "Liste des charges " . $type . " entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo));
 $dateOperation = $dateOperation->format('Y-m-d');
 $designation = htmlentities($_POST['designation']);
 if ($destinations == "ChargesCommuns") {
     $chargeCommunManager = new ChargeCommunManager($pdo);
     $societe = htmlentities($_POST['societe']);
     $type = htmlentities($_POST['typeChargesCommuns']);
     $createdBy = $_SESSION['userMerlaTrav']->login();
     $created = date('Y-m-d h:i:s');
     //create object
     $charge = new ChargeCommun(array('type' => $type, 'dateOperation' => $dateOperation, 'montant' => $montant, 'societe' => $societe, 'designation' => $designation, 'created' => $created, 'createdBy' => $createdBy));
     //add it to db
     $chargeCommunManager->add($charge);
     $releveBancaireManager->hide($idReleveBancaire);
 } else {
     if ($destinations == "ChargesProjets") {
         $chargeManager = new ChargeManager($pdo);
         $societe = htmlentities($_POST['societe2']);
         $type = htmlentities($_POST['typeChargesProjet']);
         $projet = htmlentities($_POST['projet']);
         $createdBy = $_SESSION['userMerlaTrav']->login();
         $created = date('Y-m-d h:i:s');
         //create object
         $charge = new Charge(array('type' => $type, 'dateOperation' => $dateOperation, 'montant' => $montant, 'societe' => $societe, 'designation' => $designation, 'idProjet' => $projet, 'created' => $created, 'createdBy' => $createdBy));
         //add it to db
         $chargeManager->add($charge);
         $releveBancaireManager->hide($idReleveBancaire);
     } else {
         if ($destinations == "Ignorer") {
             $releveBancaireManager->delete($idReleveBancaire);
         }
     }