a
This commit is contained in:
parent
087448e840
commit
fc32db7625
|
|
@ -7,6 +7,7 @@ require_once 'Modele/Logconnexion.php';
|
|||
require_once 'Modele/Garantiesbaremepriseencharge.php';
|
||||
require_once 'Controleur/ControleurMoritio.php';
|
||||
require_once 'Modele/Societeusercentral.php';
|
||||
require_once 'Modele/Societeuser.php';
|
||||
|
||||
class ControleurConnexion extends Controleur
|
||||
{
|
||||
|
|
@ -16,8 +17,10 @@ class ControleurConnexion extends Controleur
|
|||
|
||||
private $garantie;
|
||||
private $societeusercentral;
|
||||
private $societeuser;
|
||||
|
||||
private $menuvue;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->utilisateur = new Utilisateur();
|
||||
|
|
@ -27,6 +30,7 @@ class ControleurConnexion extends Controleur
|
|||
$this->garantie = new Garantiesbaremepriseencharge();
|
||||
|
||||
$this->societeusercentral = new Societeusercentral();
|
||||
$this->societeuser = new Societeuser();
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
|
@ -738,6 +742,8 @@ class ControleurConnexion extends Controleur
|
|||
$_SESSION['crypterPhoto']="0";
|
||||
}
|
||||
|
||||
$afficherLogo = $this->societeuser->get_afficher_logo();
|
||||
$this->requete->getSession()->setAttribut("p_afficherLogo", $afficherLogo);
|
||||
|
||||
if(($motCourt===true) or ($changerMotPassDefaut===true) or ($passExpired===true))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ require_once 'Modele/Menuvueutilisateur.php';
|
|||
require_once 'Modele/Logconnexion.php';
|
||||
require_once 'Modele/Garantiesbaremepriseencharge.php';
|
||||
require_once 'Modele/Societeusercentral.php';
|
||||
require_once 'Modele/Societeuser.php';
|
||||
|
||||
class ControleurConnexiondecompte extends Controleur
|
||||
{
|
||||
|
|
@ -14,8 +15,10 @@ require_once 'Modele/Societeusercentral.php';
|
|||
private $logconnexion;
|
||||
private $garantie;
|
||||
private $societeusercentral;
|
||||
private $societeuser;
|
||||
|
||||
private $menuvue;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->utilisateur = new Utilisateur();
|
||||
|
|
@ -25,6 +28,7 @@ require_once 'Modele/Societeusercentral.php';
|
|||
// date_default_timezone_set("Africa/Kigali");
|
||||
$this->garantie = new Garantiesbaremepriseencharge();
|
||||
$this->societeusercentral = new Societeusercentral();
|
||||
$this->societeuser = new Societeuser();
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
|
@ -522,6 +526,8 @@ require_once 'Modele/Societeusercentral.php';
|
|||
$_SESSION['crypterPhoto']="0";
|
||||
}
|
||||
|
||||
$afficherLogo = $this->societeuser->get_afficher_logo();
|
||||
$this->requete->getSession()->setAttribut("p_afficherLogo", $afficherLogo);
|
||||
|
||||
switch ($codeProfil)
|
||||
{
|
||||
|
|
|
|||
81
Modele/Societeuser.php
Executable file
81
Modele/Societeuser.php
Executable file
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
require_once 'Framework/Modele.php';
|
||||
|
||||
class Societeuser extends Modele {
|
||||
|
||||
public function getSocieteuser($codeSociete)
|
||||
{
|
||||
$sql = 'select A.codeSociete, A.nomSociete, A.adresseGeoSociete, A.adressePostSociete,
|
||||
A.ville, A.telephoneSociete, A.emailSociete, A.faxSociete, A.codePays,
|
||||
medecinConseil, emailMedecinConseil, telephoneMedecinConseil,
|
||||
emailAdministrateurSysteme, telephone_administrateur_systeme, sigleSociete, A.registreCommerce
|
||||
from societeuser A
|
||||
left join pays B on (B.codeSociete=A.codeSociete) and (B.codePays=A.codePays)
|
||||
where (A.codeSociete=?)';
|
||||
|
||||
$societe = $this->executerRequete($sql, array($codeSociete));
|
||||
return $societe->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getinfossassureurs($codeSociete)
|
||||
{
|
||||
$sql = 'select A.* from contactsassureur A where (A.codeSociete=?) order by A.ordre, A.nom, A.prenoms;';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($codeSociete));
|
||||
|
||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function get_nbTentativeConnexion()
|
||||
{
|
||||
$sql = 'SELECT nbTentativeConnexion FROM societeuser LIMIT 1;';
|
||||
|
||||
$resultat = $this->executerRequete($sql);
|
||||
|
||||
$ligne = $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
$nbTentativeConnexionMax = $ligne['nbTentativeConnexion'];
|
||||
|
||||
$_SESSION['nbTentativeConnexionMax'] = $nbTentativeConnexionMax;
|
||||
|
||||
return $nbTentativeConnexionMax;
|
||||
}
|
||||
|
||||
public function get_reclamation_prestataire_obligatoire()
|
||||
{
|
||||
$codeSociete = $_SESSION['p_codeSociete'];
|
||||
|
||||
$sql = 'select fn_reclamation_prestataire_obligatoire(?) as reclamationPrestataireObligatoire;';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($codeSociete));
|
||||
$ligne = $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
return $ligne['reclamationPrestataireObligatoire'];
|
||||
}
|
||||
|
||||
public function get_demandedecompte_prestataire()
|
||||
{
|
||||
$codeSociete = $_SESSION['p_codeSociete'];
|
||||
|
||||
$sql = 'select fn_demande_decompte_prestataire(?) as demandedecomptePrestataire;';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($codeSociete));
|
||||
$ligne = $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
return $ligne['demandedecomptePrestataire'];
|
||||
}
|
||||
|
||||
public function get_afficher_logo()
|
||||
{
|
||||
$sql = 'SELECT afficherLogo FROM societeuser LIMIT 1;';
|
||||
|
||||
$resultat = $this->executerRequete($sql);
|
||||
|
||||
$ligne = $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
$afficherLogo = $ligne['afficherLogo'];
|
||||
|
||||
$_SESSION['p_afficherLogo'] = $afficherLogo;
|
||||
|
||||
return $afficherLogo;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,28 +1,21 @@
|
|||
<?php
|
||||
require_once 'gabarit_queries.php';
|
||||
$gabary = new Gabary();
|
||||
$_SESSION['firstLevelMenu']='';
|
||||
$current_url = $_SERVER['REQUEST_URI'];
|
||||
$elements = explode("/", $current_url);
|
||||
$activeLink = $elements[1];
|
||||
|
||||
$_SESSION['firstLevelMenu']=$activeLink;
|
||||
|
||||
const MAX_COMPANY_NAME_LENGTH = 20;
|
||||
require_once 'gabarit_queries.php';
|
||||
$gabary = new Gabary();
|
||||
$_SESSION['firstLevelMenu']='';
|
||||
$current_url = $_SERVER['REQUEST_URI'];
|
||||
$elements = explode("/", $current_url);
|
||||
$activeLink = $elements[1];
|
||||
|
||||
$_SESSION['firstLevelMenu']=$activeLink;
|
||||
|
||||
const MAX_COMPANY_NAME_LENGTH = 20;
|
||||
|
||||
/*
|
||||
if (strlen($_SESSION['p_nomSociete']) <= MAX_COMPANY_NAME_LENGTH) {
|
||||
$companyDisplayName = htmlspecialchars($_SESSION['p_nomSociete'], ENT_QUOTES);
|
||||
} else {
|
||||
$companyDisplayName = strtoupper($_SESSION['p_codeSociete']);
|
||||
}
|
||||
*/
|
||||
$companyDisplayName = htmlspecialchars($_SESSION['p_nomSociete'], ENT_QUOTES);
|
||||
|
||||
$imgData = $_SESSION['p_photoAssureCrypte'];
|
||||
|
||||
$token = Csrf::generateToken();
|
||||
$_SESSION['csrf_token_submieted'] = $token;
|
||||
$imgData = $_SESSION['p_photoAssureCrypte'];
|
||||
|
||||
$token = Csrf::generateToken();
|
||||
$_SESSION['csrf_token_submieted'] = $token;
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
|
|
@ -451,12 +444,12 @@
|
|||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<a class="logo d-flex align-items-center">
|
||||
|
||||
<img src="Bootstrap_new/images/new/favicon.png" alt="Logo Inter santé"/>
|
||||
<span class="d-none d-lg-block">INTER SANTE</span>
|
||||
</a>
|
||||
<i class="bi bi-list toggle-sidebar-btn"></i>
|
||||
</div><!-- End Logo -->
|
||||
</div>
|
||||
|
||||
<nav class="header-nav ms-auto">
|
||||
<ul class="d-flex align-items-center">
|
||||
|
||||
|
|
@ -475,17 +468,17 @@
|
|||
|
||||
|
||||
<li class="nav-item">
|
||||
<a title="<?= _("Gestionnaire d'assurance santé");?>"
|
||||
style="margin-left:10px; margin-right:10px;"
|
||||
class="nav-link nav-icon d-flex align-items-center"
|
||||
href="javascript:alert_ebene('<?=$_SESSION['p_nomSociete']?>','<?=$_SESSION['p_nomSociete']?>');">
|
||||
<a
|
||||
title="<?= _("Gestionnaire d'assurance santé");?>"
|
||||
style="margin-left:10px; margin-right:10px;"
|
||||
class="nav-link nav-icon d-flex align-items-center"
|
||||
href="javascript:alert_ebene('<?=$_SESSION['p_nomSociete']?>','<?=$_SESSION['p_nomSociete']?>');">
|
||||
|
||||
<img src="<?= $_SESSION['p_lienLogo'] ?>"
|
||||
alt="Profile"
|
||||
style="max-height:40px;"
|
||||
<span class="text-truncate d-inline-block" style="max-width:300px;">
|
||||
<?=$companyDisplayName?>
|
||||
</span>
|
||||
<?php if ($afficherLogo=="1"): ?>
|
||||
<img src="<?= $_SESSION['p_lienLogo'] ?>" alt="Profile" style="max-height:40px;">
|
||||
<?php endif; ?>
|
||||
|
||||
<span > <?=$companyDisplayName?> </span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
|
@ -651,14 +644,13 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
/*
|
||||
var_dump(
|
||||
array(
|
||||
"crypterPhoto" => $_SESSION['crypterPhoto'],
|
||||
"afficherLogo" => $_SESSION['p_afficherLogo'],
|
||||
)
|
||||
);
|
||||
*/
|
||||
?>
|
||||
|
||||
</div>
|
||||
<?= $contenu ?>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user