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']);
$idSociete = htmlentities($_POST['idSociete']);
//This var contains result message of CRUD action
$actionMessage = "";
$typeMessage = "";
//Component Class Manager
$chargesCommunsManager = new ChargesCommunsManager($pdo);
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['dateOperation'])) {
        $dateOperation = htmlentities($_POST['dateOperation']);
        $designation = htmlentities($_POST['designation']);
        $beneficiaire = htmlentities($_POST['beneficiaire']);
        $numeroCheque = htmlentities($_POST['numeroCheque']);
        $montant = htmlentities($_POST['montant']);
        $idSociete = htmlentities($_POST['idSociete']);
        $idProjet = htmlentities($_POST['idProjet']);
        $createdBy = $_SESSION['userMerlaTrav']->login();
        $created = date('Y-m-d h:i:s');
        //create object
        $chargesCommuns = new ChargesCommuns(array('dateOperation' => $dateOperation, 'designation' => $designation, 'beneficiaire' => $beneficiaire, 'numeroCheque' => $numeroCheque, 'montant' => $montant, 'idSociete' => $idSociete, 'idProjet' => $idProjet, 'created' => $created, 'createdBy' => $createdBy));
        //add it to db
    }
}
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);
    $societeManager = new SocieteManager($pdo);
    $projets = $projetManager->getProjets();
    $idSociete = htmlentities($_POST['idSociete']);
    $societe = $societeManager->getSocieteById($idSociete);
    $dateFrom = htmlentities($_POST['dateFrom']);
    $dateTo = htmlentities($_POST['dateTo']);
    $chargesCommunsManager = new ChargesCommunsManager($pdo);
    $totalChargesCommuns = number_format($chargesCommunsManager->getTotalByIdSociete($idSociete), 2, ',', ' ');
    $chargesCommuns = $chargesCommunsManager->getChargesCommunsByDatesByIdSociete($idSociete, $dateFrom, $dateTo);
    ob_start();
    ?>
<style type="text/css">
    p, h1, h2{
        text-align: center;
        text-decoration: underline;
    }
    table {
            border-collapse: collapse;
            width:100%;
        }
        
        table, th, td {
示例#3
0
    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);
    $societeManager = new SocieteManager($pdo);
    $chargesCommunsManager = new ChargesCommunsManager($pdo);
    //
    if (isset($_GET['idSociete']) and ($_GET['idSociete'] >= 1 and $_GET['idSociete'] <= $societeManager->getLastId())) {
        $idSociete = $_GET['idSociete'];
        $chargesCommuns = $chargesCommunsManager->getChargesCommunsBySociete($idSociete);
        $projets = $projetManager->getProjetsByIdSociete($idSociete);
        $societes = $societeManager->getSocietes();
        $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>