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" /> <title>GELM - Management Application</title> <meta content="width=device-width, initial-scale=1.0" name="viewport" />
} 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(); $mailsNumberToday = $mailsManager->getMailsNumberToday(); $mailsToday = $mailsManager->getMailsToday(); $clientWeek = $clientManager->getClientsWeek(); $clientNumberWeek = $clientManager->getClientsNumberWeek(); $livraisonsNumber = $livraisonsManager->getLivraisonNumber();
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 $mois = $_GET['mois']; $annee = $_GET['annee']; $projetManager = new ProjetManager($pdo); $caisseManager = new CaisseManager($pdo); $projets = $projetManager->getProjets(); $caisses = $caisseManager->getCaissesByMonthYear($mois, $annee); $totalEntrees = $caisseManager->getTotalCaisseByTypeByMonthYear('Entree', $mois, $annee); $totalSorties = $caisseManager->getTotalCaisseByTypeByMonthYear('Sortie', $mois, $annee); $totalCaisse = $totalEntrees - $totalSorties; ?> <!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" />
} } 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 //The History Component is used in all ActionControllers to mention a historical version of each action $historyManager = new HistoryManager($pdo); $caisseManager = new CaisseManager($pdo); //Action Add Processing Begin if ($action == "add") { if (!empty($_POST['type'])) { $type = htmlentities($_POST['type']); $dateOperation = htmlentities($_POST['dateOperation']); $montant = htmlentities($_POST['montant']); $designation = htmlentities($_POST['designation']); $destination = htmlentities($_POST['destination']); $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d h:i:s'); //create object $caisse = new Caisse(array('type' => $type, 'dateOperation' => $dateOperation, 'montant' => $montant, 'designation' => $designation, 'destination' => $destination, 'created' => $created, 'createdBy' => $createdBy)); //add it to db $caisseManager->add($caisse); //add history data to db
{ 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); $caisseManager = new CaisseManager($pdo); $projets = $projetManager->getProjets(); $caisses = $caisseManager->getCaissesGroupByMonth(); $totalCaisse = $caisseManager->getTotalCaisseByType('Entree') - $caisseManager->getTotalCaisseByType('Sortie'); $totalEntrees = $caisseManager->getTotalCaisseByType('Entree'); $totalSorties = $caisseManager->getTotalCaisseByType('Sortie'); ?> <!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" />
{ 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); $caisseManager = new CaisseManager($pdo); $caisseEntreesManager = new CaisseEntreesManager($pdo); $caisseSortiesManager = new CaisseSortiesManager($pdo); $projets = $projetManager->getProjets(); $caisses = $caisseManager->getCaisses(); $totalCaisse = $caisseManager->getTotalCaisseByType('Entree') - $caisseManager->getTotalCaisseByType('Sortie'); $totalEntrees = $caisseManager->getTotalCaisseByType('Entree'); $totalSorties = $caisseManager->getTotalCaisseByType('Sortie'); ?> <!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" />
{ 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 $projetManager = new ProjetManager($pdo); $caisseManager = new CaisseManager($pdo); $projets = $projetManager->getProjets(); $caisses = $caisseManager->getCaisses(); //test the employeSociete object number: if exists get terrain else do nothing ?> <!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" /> <meta content="" name="author" />
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") { //classes managers $projetManager = new ProjetManager($pdo); $caisseManager = new CaisseManager($pdo); $projets = $projetManager->getProjets(); $caisses = ""; $titreDocument = ""; $totalCaisse = 0; $criteria = htmlentities($_POST['criteria']); if ($criteria == "parDate") { $dateFrom = htmlentities($_POST['dateFrom']); $dateTo = htmlentities($_POST['dateTo']); $type = htmlentities($_POST['type']); if ($type == "Toutes") { $caisses = $caisseManager->getCaissesByDates($dateFrom, $dateTo); $titreDocument = "Liste des opérations entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo)); $totalCaisse = $caisseManager->getTotalCaisseByTypeByDate('Entree', $dateFrom, $dateTo) - $caisseManager->getTotalCaisseByTypeByDate('Sortie', $dateFrom, $dateTo); } else { $caisses = $caisseManager->getCaissesByDatesByType($dateFrom, $dateTo, $type);
include '../controller/' . $myClass . '.php'; } } spl_autoload_register("classLoad"); include '../config.php'; include '../lib/image-processing.php'; //classes loading end session_start(); //post input processing $idCaisse = htmlentities($_POST['idCaisse']); $action = htmlentities($_POST['action']); //This var contains result message of CRUD action $actionMessage = ""; $typeMessage = ""; $caisseDetailsManager = new CaisseDetailsManager($pdo); $caisseManager = new CaisseManager($pdo); if ($action == "add") { if (!empty($_POST['montant'])) { $dateOperation = htmlentities($_POST['dateOperation']); $personne = htmlentities($_POST['personne']); $designation = htmlentities($_POST['designation']); $projet = htmlentities($_POST['projet']); $typeOperation = htmlentities($_POST['typeOperation']); $montant = htmlentities($_POST['montant']); $commentaire = htmlentities($_POST['commentaire']); $createdBy = $_SESSION['userMerlaTrav']->login(); $created = date('Y-m-d'); //create object $caisseDetails = new CaisseDetails(array('dateOperation' => $dateOperation, 'personne' => $personne, 'designation' => $designation, 'projet' => $projet, 'type' => $typeOperation, 'montant' => $montant, 'commentaire' => $commentaire, 'idCaisse' => $idCaisse, 'createdBy' => $createdBy, 'created' => $created)); //add it to db $caisseDetailsManager->add($caisseDetails);