81 lines
2.5 KiB
PHP
Executable File
81 lines
2.5 KiB
PHP
Executable File
<?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;
|
|
}
|
|
|
|
} |