Example #1
0
    } 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") {
    //les sources
    $idProjet = 0;
    $projetManager = new ProjetManager($pdo);
    $employeManager = new EmployeManager($pdo);
    $paiementManager = new PaiementEmployeManager($pdo);
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId()) {
        $idProjet = $_GET['idProjet'];
        $projet = $projetManager->getProjetById($idProjet);
        $employes = $employeManager->getEmployes();
        $paiementNumber = $paiementManager->getPaiementEmployeNumberByIdProjet($idProjet);
        if ($paiementNumber != 0) {
            $paiements = $paiementManager->getPaiementsByIdProjet($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>
include '../config.php';
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav']) and $_SESSION['userMerlaTrav']->profil() == "admin") {
    $projetManager = new ProjetManager($pdo);
    $fournisseurManager = new FournisseurManager($pdo);
    $livraisonManager = new LivraisonManager($pdo);
    $livraisonDetailManager = new LivraisonDetailManager($pdo);
    $reglementsFournisseurManager = new ReglementFournisseurManager($pdo);
    //classes and vars
    $livraisonNumber = 0;
    $totalReglement = 0;
    $totalLivraison = 0;
    $titreLivraison = "Liste de toutes les livraisons";
    $hrefLivraisonBilanPrintController = "controller/LivraisonBilanPrintController.php";
    if (isset($_POST['idProjet']) and ($_POST['idProjet'] >= 1 and $_POST['idProjet'] <= $projetManager->getLastId())) {
        $idProjet = htmlentities($_POST['idProjet']);
        $idFournisseur = htmlentities($_POST['idFournisseur']);
        $dateFrom = htmlentities($_POST['dateFrom']);
        $dateTo = htmlentities($_POST['dateTo']);
        $livraisonNumber = $livraisonManager->getLivraisonsNumberByIdFournisseur($idFournisseur);
        //if($livraisonNumber != 0){
        $livraisons = $livraisonManager->getLivraisonsNonPayesByIdFournisseurByProjet($idFournisseur, $idProjet);
        $titreLivraison = "Liste des Livraisons du Fournisseur " . strtoupper($fournisseurManager->getFournisseurById($idFournisseur)->nom()) . "<br>Projet: " . $projetManager->getProjetById($idProjet)->nom();
        //get the sum of livraisons details using livraisons ids (idFournisseur)
        $livraisonsIds = $livraisonManager->getLivraisonNonPayesIdsByIdFournisseurByIdProjet($idFournisseur, $idProjet);
        if (isset($_POST['chooseDate']) and !empty($_POST['chooseDate'])) {
            if (isset($_POST['printAll']) and !empty($_POST['printAll'])) {
                $livraisons = $livraisonManager->getLivraisonsByIdFournisseurByProjetByDates($idFournisseur, $idProjet, $dateFrom, $dateTo);
                $livraisonsIds = $livraisonManager->getLivraisonIdsByIdFournisseurIdProjetByDates($idFournisseur, $idProjet, $dateFrom, $dateTo);
            } else {
Example #3
0
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav']) and $_SESSION['userMerlaTrav']->profil() == "admin") {
    $idProjet = 0;
    //classManagers
    $projetManager = new ProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $contratManager = new ContratManager($pdo);
    $maisonManager = new MaisonManager($pdo);
    $appartementManager = new AppartementManager($pdo);
    $localManager = new LocauxManager($pdo);
    $terrainManager = new TerrainManager($pdo);
    //objects and vars
    $projet = "";
    $contrat = "";
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId() and (isset($_GET['idContrat']) and $_GET['idContrat'] > 0 and $_GET['idContrat'] <= $contratManager->getLastId())) {
        $idProjet = $_GET['idProjet'];
        $idSociete = $_GET['idSociete'];
        $idContrat = $_GET['idContrat'];
        $projet = $projetManager->getProjetById($idProjet);
        $societe = $societeManager->getSocieteById($idSociete);
        $contrat = $contratManager->getContratById($idContrat);
    }
    ?>
<!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>
	<meta charset="utf-8" />
Example #4
0
    } 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() == "manager")) {
    $idProjet = 0;
    $projetManager = new ProjetManager($pdo);
    $clientManager = new ClientManager($pdo);
    $companieManager = new CompanyManager($pdo);
    $projet = "";
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId() and (isset($_GET['codeClient']) and (bool) $clientManager->getCodeClient($_GET['codeClient']))) {
        $idProjet = $_GET['idProjet'];
        $codeClient = $_GET['codeClient'];
        $projet = $projetManager->getProjetById($idProjet);
        $client = $clientManager->getClientByCode($codeClient);
        $companies = $companieManager->getCompanys();
    }
    ?>
<!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>
	<meta charset="utf-8" />
	<title>ImmoERP - Management Application</title>
    } 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") {
    //les sources
    $idProjet = 0;
    $idLivraison = 0;
    $projetManager = new ProjetManager($pdo);
    $livraisonManager = new LivraisonManager($pdo);
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId() and (isset($_GET['idLivraison']) and ($_GET['idLivraison'] > 0 and $_GET['idLivraison'] <= $livraisonManager->getLastId()))) {
        $idProjet = $_GET['idProjet'];
        $idLivraison = $_GET['idLivraison'];
        $projet = $projetManager->getProjetById($idProjet);
        $livraison = $livraisonManager->getLivraisonById($idLivraison);
        $piecesManager = new LivraisonPiecesManager($pdo);
        $pieces = "";
        //test the terrain object number: if exists get terrain else do nothing
        $piecesNumber = $piecesManager->getPiecesLivraisonNumberByIdLivraison($idLivraison);
        if ($piecesNumber != 0) {
            $pieces = $piecesManager->getPiecesLivraisonByIdLivraison($idLivraison);
        }
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
Example #6
0
    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]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <meta charset="utf-8" />
    <title>ImmoERP - Management Application</title>
    } 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);
    $appartementManager = new AppartementManager($pdo);
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId() and (isset($_GET['idAppartement']) and ($_GET['idAppartement'] > 0 and $_GET['idAppartement'] <= $appartementManager->getLastId()))) {
        $idProjet = $_GET['idProjet'];
        $idAppartement = $_GET['idAppartement'];
        $projet = $projetManager->getProjetById($idProjet);
        $appartement = $appartementManager->getAppartementById($idAppartement);
        $piecesManager = new PiecesAppartementManager($pdo);
        $piecesAppartement = "";
        //test the terrain object number: if exists get terrain else do nothing
        $piecesNumber = $piecesManager->getPiecesAppartementNumberByIdAppartement($idAppartement);
        if ($piecesNumber != 0) {
            $piecesAppartement = $piecesManager->getPiecesAppartementByIdAppartement($idAppartement);
        }
    }
    ?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
        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") {
    $idProjet = 0;
    $projetManager = new ProjetManager($pdo);
    $fournisseurManager = new FournisseurManager($pdo);
    $livraisonManager = new LivraisonManager($pdo);
    $showFournisseurSelect = 0;
    $showProjetSelect = 0;
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId() and (isset($_GET['idFournisseur']) and $_GET['idFournisseur'] > 0 and $_GET['idFournisseur'] <= $fournisseurManager->getLastId())) {
        $idProjet = $_GET['idProjet'];
        $idFournisseur = $_GET['idFournisseur'];
        $projet = $projetManager->getProjetById($idProjet);
        $fournisseur = $fournisseurManager->getFournisseurById($idFournisseur);
        $showFournisseurSelect = 1;
        $showProjetSelect = 1;
    } else {
        if (isset($_GET['idFournisseur']) and $_GET['idFournisseur'] > 0 and $_GET['idFournisseur'] <= $fournisseurManager->getLastId()) {
            $idFournisseur = $_GET['idFournisseur'];
            $projets = $projetManager->getProjets();
            $fournisseur = $fournisseurManager->getFournisseurById($idFournisseur);
            $showFournisseurSelect = 1;
            $showProjetSelect = 0;
        } else {
            if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId()) {
    } 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]-->