Exemplo n.º 1
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
    //propeties managers
    $appartementManager = new AppartementManager($pdo);
    $locauxManager = new LocauxManager($pdo);
    $terrainManager = new TerrainManager($pdo);
    $maisonManager = new MaisonManager($pdo);
    //charges managers
    $chargesTerrainManager = new ChargesTerrainManager($pdo);
    $chargesConstructionManager = new ChargesConstructionManager($pdo);
    $chargesFinitionManager = new ChargesFinitionManager($pdo);
    //livraisons & fournisseurs managers
    $livraisonsManager = new LivraisonManager($pdo);
    $livraisonDetailManager = new LivraisonDetailManager($pdo);
    $fournisseursManager = new FournisseurManager($pdo);
    //other managers
    $caisseManager = new CaisseManager($pdo);
    $usersManager = new UserManager($pdo);
    $projetManager = new ProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $contratManager = new ContratManager($pdo);
    //classes and vars
    $idProjet = $_GET['idProjet'];
    $idSociete = $_GET['idSociete'];
Exemplo n.º 2
0
    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'])) {
    //classManagers
    $projetManager = new ProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $chargesTerrainManager = new ChargesTerrainManager($pdo);
    $chargesConstructionManager = new ChargesConstructionManager($pdo);
    $chargesFinitionManager = new ChargesFinitionManager($pdo);
    //
    if (isset($_GET['idProjet']) and ($_GET['idProjet'] >= 1 and $_GET['idProjet'] <= $projetManager->getLastId())) {
        $idProjet = $_GET['idProjet'];
        $idSociete = $_GET['idSociete'];
        $type = $_GET['type'];
        $chargesTerrain = $chargesTerrainManager->getChargesTerrainsByIdProjet($idProjet);
        $chargesConstruction = $chargesConstructionManager->getChargesConstructionsByIdProjet($idProjet);
        $chargesFinition = $chargesFinitionManager->getChargesFinitionsByIdProjet($idProjet);
        $societe = $societeManager->getSocieteById($idSociete);
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
Exemplo n.º 3
0
}
spl_autoload_register("classLoad");
include '../config.php';
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav']) and $_SESSION['userMerlaTrav']->profil() == "admin") {
    //classes managers
    $projetManager = new ProjetManager($pdo);
    $projets = $projetManager->getProjets();
    $idProjet = htmlentities($_POST['idProjet']);
    $idSociete = htmlentities($_POST['idSociete']);
    $type = htmlentities($_POST['type']);
    $dateFrom = htmlentities($_POST['dateFrom']);
    $dateTo = htmlentities($_POST['dateTo']);
    if (isset($_POST['terrain'])) {
        $chargesTerrainManager = new ChargesTerrainManager($pdo);
        $totalChargesTerrain = number_format($chargesTerrainManager->getTotalByIdProjet($idProjet), 2, ',', ' ');
        $chargesTerrainLastWeek = $chargesTerrainManager->getChargesTerrainsByDatesByIdProjet($idProjet, $dateFrom, $dateTo);
    }
    if (isset($_POST['construction'])) {
        $chargesConstructionManager = new ChargesConstructionManager($pdo);
        $totalChargesConstruction = number_format($chargesConstructionManager->getTotalByIdProjet($idProjet), 2, ',', ' ');
        $chargesConstructionLastWeek = $chargesConstructionManager->getChargesConstructionsByDatesByIdProjet($idProjet, $dateFrom, $dateTo);
    }
    if (isset($_POST['finition'])) {
        $chargesFinitionManager = new ChargesFinitionManager($pdo);
        $totalChargesFinition = number_format($chargesFinitionManager->getTotalByIdProjet($idProjet), 2, ',', ' ');
        $chargesFinitionLastWeek = $chargesFinitionManager->getChargesFinitionsByDatesByIdProjet($idProjet, $dateFrom, $dateTo);
    }
    ob_start();
    ?>