$projetManager = new ProjetManager($pdo); $caisseManager = ""; $projets = $projetManager->getProjets(); $titre = ""; $caisses = ""; $titreDocument = ""; $totalCaisse = 0; $credit = 0; $debit = 0; $societe = htmlentities($_POST['societe']); if ($societe == 1) { $caisseManager = new CaisseManager($pdo); $titre = "Société MerlaTrav"; } else { if ($societe == 2) { $caisseManager = new CaisseIaazaManager($pdo); $titre = "Société Iaaza"; } } $criteria = htmlentities($_POST['criteria']); if ($criteria == "parDate") { $dateFrom = htmlentities($_POST['dateFrom']); $dateTo = htmlentities($_POST['dateTo']); $type = htmlentities($_POST['type']); $destination = htmlentities($_POST['destination']); if ($type == "Toutes") { $caisses = $caisseManager->getCaissesByDatesByDestination($dateFrom, $dateTo, $destination); $titreDocument = "Liste des opérations pour " . $destination . " entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo)); $credit = $caisseManager->getTotalCaisseByTypeByDateByDestination('Entree', $dateFrom, $dateTo, $destination); $debit = $caisseManager->getTotalCaisseByTypeByDateByDestination('Sortie', $dateFrom, $dateTo, $destination); $totalCaisse = $caisseManager->getTotalCaisseByTypeByDateByDestination('Entree', $dateFrom, $dateTo, $destination) - $caisseManager->getTotalCaisseByTypeByDateByDestination('Sortie', $dateFrom, $dateTo, $destination);
} } 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 CaisseIaazaManager($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
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(); $livraisonsWeek = $livraisonsManager->getLivraisonsWeek();
{ 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 CaisseIaazaManager($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" />
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 CaisseIaazaManager($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" />
{ 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 CaisseIaazaManager($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" /> <title>ImmoERP - Management Application</title> <meta content="width=device-width, initial-scale=1.0" name="viewport" />