} 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") {
            $unite = "الشقة";
Exemplo n.º 2
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']) 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]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
    }
}
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);
$employeManager = new EmployeManager($pdo);
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['nom'])) {
        $nom = htmlentities($_POST['nom']);
        $adresse = htmlentities($_POST['adresse']);
        $nomArabe = htmlentities($_POST['nomArabe']);
        $adresseArabe = htmlentities($_POST['adresseArabe']);
        $cin = htmlentities($_POST['cin']);
        $telephone = htmlentities($_POST['telephone']);
        $createdBy = $_SESSION['userMerlaTrav']->login();
        $created = date('Y-m-d h:i:s');
        //create object
        $employe = new Employe(array('nom' => $nom, 'adresse' => $adresse, 'nomArabe' => $nomArabe, 'adresseArabe' => $adresseArabe, 'cin' => $cin, 'telephone' => $telephone, 'created' => $created, 'createdBy' => $createdBy));
        //add it to db
        $employeManager->add($employe);
    }
}
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);
$employeManager = new EmployeManager($pdo);
//Action Add Processing Begin
if ($action == "add") {
    if (!empty($_POST['nom'])) {
        $nom = htmlentities($_POST['nom']);
        $adresse = htmlentities($_POST['adresse']);
        $nomArabe = htmlentities($_POST['nomArabe']);
        $adresseArabe = htmlentities($_POST['adresseArabe']);
        $cin = htmlentities($_POST['cin']);
        $telephone = htmlentities($_POST['telephone']);
        $createdBy = $_SESSION['userMerlaTrav']->login();
        $created = date('Y-m-d h:i:s');
        //create object
        $employe = new Employe(array('nom' => $nom, 'adresse' => $adresse, 'nomArabe' => $nomArabe, 'adresseArabe' => $adresseArabe, 'cin' => $cin, 'telephone' => $telephone, 'created' => $created, 'createdBy' => $createdBy));
        //add it to db
        $employeManager->add($employe);
    } 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
    $idProjet = 0;
    $projetManager = new ProjetManager($pdo);
    $contratEmployeManager = new ContratEmployeManager($pdo);
    $contratDetaislManager = new ContratDetailsManager($pdo);
    $employesManager = new EmployeManager($pdo);
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId()) {
        $idProjet = $_GET['idProjet'];
        $projet = $projetManager->getProjetById($idProjet);
        $contratEmployes = $contratEmployeManager->getContratEmployesByIdProjet($idProjet);
        $employes = $employesManager->getEmployes();
        //}
        ?>
<!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>
Exemplo n.º 6
0
//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") {
    //classes managers
    $employeManager = new EmployeManager($pdo);
    $paiementManager = new PaiementEmployeManager($pdo);
    //classes and attributes
    $idEmploye = $_GET['idEmploye'];
    $idProjet = $_GET['idProjet'];
    $employe = $employeManager->getEmployeById($idEmploye);
    $projet = $projetManager->getProjetById($idProjet);
    $paiements = $paiementManager->getPaiementsByIdProjetByIdEmploye($idProjet, $idEmploye);
    $totalPaiements = $paiementManager->getTotalPaiementsByIdProjetByIdEmployegetTotalPaiementsByIdProjetByIdEmploye($idProjet, $idEmploye);
    //property data
    $programme = $projet->nom();
    ob_start();
    ?>
<style type="text/css">
	h1{
		text-align: center;
Exemplo n.º 7
0
<?php

//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
$idEmploye = htmlentities($_POST['idEmploye']);
$employeManager = new EmployeManager($pdo);
$employe = $employeManager->getEmployeById($idEmploye);
$employeManager->delete($idEmploye);
//add history data to db
$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 employés", 'description' => "Suppression Employé : " . $employe->nom() . " - CIN : " . $employe->cin(), 'created' => $created, 'createdBy' => $createdBy));
//add it to db
$historyManager->add($history);
$_SESSION['employe-delete-success'] = "<strong>Opération valide : </strong>L'employé est supprimé avec succès.";
header('Location:../employes.php');
Exemplo n.º 8
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';
//classes loading end
session_start();
//post input processing
$idProjet = $_POST['idProjet'];
//classModel
$employe = "";
//classManager
$employeManager = new EmployeManager($pdo);
if (!empty($_POST['nom'])) {
    $id = htmlentities($_POST['idEmploye']);
    $nom = htmlentities($_POST['nom']);
    $cin = htmlentities($_POST['cin']);
    $adresse = htmlentities($_POST['adresse']);
    $telephone = htmlentities($_POST['telephone']);
    $employe = new Employe(array('id' => $id, 'nom' => $nom, 'cin' => $cin, 'adresse' => $adresse, 'telephone' => $telephone));
    $_SESSION['employe-update-success'] = "<strong>Opération Valide : </strong>Employé modifié avec succès.";
    $employeManager->update($employe);
    //add history data to db
    $historyManager = new HistoryManager($pdo);
    $employe = $employeManager->getEmployeById($id);
    $createdBy = $_SESSION['userMerlaTrav']->login();
    $created = date('Y-m-d h:i:s');
    $history = new History(array('action' => "Modification", 'target' => "Table des employés", 'description' => "Modification Employé : " . $employe->nom() . " - CIN : " . $employe->cin(), 'created' => $created, 'createdBy' => $createdBy));
Exemplo n.º 9
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';
//classes loading end
session_start();
//post input processing
$idProjet = $_POST['idProjet'];
//classModel
$employe = "";
//classManager
$employeManager = new EmployeManager($pdo);
$redirectLink = 'Location:../projet-employes.php?idProjet=' . $idProjet;
if (isset($_GET['source']) and $_GET['source'] == 100) {
    $redirectLink = 'Location:../employes.php';
}
if (!empty($_POST['nom'])) {
    $nom = htmlentities($_POST['nom']);
    if ($employeManager->exists($nom)) {
        $_SESSION['employe-add-error'] = "<strong>Erreur Création Employe : </strong>Un employe existe déjà avec ce nom : " . $nom . " .";
        header('Location:../projet-employes.php?idProjet=' . $idProjet);
        exit;
    } else {
        $cin = htmlentities($_POST['cin']);
        $adresse = htmlentities($_POST['adresse']);
        $telephone = htmlentities($_POST['telephone']);
        $created = date('Y-m-d');
Exemplo n.º 10
0
        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
        $idProjet = 0;
        $projetManager = new ProjetManager($pdo);
        $contratEmployeManager = new ContratEmployeManager($pdo);
        $contratDetaislManager = new ContratDetailsManager($pdo);
        $employesManager = new EmployeManager($pdo);
        $companyManager = new CompanyManager($pdo);
        ///
        $companies = $companyManager->getCompanys();
        if(isset($_GET['idProjet']) and ($_GET['idProjet'])>0 and $_GET['idProjet']<=$projetManager->getLastId()){
            $idProjet = $_GET['idProjet'];
            $projet = $projetManager->getProjetById($idProjet);
            $contratEmployes = $contratEmployeManager->getContratEmployesByIdProjet($idProjet);
            $employes = $employesManager->getEmployes();
            //} 
?>
<!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 -->