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 = "الشقة";
        } else {
            if ($contrat->unite() == "unite") {
                $unite = $contrat->nomUniteArabe();
            }
        }
예제 #2
0
											<th style="width:20%" class="hidden-phone">Total Paiement</th>
											<th style="width:20%" class="hidden-phone">Numéro chèque</th>
										</tr>
									</thead>
									<tbody>
										<?php 
        if ($paiementNumber != 0) {
            foreach ($paiements as $contrat) {
                ?>
		
										<tr class="clients">
											<td>
												<div class="btn-group">
												    <a style="width: 200px" class="btn mini dropdown-toggle" href="#" data-toggle="dropdown">
												    	<?php 
                echo $employeManager->getEmployeById($contrat->idEmploye())->nom();
                ?>
 
												        <i class="icon-angle-down"></i>
												    </a>
												    <ul class="dropdown-menu">
												        <li>
												        	<a target="_blank" href="controller/PaiementEmployePrintController.php?idContrat=<?php 
                echo $contrat->id();
                ?>
">
												        		Imprimer Contrat
												        	</a>
															<a href="#updatePaiement<?php 
                echo $contrat->id();
                ?>
예제 #3
0
    } 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;
		text-decoration: underline;
	}
	table
	{
		width: 100%;	
            $employe = new Employe(array('id' => $idEmploye, 'nom' => $nom, 'adresse' => $adresse, 'nomArabe' => $nomArabe, 'adresseArabe' => $adresseArabe, 'cin' => $cin, 'telephone' => $telephone, 'updated' => $updated, 'updatedBy' => $updatedBy));
            $employeManager->update($employe);
            //add history data to db
            $history = new History(array('action' => "Modification", 'target' => "Table des employés", 'description' => "Modification de l'employé : " . $nom, 'created' => $updated, 'createdBy' => $updatedBy));
            //add it to db
            $historyManager->add($history);
            $actionMessage = "Opération Valide : Employe Modifié(e) avec succès.";
            $typeMessage = "success";
        } else {
            $actionMessage = "Erreur Modification Employe : Vous devez remplir le champ 'nom'.";
            $typeMessage = "error";
        }
    } else {
        if ($action == "delete") {
            $idEmploye = htmlentities($_POST['idEmploye']);
            $nomEmploye = $employeManager->getEmployeById($idEmploye)->nom();
            $employeManager->delete($idEmploye);
            //add history data to db
            $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 de l'employé : " . $nomEmploye, 'created' => $created, 'createdBy' => $createdBy));
            //add it to db
            $historyManager->add($history);
            $actionMessage = "Opération Valide : Employe supprimé(e) avec succès.";
            $typeMessage = "success";
        }
    }
}
//Action Delete Processing End
$_SESSION['employe-action-message'] = $actionMessage;
$_SESSION['employe-type-message'] = $typeMessage;
예제 #5
0
             <i class="icon-refresh"></i>
         </a>
         <?php
         }
         ?>
         <a class="btn mini" href="contrat-employe-detail.php?idContratEmploye=<?= $contrat->id() ?>&idProjet=<?= $projet->id() ?>">
             <i class="icon-eye-open"></i>
         </a>
         <a class="btn mini blue" href="controller/ContratEmployeArabePrintController.php?idContratEmploye=<?= $contrat->id() ?>" >
             <i class="icon-file"></i>
         </a>
         <!--a class="btn mini blue" href="#printContratEmployeArabe<?= $contrat->id() ?>" data-toggle="modal" data-id="<?= $contrat->id() ?>" >
             <i class="icon-file"></i>
         </a-->
     </td>
     <td><?= $employesManager->getEmployeById($contrat->employe())->nom() ?></td> 
     <td><?= date('d/m/Y', strtotime($contrat->dateContrat()) ) ?> - <?= date('d/m/Y', strtotime($contrat->dateFinContrat()) ) ?></td>
     <td>
         <?= number_format($contrat->prixUnitaire(), 2, ',', ' ') ?>&nbsp;/&nbsp;<?= $contrat->unite() ?>&nbsp;/&nbsp;<?= $contrat->nomUnite() ?><br/>
         <?= number_format($contrat->prixUnitaire2(), 2, ',', ' ') ?>&nbsp;/&nbsp;<?= $contrat->unite2() ?>&nbsp;/&nbsp;<?= $contrat->nomUnite2() ?>
     </td>
     <td>
         <?= $contrat->nombreUnites() ?><br/>
         <?= $contrat->nombreUnites2() ?>
     </td>
     <td><?= number_format($contratDetaislManager->getContratDetailsTotalByIdContratEmploye($contrat->id()), 2, ',', ' ') ?></td>
     <td><?= number_format($contrat->total(), 2, ',', ' ') ?></td>
     <td><?= number_format($contrat->total()-$contratDetaislManager->getContratDetailsTotalByIdContratEmploye($contrat->id()), 2, ',', ' ') ?></td>       
 </tr>      
 <!-- printContratArabe box begin-->
 <div id="printContratEmployeArabe<?= $contrat->id() ?>" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="login" aria-hidden="false" >