예제 #1
0
        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]-->
<!-- BEGIN HEAD -->
예제 #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';
//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;