Example #1
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") {
    $idProjet = 0;
    $idSociete = 0;
    $projetManager = new ProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $clientManager = new ClientManager($pdo);
    if (isset($_GET['idProjet']) and $_GET['idProjet'] > 0 and $_GET['idProjet'] <= $projetManager->getLastId()) {
        $idProjet = $_GET['idProjet'];
        $projet = $projetManager->getProjetById($idProjet);
        $idSociete = $_GET['idSociete'];
        $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>
	<meta charset="utf-8" />
Example #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
    $projetsManager = new ProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $societes = $societeManager->getSocietes();
    $projets = $projetsManager->getProjets();
    $projetNumber = $projetsManager->getProjetsNumber();
    /*$projetPerPage = 5;
            $pageNumber = ceil($projetNumber/$projetPerPage);
            $p = 1;
            if(isset($_GET['p']) and ($_GET['p']>0 and $_GET['p']<=$pageNumber)){
                $p = $_GET['p'];
            }
            else{
                $p = 1;
            }
            $begin = ($p - 1) * $projetPerPage;
            $projets = $projetsManager->getProjetsByLimits($begin, $projetPerPage);
            $pagination = paginate('projets.php', '?p=', $pageNumber, $p);
Example #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';
//classes loading end
session_start();
if (isset($_SESSION['userMerlaTrav'])) {
    //classes managers
    $usersManager = new UserManager($pdo);
    $mailManager = new MailManager($pdo);
    $todoManager = new TodoProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $projetManager = new ProjetManager($pdo);
    //classes and vars
    //users number
    $users = $usersManager->getUsers();
    //$mails = $mailManager->getMails();
    $projets = $projetManager->getProjets();
    $todos = 0;
    $societes = $societeManager->getSocietes();
    if (isset($_POST['idSociete'])) {
        $idSociete = htmlentities($_POST['idSociete']);
        $mois = htmlentities($_POST['mois']);
        $annee = htmlentities($_POST['annee']);
        $todos = $todoManager->getTodosHiddenByIdSociete($idSociete, $mois, $annee);
    } else {
        if (isset($_GET['idSociete']) and isset($_GET['mois']) and isset($_GET['annee'])) {
Example #4
0
        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
    $idProjet = $_GET['idProjet'];
    $idSociete = $_GET['idSociete'];
    $type = $_GET['type'];
    $projetManager = new ProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $contratManager = new ContratManager($pdo);
    $operationManager = new OperationManager($pdo);
    $appartementManager = new AppartementManager($pdo);
    $locauxManager = new LocauxManager($pdo);
    $terrainsManager = new TerrainManager($pdo);
    $maisonsManager = new MaisonManager($pdo);
    $contratNumber = $contratManager->getContratsNumberByIdProjet($idProjet);
    $contrats = $contratManager->getContratsByIdProjetOnly($idProjet);
    ob_start();
    ?>
<style type="text/css">
    p, h1, h3{
        text-align: center;
        text-decoration: underline;
    }
Example #5
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'])) {
    //les sources
    $projetsManager = new ProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $societes = $societeManager->getSocietes();
    if (isset($_GET['idSociete']) and ($_GET['idSociete'] >= 1 and $_GET['idSociete'] <= $societeManager->getLastId())) {
        $idSociete = $_GET['idSociete'];
        $idProjet = $_GET['idProjet'];
        $projet = $projetsManager->getProjetById($idProjet);
        $projetNumber = $projetsManager->getProjetsNumberByIdSociete($idSociete);
        $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>
Example #6
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
if (!empty($_POST['raisonSociale'])) {
    $raisonSociale = htmlentities($_POST['raisonSociale']);
    $dateCreation = htmlentities($_POST['dateCreation']);
    $createdBy = $_SESSION['userMerlaTrav']->login();
    $created = date('d/m/y');
    $societe = new Societe(array('raisonSociale' => $raisonSociale, 'dateCreation' => $dateCreation, 'createdBy' => $createdBy, 'created' => $created));
    $societeManager = new SocieteManager($pdo);
    $societeManager->add($societe);
    //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' => "Ajout", 'target' => "Table des sociétés", 'description' => "Ajout Société : Raison Sociale " . $raisonSociale, 'created' => $created, 'createdBy' => $createdBy));
    //add it to db
    $historyManager->add($history);
    $_SESSION['company-add-success'] = "<strong>Opération valide : </strong>La société est ajoutée avec succès.";
} else {
    $_SESSION['company-add-error'] = "<strong>Erreur Ajout Entrées : </strong>Vous devez remplir au moins le champ <Raison Sociale>.";
}
header('Location:../companies-group.php');
Example #7
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();
if (isset($_SESSION['userMerlaTrav'])) {
    //classes managers
    $usersManager = new UserManager($pdo);
    $mailManager = new MailManager($pdo);
    $todoManager = new TodoProjetManager($pdo);
    $societeManager = new SocieteManager($pdo);
    $projetManager = new ProjetManager($pdo);
    //classes and vars
    //users number
    $users = $usersManager->getUsers();
    //$mails = $mailManager->getMails();
    $idProjet = $_GET['idProjet'];
    $idSociete = $_GET['idSociete'];
    $projet = $projetManager->getProjetById($idProjet);
    $societe = $societeManager->getSocieteById($projet->idSociete());
    $todos = $todoManager->getTodos();
    ?>
<!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]-->
Example #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
$idSociete = $_POST['idSociete'];
if (!empty($_POST['raisonSociale'])) {
    $raisonSociale = htmlentities($_POST['raisonSociale']);
    $dateCreation = htmlentities($_POST['dateCreation']);
    $societe = new Societe(array('id' => $idSociete, 'raisonSociale' => $raisonSociale, 'dateCreation' => $dateCreation));
    $societeManager = new SocieteManager($pdo);
    $societeManager->update($societe);
    //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' => "Modification", 'target' => "Table des sociétés", 'description' => "Modification Société : Raison Sociale " . $raisonSociale, 'created' => $created, 'createdBy' => $createdBy));
    //add it to db
    $historyManager->add($history);
    $_SESSION['company-update-success'] = "<strong>Opération valide : </strong>La société est modifiée avec succès.";
} else {
    $_SESSION['company-update-error'] = "<strong>Erreur Modification Sorties : </strong>Vous devez remplir au moins le champ 'Raison Sociale'.";
}
header('Location:../company.php?idSociete=' . $idSociete);
Example #9
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'])) {
    //les sources
    $societesManager = new SocieteManager($pdo);
    $societes = $societesManager->getSocietes();
    $societeNumber = $societesManager->getSocietesNumber();
    ?>
<!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>GELM - Management Application</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
    <meta content="" name="description" />
    <meta content="" name="author" />
    <link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
Example #10
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'])) {
    //les sources
    $societesManager = new SocieteManager($pdo);
    $societePerPage = 5;
    $societeNumber = $societesManager->getSocietesNumber();
    $pageNumber = ceil($societeNumber / $societePerPage);
    $p = 1;
    if (isset($_GET['p']) and ($_GET['p'] > 0 and $_GET['p'] <= $pageNumber)) {
        $p = $_GET['p'];
    } else {
        $p = 1;
    }
    $begin = ($p - 1) * $societePerPage;
    $societes = $societesManager->getSocietesByLimits($begin, $societePerPage);
    $pagination = paginate('companies.php', '?p=', $pageNumber, $p);
    ?>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
Example #11
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") {
    //classManagers
    $societeManager = new SocieteManager($pdo);
    if (isset($_GET['idSociete']) and ($_GET['idSociete'] >= 1 and $_GET['idSociete'] <= $societeManager->getLastId())) {
        $idSociete = $_GET['idSociete'];
        $projetManager = new ProjetManager($pdo);
        $projets = $projetManager->getProjets();
        $projetManager = new projetManager($pdo);
        $projetNumber = $projetManager->getProjetsNumber();
        if ($projetNumber != 0) {
            $projetPerPage = 10;
            $pageNumber = ceil($projetNumber / $projetPerPage);
            $p = 1;
            if (isset($_GET['p']) and ($_GET['p'] > 0 and $_GET['p'] <= $pageNumber)) {
                $p = $_GET['p'];
            } else {
                $p = 1;
            }
Example #12
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'])) {
    //les sources
    $idSociete = 0;
    $societeManager = new SocieteManager($pdo);
    if (isset($_GET['idSociete']) and $_GET['idSociete'] > 0 and $_GET['idSociete'] <= $societeManager->getLastId()) {
        $idSociete = $_GET['idSociete'];
        $societe = $societeManager->getSocieteById($idSociete);
        $piecesSocieteManager = new PiecesSocieteManager($pdo);
        $piecesSociete = $piecesSocieteManager->getPiecesSocietesByIdSociete($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>
	<meta charset="utf-8" />
	<title>GELM - Management Application</title>