//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'])) {
    //classes managers
    $chargeManager = new ChargeCommunManager($pdo);
    $typeChargeManager = new TypeChargeCommunManager($pdo);
    $criteria = htmlentities($_POST['criteria']);
    $resumeDetail = "";
    if ($criteria == "parDate") {
        $dateFrom = htmlentities($_POST['dateFrom']);
        $dateTo = htmlentities($_POST['dateTo']);
        $type = htmlentities($_POST['type']);
        if ($type == "Toutes") {
            $charges = $chargeManager->getChargesByDates($dateFrom, $dateTo);
            $totalCharges = number_format($chargeManager->getTotalByDates($dateFrom, $dateTo), 2, ',', ' ');
            $titreDocument = "Liste des charges communs entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo));
        } else {
            $charges = $chargeManager->getChargesByDatesByType($dateFrom, $dateTo, $type);
            $totalCharges = number_format($chargeManager->getTotalByDatesByType($dateFrom, $dateTo, $type), 2, ',', ' ');
            $titreDocument = "Liste des charges communs " . $typeChargeManager->getTypeChargeById($type)->nom() . " entre : " . date('d/m/Y', strtotime($dateFrom)) . ' - ' . date('d/m/Y', strtotime($dateTo));
예제 #2
0
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() == "consultant")) {
    //classManagers
    $chargeManager = new ChargeCommunManager($pdo);
    $typeChargeManager = new TypeChargeCommunManager($pdo);
    //
    $charges = $chargeManager->getChargesByGroup();
    $typeCharges = $typeChargeManager->getTypeCharges();
    ?>
<!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" />
예제 #3
0
        }
    }
    spl_autoload_register("classLoad"); 
    include('config.php');  
    //classes loading end
    session_start();
    if(isset($_SESSION['userMerlaTrav']) and (isset($_GET['idProjet']))){
    	//classes managers
    	$appartementManager = new AppartementManager($pdo);
        $locauxManager = new LocauxManager($pdo);
		$usersManager = new UserManager($pdo);
		$projetManager = new ProjetManager($pdo);
		$contratManager = new ContratManager($pdo);
		$clientManager = new ClientManager($pdo);
        $chargeManager = new ChargeManager($pdo);
        $chargeCommunManager = new ChargeCommunManager($pdo);
		$livraisonsManager = new LivraisonManager($pdo);
        $livraisonDetailManager = new LivraisonDetailManager($pdo);
		$fournisseursManager = new FournisseurManager($pdo);
		$reglementsFournisseurManager = new ReglementFournisseurManager($pdo);
		$caisseEntreesManager = new CaisseEntreesManager($pdo);
		$caisseSortiesManager = new CaisseSortiesManager($pdo);
		$operationsManager = new OperationManager($pdo);
		//classes and vars
		$idProjet = $_GET['idProjet'];
        $projet = $projetManager->getProjetById($idProjet);
		//Container 1 : Statistiques
		$chiffreAffaireTheorique = 
		ceil(
		  $appartementManager->getTotalPrixAppartementsByIdProjet($idProjet)
          +
예제 #4
0
     }
 }
 spl_autoload_register("classLoad"); 
 include('config.php');  
 //classes loading end
 session_start();
 if(isset($_SESSION['userMerlaTrav']) ){
     //classes managers
     $appartementManager = new AppartementManager($pdo);
     $locauxManager = new LocauxManager($pdo);
     $usersManager = new UserManager($pdo);
     $projetManager = new ProjetManager($pdo);
     $contratManager = new ContratManager($pdo);
     $clientManager = new ClientManager($pdo);
     $chargeManager = new ChargeManager($pdo);
     $chargeCommunManager = new ChargeCommunManager($pdo);
     $livraisonsManager = new LivraisonManager($pdo);
     $livraisonDetailManager = new LivraisonDetailManager($pdo);
     $fournisseursManager = new FournisseurManager($pdo);
     $reglementsFournisseurManager = new ReglementFournisseurManager($pdo);
     $caisseEntreesManager = new CaisseEntreesManager($pdo);
     $caisseSortiesManager = new CaisseSortiesManager($pdo);
     $operationsManager = new OperationManager($pdo);
     //classes and vars
     //$idProjet = $_GET['idProjet'];
     //$projet = $projetManager->getProjetById($idProjet);
     //Container 1 : Statistiques
     $chiffreAffaireTheorique = 
     ceil($appartementManager->getTotalPrixAppartements() + $locauxManager->getTotalPrixLocaux());
     
     //get contacts ids and get sum of client operations
    } 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 = "";
//Component Class Manager
$chargeManager = new ChargeCommunManager($pdo);
//The History Component is used in all ActionControllers to mention a historical version of each action
$historyManager = new HistoryManager($pdo);
//Action Add Processing Begin
//begin process: test the action
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['type'])) {
        $type = htmlentities($_POST['type']);
        $dateOperation = htmlentities($_POST['dateOperation']);
        $montant = htmlentities($_POST['montant']);
        $societe = htmlentities($_POST['societe']);
        $designation = htmlentities($_POST['designation']);
        $createdBy = $_SESSION['userMerlaTrav']->login();
        $created = date('Y-m-d h:i:s');
        //create object
예제 #6
0
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() == "consultant")) {
    //classManagers
    $chargeManager = new ChargeCommunManager($pdo);
    $typeChargeManager = new TypeChargeCommunManager($pdo);
    //
    $typeCharge = $_GET['type'];
    $nomTypeCharge = $typeChargeManager->getTypeChargeById($typeCharge)->nom();
    $charges = $chargeManager->getChargesByType($typeCharge);
    $total = number_format($chargeManager->getTotalByType($typeCharge), 2, ',', ' ');
    $typeCharges = $typeChargeManager->getTypeCharges();
    ?>
<!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" />
     } else {
         $actionMessage = "<strong>Erreur Modification Releve Bancaire</strong> : Vous devez remplir le champ <strong>Date Opération</strong>.";
         $typeMessage = "error";
     }
 } else {
     if ($action == "process-fournisseur") {
         $idReleveBancaire = $_POST['idReleveBancaire'];
         $destinations = htmlentities($_POST['destinations']);
         $societe = "";
         $montant = htmlentities($_POST['montant']);
         $dateOperation = htmlentities($_POST['dateOperation']);
         $dateOperation = DateTime::createFromFormat('d/m/Y', trim($dateOperation));
         $dateOperation = $dateOperation->format('Y-m-d');
         $designation = htmlentities($_POST['designation']);
         if ($destinations == "ChargesCommuns") {
             $chargeCommunManager = new ChargeCommunManager($pdo);
             $societe = htmlentities($_POST['societe']);
             $type = htmlentities($_POST['typeChargesCommuns']);
             $createdBy = $_SESSION['userMerlaTrav']->login();
             $created = date('Y-m-d h:i:s');
             //create object
             $charge = new ChargeCommun(array('type' => $type, 'dateOperation' => $dateOperation, 'montant' => $montant, 'societe' => $societe, 'designation' => $designation, 'created' => $created, 'createdBy' => $createdBy));
             //add it to db
             $chargeCommunManager->add($charge);
             $releveBancaireManager->hide($idReleveBancaire);
         } else {
             if ($destinations == "ChargesProjets") {
                 $chargeManager = new ChargeManager($pdo);
                 $societe = htmlentities($_POST['societe2']);
                 $type = htmlentities($_POST['typeChargesProjet']);
                 $projet = htmlentities($_POST['projet']);