Initial commit for newdesigngestionnaire project
This commit is contained in:
91
Modele/Autrestablesreference.php
Executable file
91
Modele/Autrestablesreference.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
require_once 'Framework/Modele.php';
|
||||
|
||||
class Autrestablesreference extends Modele {
|
||||
|
||||
public function getlisteautrestablesreference()
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT id as code, libelleEng As libelle, tableName, fichierLlister,
|
||||
fichierAjouter, fichierModifier
|
||||
FROM autrestablesreference Where numeroTable=1 AND actif = "1"
|
||||
ORDER BY 2';
|
||||
}else{
|
||||
$sql = 'SELECT id as code, libelle, tableName, fichierLlister,
|
||||
fichierAjouter, fichierModifier
|
||||
FROM autrestablesreference Where numeroTable=1 AND actif = "1"
|
||||
ORDER BY 2';
|
||||
}
|
||||
$resultat = $this->executerRequete($sql);
|
||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getlisteautrestablesreferenceTable($numeroTable)
|
||||
{
|
||||
if (est_anglophone())
|
||||
{
|
||||
$sql = 'SELECT id as code, libelleEng As libelle, tableName, fichierLlister,
|
||||
fichierAjouter, fichierModifier
|
||||
FROM autrestablesreference WHERE numeroTable=? AND actif = "1"
|
||||
ORDER BY 2';
|
||||
}else{
|
||||
$sql = 'SELECT id as code, libelle, tableName, fichierLlister,
|
||||
fichierAjouter, fichierModifier
|
||||
FROM autrestablesreference WHERE numeroTable=? AND actif = "1"
|
||||
ORDER BY 2';
|
||||
}
|
||||
$resultat = $this->executerRequete($sql,array($numeroTable));
|
||||
return $resultat->fetchAll(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
|
||||
public function getfichierLister($id)
|
||||
{
|
||||
$sql = 'SELECT fichierLlister FROM autrestablesreference
|
||||
WHERE (id=?)';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($id));
|
||||
return $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getfichierId($fichier)
|
||||
{
|
||||
$sql = 'SELECT id FROM autrestablesreference
|
||||
WHERE (fichierLlister=?)';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($fichier));
|
||||
return $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getfichierAjouter($id)
|
||||
{
|
||||
$sql = 'SELECT fichierAjouter FROM autrestablesreference
|
||||
WHERE (id=?)';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($id));
|
||||
return $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getfichierModifier($id)
|
||||
{
|
||||
$sql = 'SELECT fichierModifier FROM autrestablesreference
|
||||
WHERE (id=?)';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($id));
|
||||
return $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
public function getfichiers($id)
|
||||
{
|
||||
$sql = 'SELECT * FROM autrestablesreference
|
||||
WHERE (id=?)';
|
||||
|
||||
$resultat = $this->executerRequete($sql, array($id));
|
||||
return $resultat->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user