Files
Ecurie_Web/les_ecuries_de_la_boissiere/autre/controller/controller.class.php
Christian Cunat-Brulé 29ef88376e Première MAJ
Nottoyage code PHP,
Relocalisation des repertoires,
MVC amélioré sans PHP
Modification des liens JQuery, Bootstrap
2018-07-28 18:55:49 +02:00

80 lines
2.2 KiB
PHP

<?php
include("model/model.class.php");
class Controller {
private $unModel;
public function __construct($host, $bdd, $user, $mdp) {
$this->unModel = new Model($host, $bdd, $user, $mdp);
}
public function selectAll($table) {
$this->unModel->renseigner($table);
return $this->unModel->selectAll();
}
public function selectAllDistinct($table) {
$this->unModel->renseigner($table);
return $this->unModel->selectAllDistinct();
}
public function selectAllCount($table) {
$this->unModel->renseigner($table);
return $this->unModel->selectAllCount();
}
public function selectAllWhere($table, $where) {
$this->unModel->renseigner($table);
return $this->unModel->selectAllWhere($where);
}
public function selectAllWhereDistinct($tab, $table, $where) {
$this->unModel->renseigner($table);
return $this->unModel->selectAllWhereDistinct($tab, $where);
}
public function selectLastOffer($table, $limit){
$this->unModel->renseigner($table);
return $this->unModel->selectLastOffer($limit);
}
public function selectAllWithFK($table, $tab, $where) {
$this->unModel->renseigner($table);
return $this->unModel->selectAllWithFK($tab, $where);
}
public function selectChamps($table, $tab) {
$this->unModel->renseigner($table);
return $this->unModel->selectChamps($tab);
}
public function selectWhere($table, $tab, $where) {
$this->unModel->renseigner($table);
return $this->unModel->selectWhere($tab, $where);
}
public function insert($table, $values) {
$this->unModel->renseigner($table);
$this->unModel->insert($values);
}
public function update($table, $values, $where) {
$this->unModel->renseigner($table);
$this->unModel->update($values,$where);
}
public function inscription($table, $valuesU, $valuesP) {
$this->unModel->renseigner($table);
$this->unModel->inscription($valuesU, $valuesP);
}
public function connexion($table, $tab, $where) {
$this->unModel->renseigner($table);
$this->unModel->connexion($tab, $where);
}
}
?>