1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
//PlacesController qui récupère les informations relatives au lieu via son ID
public function placedetailAction()
{
$this->view->title = "Details du lieu";
$this->view->headTitle($this->view->title, 'PREPEND');
$auth = Zend_Auth::getInstance();
$idUser = $auth->getIdentity()->ID_UTILISATEUR;
$idPlace = $_GET['idPlace'];
$place = new Model_DbTable_Places();
if($place->checkUserPlace($idUser,$idPlace)){
//Récupération de toutes les informations relatives au lieu
$rowPlace = $place->getPlaceById($idPlace);
$this->view->NOM_LIEU = $rowPlace->NOM_LIEU;
$this->view->PAYS_LIEU = $rowPlace->PAYS_LIEU;
$this->view->VILLE_LIEU = $rowPlace->VILLE_LIEU;
$this->view->CP_LIEU = $rowPlace->CP_LIEU;
$this->view->ADR_LIEU = $rowPlace->ADR_LIEU;
$this->view->TEL_LIEU = $rowPlace->TEL_LIEU;
$this->view->URLS_LIEU = $rowPlace->URLS_LIEU;
$this->view->DESC_LIEU = $rowPlace->DESC_LIEU;
$this->view->DATEA_LIEU = $rowPlace->DATEA_LIEU;
$this->view->IMAGE_LIEU = $rowPlace->IMAGE_LIEU;
$this->view->IMAGEMAXI_LIEU = $rowPlace->IMAGEMAXI_LIEU;
$this->view->LAT_LIEU = $rowPlace->LAT_LIEU;
$this->view->LONG_LIEU = $rowPlace->LONG_LIEU;
//change size of the static map
$staticMap = $rowPlace->STATICMAP_LIEU;
$staticMap = str_replace('size=530x300','size=560x300',$staticMap);
$this->view->STATICMAP_LIEU = $staticMap;
$this->view->ITINERARYMAP_LIEU = $rowPlace->ITINERARYMAP_LIEU;
$this->view->LINKGMAP_LIEU = $rowPlace->LINKGMAP_LIEU;
}
} |