67 lines
2.0 KiB
PHP
67 lines
2.0 KiB
PHP
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/College_temp.php';
|
|
|
|
class ControleurAjaxprestatairetm extends Controleur {
|
|
private $college_temp;
|
|
|
|
public function __construct() {
|
|
$this->college_temp = new College_temp();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
|
|
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
|
|
|
$college= $this->college_temp->getCollegepoliceId($idCollege);
|
|
|
|
$codeReseau = $college['codeReseau'];
|
|
|
|
$_SESSION['codeReseau'] = $codeReseau;
|
|
$_SESSION['idCollege'] = $idCollege;
|
|
|
|
//$prestatairereseaus = $this->college_temp->getPrestatairereseausoins($codeReseau);
|
|
|
|
$prestatairereseaus= $this->college_temp->getprestatairereseautm($idCollege);
|
|
|
|
$prestatairetms= $this->college_temp->getprestatairetm($codeReseau);
|
|
|
|
$this->genererVueAjax(array('college' => $college, 'prestatairereseaus' => $prestatairereseaus, 'prestatairetms' => $prestatairetms));
|
|
}
|
|
|
|
public function majtm()
|
|
{
|
|
$idPrestation = $this->requete->getParametreFormulaire("idPrestation");
|
|
$tm = $this->requete->getParametreFormulaire("tm");
|
|
$this->college_temp->majtmprestatairetm($idPrestation, $tm);
|
|
|
|
//$this->executerAction("index");
|
|
}
|
|
|
|
public function retirer()
|
|
{
|
|
$idPrestation = $this->requete->getParametreFormulaire("idPrestation");
|
|
$this->college_temp->retirerprestatairetm($idPrestation);
|
|
|
|
//$this->executerAction("index");
|
|
}
|
|
|
|
public function ajouterunprestatairetm()
|
|
{
|
|
$codePrestataire = $this->requete->getParametreFormulaire("codePrestataire");
|
|
$idCollege = $this->requete->getParametreFormulaire("idCollege");
|
|
|
|
$this->college_temp->ajouterunprestatairetm($codePrestataire, $idCollege);
|
|
|
|
//$this->executerAction("index");
|
|
}
|
|
|
|
public function initprestation()
|
|
{
|
|
$idCollegeTemp = $_SESSION['idCollegeTemp'];
|
|
$this->college_temp->initPrestationCollege($idCollegeTemp);
|
|
}
|
|
|
|
|
|
} |