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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav']) and $_SESSION['userMerlaTrav']->profil() == "admin") { $fournisseurManager = new FournisseurManager($pdo); $projetManager = new ProjetManager($pdo); $livraisonManager = new LivraisonManager($pdo); $idFournisseur = 0; if (isset($_GET['idFournisseur']) and ($_GET['idFournisseur'] > 0 and $_GET['idFournisseur'] <= $fournisseurManager->getLastId())) { $idFournisseur = $_GET['idFournisseur']; $reglementsManager = new ReglementFournisseurManager($pdo); $reglementNumber = $reglementsManager->getReglementsNumberByIdFournisseurOnly($idFournisseur); if ($reglementNumber != 0) { $reglementPerPage = 10; $pageNumber = ceil($reglementNumber / $reglementPerPage); $p = 1; if (isset($_GET['p']) and ($_GET['p'] > 0 and $_GET['p'] <= $pageNumber)) { $p = $_GET['p']; } else { $p = 1; }
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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav'])) { //classManagers $projetManager = new ProjetManager($pdo); $fournisseurManager = new FournisseurManager($pdo); $livraisonManager = new LivraisonManager($pdo); $livraisonDetailManager = new LivraisonDetailManager($pdo); $reglementsFournisseurManager = new ReglementFournisseurManager($pdo); //classes and vars $idFournisseur = 0; $projets = $projetManager->getProjets(); $fournisseurs = $fournisseurManager->getFournisseurs(); $projet = $projetManager->getProjets(); $livraisonNumber = 0; $totalReglement = 0; $totalLivraison = 0; $titreLivraison = "Liste de toutes les livraisons"; $hrefLivraisonBilanPrintController = "controller/Livraison2BilanPrintController.php"; $livraisonListDeleteLink = "";
include '../model/' . $myClass . '.php'; } elseif (file_exists('../controller/' . $myClass . '.php')) { include '../controller/' . $myClass . '.php'; } } spl_autoload_register("classLoad"); include '../config.php'; include '../lib/image-processing.php'; require_once '../lib/tcpdf/tcpdf.php'; //classes loading end session_start(); //classes managers $contratEmployeManager = new ContratEmployeManager($pdo); $companyManager = new CompanyManager($pdo); $clientManager = new ClientManager($pdo); $projetManager = new ProjetManager($pdo); $employeManager = new EmployeManager($pdo); //classes $idContrat = $_GET['idContratEmploye']; $contrat = $contratEmployeManager->getContratEmployeById($idContrat); $projet = $projetManager->getProjetById($contrat->idProjet()); $employe = $employeManager->getEmployeById($contrat->employe()); //choix unité en arabe selon la valeur de l'unité $unite = ""; if ($contrat->unite() == "m²") { $unite = "المتر المربع"; } else { if ($contrat->unite() == "m lineaire") { $unite = "المتر الخطي"; } else { if ($contrat->unite() == "appartement") {
{ 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") { //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]-->
//classes loading begin 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']) 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']);
{ 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") { $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);
//classes loading begin 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'])) { $projetManager = new ProjetManager($pdo); $societeManager = new SocieteManager($pdo); $idProjet = $_GET['idProjet']; $idSociete = $_GET['idSociete']; $societe = $societeManager->getSocieteById($idSociete); ?> <!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>GELM - Management Application</title> <meta content="width=device-width, initial-scale=1.0" name="viewport" /> <meta content="" name="description" />
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(); //post input processing if (!empty($_POST['nom'])) { $nom = htmlentities($_POST['nom']); $projetManager = new ProjetManager($pdo); if ($projetManager->exists($nom) > 0) { $_SESSION['projet-add-error'] = "<strong>Erreur Ajout Projet : </strong>Un projet existe déjà avec ce nom : " . $nomProjet . "."; header('Location:../projets.php'); exit; } else { $numeroTitre = htmlentities($_POST['numeroTitre']); $emplacement = htmlentities($_POST['emplacement']); $superficie = htmlentities($_POST['superficie']); $description = htmlentities($_POST['description']); $dateCreation = htmlentities($_POST['dateCreation']); $status = "En cours"; $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d'); $idSociete = htmlentities($_POST['idSociete']); //create object
//classes loading begin 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(); //post input processing $idCheque = $_POST['idCheque']; $idSociete = htmlentities($_POST['idSociete']); $chequeManager = new ChequeManager($pdo); $cheque = $chequeManager->getChequeById($idCheque); $chequeManager->delete($idCheque); $_SESSION['cheque-delete-success'] = "<strong>Opération valide : </strong>Chèque supprimé avec succès."; //add history data to db $historyManager = new HistoryManager($pdo); $projetManager = new ProjetManager($pdo); $projet = $projetManager->getProjetById($cheque->idProjet()); $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); $history = new History(array('action' => "Suppression", 'target' => "Table des chèques", 'description' => "Suppression du chèque- N° : " . $cheque->numero() . " - Montant : " . $cheque->montant() . " - Compte : " . $cheque->compteBancaire() . " - Designation : " . $cheque->designationSociete() . "/" . $cheque->designationPersonne() . " - Projet : " . $projet->nom(), 'created' => $created, 'createdBy' => $createdBy)); //add it to db $historyManager->add($history); //do not forget p parameter and to send it in url header('Location:../company-cheques.php?idSociete=' . $idSociete);
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'); include('lib/pagination.php'); //classes loading end session_start(); if( isset($_SESSION['userMerlaTrav']) ){ //les sources $projetManager = new ProjetManager($pdo); $appartementManager = new AppartementManager($pdo); $locauxManager = new LocauxManager($pdo); $contratManager = new ContratManager($pdo); $clientManager = new ClientManager($pdo); $appartements = $appartementManager->getAppartementsNonVendu(); $appartementsRevendre = $contratManager->getAppartementsRevendre(); $locaux = $locauxManager->getLocauxNonVendu(); $locauxRevendre = $contratManager->getLocauxRevendre(); ?> <!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>
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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav'])) { //classManagers $projetManager = new ProjetManager($pdo); $fournisseurManager = new FournisseurManager($pdo); $commandeManager = new CommandeManager($pdo); $commandeDetailManager = new CommandeDetailManager($pdo); //classes and vars $commandes = ""; $projets = $projetManager->getProjets(); $fournisseurs = $fournisseurManager->getFournisseurs(); $projet = $projetManager->getProjets(); $livraisonListDeleteLink = ""; if (isset($_GET['mois']) and isset($_GET['annee'])) { $mois = $_GET['mois']; $annee = $_GET['annee']; $commandes = $commandeManager->getCommandesByMonthYear($mois, $annee); } ?>
{ 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") { //les sources $idProjet = 0; $projetManager = new ProjetManager($pdo); if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId()) { $idProjet = $_GET['idProjet']; } $employeManager = new EmployeProjetManager($pdo); $employes = ""; //test the employeSociete object number: if exists get terrain else do nothing $employeNumber = $employeManager->getEmployeProjetNumberByIdProjet($idProjet); if ($employeNumber != 0) { $employeProjetPerPage = 10; $pageNumber = ceil($employeNumber / $employeProjetPerPage); $p = 1; if (isset($_GET['p']) and ($_GET['p'] > 0 and $_GET['p'] <= $pageNumber)) { $p = $_GET['p']; } else { $p = 1;
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 $usersManager = new UserManager($pdo); $mailsManager = new MailManager($pdo); $notesClientsManager = new NotesClientManager($pdo); $projetManager = new ProjetManager($pdo); $contratManager = new ContratManager($pdo); $clientManager = new ClientManager($pdo); $livraisonsManager = new LivraisonManager($pdo); $fournisseursManager = new FournisseurManager($pdo); $caisseManager = new CaisseManager($pdo); $caisseIaazaManager = new CaisseIaazaManager($pdo); $operationsManager = new OperationManager($pdo); $compteBancaire = new CompteBancaireManager($pdo); //classes and vars //users number $soldeCaisseAnnahda = $caisseManager->getTotalCaisseByType("Entree") - $caisseManager->getTotalCaisseByType("Sortie"); $soldeCaisseIaaza = $caisseIaazaManager->getTotalCaisseByType("Entree") - $caisseIaazaManager->getTotalCaisseByType("Sortie"); $projetNumber = $projetManager->getProjetsNumber(); $usersNumber = $usersManager->getUsersNumber(); $fournisseurNumber = $fournisseursManager->getFournisseurNumbers();
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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav'])) { //les sources $projetManager = new ProjetManager($pdo); $appartementManager = new AppartementManager($pdo); $appartement = ""; $idAppartement = 0; $idProjet = $_GET['idProjet']; $projet = $projetManager->getProjetById($idProjet); if (isset($_GET['idAppartement']) and ($_GET['idAppartement'] > 0 and $_GET['idAppartement'] <= $appartementManager->getLastId())) { $idAppartement = htmlentities($_GET['idAppartement']); $appartement = $appartementManager->getAppartementById($idAppartement); $piecesManager = new AppartementPiecesManager($pdo); $piecesNumber = $piecesManager->getPiecesAppartementNumberByIdAppartement($idAppartement); if ($piecesNumber != 0) { $piecesAppartement = $piecesManager->getPiecesAppartementByIdAppartement($idAppartement); } } ?>
$idCharge = htmlentities($_POST['idCharge']); $idSociete = htmlentities($_POST['idSociete']); $type = htmlentities($_POST['type']); $charge = ""; $chargeManager = ""; if (htmlentities($_POST['typeCharge']) == "terrain") { $charge = new ChargesTerrain($chargeArray); $chargeManager = new ChargesTerrainManager($pdo); } else { if (htmlentities($_POST['typeCharge']) == "construction") { $charge = new ChargesConstruction($chargeArray); $chargeManager = new ChargesConstructionManager($pdo); } else { if (htmlentities($_POST['typeCharge']) == "finition") { $charge = new ChargesFinition($chargeArray); $chargeManager = new ChargesFinitionManager($pdo); } } } $chargeManager->delete($idCharge); //add history data to db $projetManager = new ProjetManager($pdo); $historyManager = new HistoryManager($pdo); $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); $history = new History(array('action' => "Suppression", 'target' => "Table des " . htmlentities($_POST['typeCharge']), 'description' => "Suppression des charges " . htmlentities($_POST['typeCharge']) . " - ID : " . $idCharge . " - Projet : " . $projetManager->getProjetById($idProjet)->nom(), 'created' => $created, 'createdBy' => $createdBy)); //add it to db $historyManager->add($history); $_SESSION['charge-delete-success'] = '<strong>Opération valide</strong> : La charge est supprimée avec succès !'; $redirectLink = 'Location:../projet-charges.php?idProjet=' . $idProjet . '&idSociete=' . $idSociete . '&type=' . $type; header($redirectLink);
$charge = new ChargesTerrain($chargeArray); $chargeManager = new ChargesTerrainManager($pdo); } else { if (htmlentities($_POST['typeCharge']) == "construction") { $charge = new ChargesConstruction($chargeArray); $chargeManager = new ChargesConstructionManager($pdo); } else { if (htmlentities($_POST['typeCharge']) == "finition") { $charge = new ChargesFinition($chargeArray); $chargeManager = new ChargesFinitionManager($pdo); } } } $chargeManager->add($charge); //add history data to db $projetManager = new ProjetManager($pdo); $historyManager = new HistoryManager($pdo); $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); $history = new History(array('action' => "Ajout", 'target' => "Table des " . htmlentities($_POST['typeCharge']), 'description' => "Ajout des charges " . htmlentities($_POST['typeCharge']) . " - Montant : " . $montant . " - Designation : " . $designation . " - Projet : " . $projetManager->getProjetById($idProjet)->nom(), 'created' => $created, 'createdBy' => $createdBy)); //add it to db $historyManager->add($history); $_SESSION['charge-add-success'] = '<strong>Opération valide</strong> : La charge est ajoutée avec succès !'; $redirectLink = 'Location:../projet-charges.php?idProjet=' . $idProjet . '&idSociete=' . $idSociete . '&type=' . $type; header($redirectLink); } else { $_SESSION['charge-add-error'] = "<strong>Erreur Ajout Charge</strong> : Vous devez remplir au moins les champs 'Date opération'."; $redirectLink = 'Location:../projet-charges.php?idProjet=' . $idProjet . '&idSociete=' . $idSociete . '&type=' . $type; header($redirectLink); exit; }
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'); 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); } }
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 $usersManager = new UserManager($pdo); $mailManager = new MailManager($pdo); $todoManager = new TodoProjetManager($pdo); $societeManager = new SocieteManager($pdo); $projetManager = new ProjetManager($pdo); //classes and vars //users number $users = $usersManager->getUsers(); //$mails = $mailManager->getMails(); $projets = $projetManager->getProjets(); $todos = 0; $societes = $societeManager->getSocietes(); if (isset($_POST['idSociete'])) { $idSociete = htmlentities($_POST['idSociete']); $mois = htmlentities($_POST['mois']); $annee = htmlentities($_POST['annee']); $todos = $todoManager->getTodosHiddenByIdSociete($idSociete, $mois, $annee); } else { if (isset($_GET['idSociete']) and isset($_GET['mois']) and isset($_GET['annee'])) { $idSociete = $_GET['idSociete'];
/** * Utile pour trouver le projet en cours à la date du jour * */ function lireFichierProjet() { // Construction du chemin absolu du fichier $cheminAbsolu = dirname(__FILE__); $cheminAbsolu = str_replace("/archi", "", $cheminAbsolu); $cheminAbsolu = str_replace("\\archi", "", $cheminAbsolu); $nomFichier = $cheminAbsolu . "/parametres/projets.yml"; // Lecture du fichier yaml $array = Spyc::YAMLLoad($nomFichier); // Exploitation des données $projetManager = new ProjetManager(); // on commence par le noeud racine: le projet foreach ($array as $noeudRacine) { $projet = new Projet(); $projetManager->ajouteUnProjet($projet); // prise en compte des caractéristiques du projet $projet->titre = $noeudRacine["titre"]; $projet->dateDebut = $noeudRacine["dateDebut"]; $projet->dateEcheance = $noeudRacine["echeance"]; $projet->description = $noeudRacine["description"]; $projet->repertoire = $noeudRacine["repertoire"]; // Prise en compte de toutes les pages du projet $presentation = $noeudRacine["presentation"]; foreach ($presentation as $numPage => $detailPage) { // Création d'une page avec ses caractéristiques $page = new Page(); $page->image = isset($detailPage["image"]) ? $detailPage["image"] : null; $page->titre = isset($detailPage["titre"]) ? $detailPage["titre"] : null; $page->contact = isset($detailPage["contact"]) ? $detailPage["contact"] : null; $page->nouvelles = isset($detailPage["nouvelles"]) ? $detailPage["nouvelles"] : null; $page->avancement = isset($detailPage["avancement"]) ? $detailPage["avancement"] : null; $page->descriptif = isset($detailPage["descriptif"]) ? $detailPage["descriptif"] : null; $page->lien = isset($detailPage["lien"]) ? $detailPage["lien"] : null; // On pousse la page dans le tableau de page du projet array_push($projet->listePages, $page); } } return $projetManager; }
//classes loading begin 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'])) { $projetManager = new ProjetManager($pdo); $fournisseurManager = new FournisseurManager($pdo); $livraisonManager = new LivraisonManager($pdo); $reglementsFournisseurManager = new ReglementFournisseurManager($pdo); if (isset($_GET['idFournisseur']) and isset($_GET['idProjet']) and $fournisseurManager->getOneFournisseurBySearch($_GET['idFournisseur'] >= 1)) { $fournisseur = $fournisseurManager->getOneFournisseurBySearch(htmlentities($_GET['idFournisseur'])); $idProjet = $_GET['idProjet']; $livraisonNumber = $livraisonManager->getLivraisonsNumberByIdFournisseurByProjet($fournisseur, $idProjet); if ($livraisonNumber != 0) { $livraisons = $livraisonManager->getLivraisonsByIdFournisseurByProjet($fournisseur, $idProjet); $titreLivraison = "Bilan des livraisons du fournisseur <strong>" . $fournisseurManager->getFournisseurById($fournisseur)->nom() . "</strong> / Projet: <strong>" . $projetManager->getProjetById($idProjet)->nom() . "</strong>"; $totalLivraison = $livraisonManager->getTotalLivraisonsIdFournisseurProjet($fournisseur, $idProjet); $totalReglement = $reglementsFournisseurManager->sommeReglementFournisseursByIdFournisseurByProjet($fournisseur, $idProjet); } } else { if (isset($_GET['idFournisseur']) and $fournisseurManager->getOneFournisseurBySearch($_GET['idFournisseur'] >= 1)) {
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'; 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]-->
//classes loading begin 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']) 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 $livraisonDetailNumber = 0; $totalReglement = 0; $totalLivraison = 0; $titreLivraison = "BL N° "; $livraison = "Vide"; $fournisseur = "Vide"; $projet = "Vide"; if (isset($_GET['idLivraison'])) { $livraison = $livraisonManager->getLivraisonById($_GET['idLivraison']); $fournisseur = $fournisseurManager->getFournisseurById($livraison->idFournisseur());
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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav'])) { //classManagers $projetManager = new ProjetManager($pdo); $fournisseurManager = new FournisseurManager($pdo); $livraisonManager = new LivraisonManager($pdo); $livraisonDetailManager = new LivraisonDetailManager($pdo); $reglementsFournisseurManager = new ReglementFournisseurManager($pdo); //classes and vars $livraisonDetailNumber = 0; $totalReglement = 0; $totalLivraison = 0; $titreLivraison = "Détail de la livraison"; $livraison = "Vide"; $fournisseur = "Vide"; $nomProjet = "Non mentionné"; $idProjet = ""; $fournisseurs = $fournisseurManager->getFournisseurs(); $projets = $projetManager->getProjets();
//classes loading begin 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']) and $_SESSION['userMerlaTrav']->profil() == "admin") { //class manager $projetManager = new ProjetManager($pdo); $fournisseurManager = new FournisseurManager($pdo); $livraisonManager = new LivraisonManager($pdo); $livraisonDetailManager = new LivraisonDetailManager($pdo); $reglementsFournisseurManager = new ReglementFournisseurManager($pdo); //classes and vars $idFournisseur = $_POST['idFournisseur']; $fournisseur = $fournisseurManager->getFournisseurById($idFournisseur); $reglements = ""; $reglementsNumber = 0; $livraisons = ""; $livraisonNumber = 0; $totalReglement = 0; $totalLivraison = 0; $titreLivraison = ""; if (isset($_POST['criteria']) and $_POST['criteria'] == "toutesLivraison") {
include '../config.php'; //classes loading end session_start(); //post input processing $idProjet = $_POST['idProjet']; $idSociete = $_POST['idSociete']; $idContrat = $_POST['idContrat']; //create classes managers $contratManager = new ContratManager($pdo); $redirectLink = 'Location:../contrats-list.php?idProjet=' . $idProjet . "&idSociete=" . $idSociete; if (isset($_POST['paye'])) { $paye = htmlentities($_POST['paye']); $contratManager->updatePaiement($paye, $idContrat); $contrat = $contratManager->getContratById($idContrat); //add history data to db $projetManager = new ProjetManager($pdo); $historyManager = new HistoryManager($pdo); $projet = $projetManager->getProjetById($idProjet); $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); $history = new History(array('action' => "Ajout Paiement Contrat Client", 'target' => "Table des contrats clients", 'description' => "Ajout Paiement Contrat Client - Client : " . $contrat->nomClient() . " - CIN : " . $contrat->cin() . " - ID Contrat : " . $idContrat . " - Montant : " . $paye . " - Projet : " . $projet->nom(), 'created' => $created, 'createdBy' => $createdBy)); //add it to db $historyManager->add($history); $_SESSION['contrat-paiement-success'] = "<strong>Opération valide : </strong>Le montant payé est modifié avec succès."; header($redirectLink); exit; } else { $_SESSION['contrat-paiement-error'] = "<strong>Erreur Modification Paiement Contrat : </strong>Vous devez remplir le champ 'Montant Payé'."; header($redirectLink); exit; }
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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav'])) { //les sources $projetsManager = new ProjetManager($pdo); $projetNumber = $projetsManager->getProjetsNumber(); $projets = $projetsManager->getProjets(); ?> <!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> <meta content="width=device-width, initial-scale=1.0" name="viewport" /> <meta content="" name="description" /> <meta content="" name="author" /> <link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav']) and $_SESSION['userMerlaTrav']->profil() == "admin") { //class managers $projetManager = new ProjetManager($pdo); $caisseDetailsManager = new CaisseDetailsManager($pdo); $caisseManager = new CaisseManager($pdo); //objects $projets = $projetManager->getProjets(); $idCaisse = $_GET['idCaisse']; $entrees = $caisseDetailsManager->getCaisseDetailsByIdCaisse($idCaisse); $caisse = $caisseManager->getCaisseById($idCaisse); ?> <!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" />
} 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 = ""; $terrainManager = new TerrainManager($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); $idProjet = htmlentities($_POST['idProjet']); $nomProjet = $projetManager->getProjetById($idProjet)->nom(); if ($action == "add") { if (!empty($_POST['prix'])) { $vendeur = htmlentities($_POST['vendeur']); $emplacement = htmlentities($_POST['emplacement']); $superficie = htmlentities($_POST['superficie']); $prix = htmlentities($_POST['prix']); $fraisAchat = htmlentities($_POST['fraisAchat']); $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); $terrain = new Terrain(array('vendeur' => $vendeur, 'prix' => $prix, 'superficie' => $superficie, 'fraisAchat' => $fraisAchat, 'emplacement' => $emplacement, 'idProjet' => $idProjet, 'created' => $created, 'createdBy' => $createdBy)); $terrainManager->add($terrain);
//classes loading begin 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'; include '../lib/image-processing.php'; //classes loading end session_start(); $historyManager = new HistoryManager($pdo); $projetManager = new ProjetManager($pdo); //post input processing $idProjet = htmlentities($_POST['idProjet']); $idSociete = htmlentities($_POST['idSociete']); $type = htmlentities($_POST['type']); if (!empty($_POST['idProjet'])) { if (!empty($_POST['numeroTitre'])) { $id = htmlentities($_POST['id']); $numeroTitre = htmlentities($_POST['numeroTitre']); $nom = htmlentities($_POST['nom']); $superficie = htmlentities($_POST['superficie']); $surplan = htmlentities($_POST['surplan']); $prix = htmlentities($_POST['prix']); if (isset($_POST['niveau'])) { $niveau = htmlentities($_POST['niveau']); }
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'; include 'lib/pagination.php'; //classes loading end session_start(); if (isset($_SESSION['userMerlaTrav'])) { //les sources $projetsManager = new ProjetManager($pdo); $societeManager = new SocieteManager($pdo); $societes = $societeManager->getSocietes(); if (isset($_GET['idSociete']) and ($_GET['idSociete'] >= 1 and $_GET['idSociete'] <= $societeManager->getLastId())) { $idSociete = $_GET['idSociete']; $idProjet = $_GET['idProjet']; $projet = $projetsManager->getProjetById($idProjet); $projetNumber = $projetsManager->getProjetsNumberByIdSociete($idSociete); $societe = $societeManager->getSocieteById($idSociete); } ?> <!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 -->