Initial commit for radiantrh project
This commit is contained in:
44
Modele/Societeuser.php
Executable file
44
Modele/Societeuser.php
Executable file
@@ -0,0 +1,44 @@
|
||||
<?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();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user