Subversion Repositories eFlore/Applications.del

Rev

Rev 2224 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2224 Rev 2225
Line 98... Line 98...
98
	--------------------------------------------------------------------------------*/
98
	--------------------------------------------------------------------------------*/
Line 99... Line 99...
99
 
99
 
100
	private function getIdsObsImg() {
100
	private function getIdsObsImg() {
101
        $date_debut = date('Y-m-d H:i:s', $this->parametres['date.debut']);
101
        $date_debut = date('Y-m-d H:i:s', $this->parametres['date.debut']);
102
        $date_fin = date('Y-m-d H:i:s', $this->parametres['date.fin']);
102
        $date_fin = date('Y-m-d H:i:s', $this->parametres['date.fin']);
103
		$limite = @min(intval($this->parametres['navigation.limite']), 1000);
-
 
104
		$limite = $limite ?: 100; // 0 => 10
103
        $limite = isset($this->parametres['navigation.limite']) ? intval($this->parametres['navigation.limite']) : 10;
105
		$depart = intval(@$this->parametres['navigation.depart']);
104
		$depart = intval(@$this->parametres['navigation.depart']);
106
		$ordre = $this->parametres['ordre'];
-
 
107
 
105
		$ordre = $this->parametres['ordre'];
108
        $date_debut = "'{$date_debut}'";
106
        $date_debut = "'{$date_debut}'";
Line 109... Line 107...
109
        $date_fin = "'{$date_fin}'";
107
        $date_fin = "'{$date_fin}'";
110
 
108
 
Line 126... Line 124...
126
			'		ON (id_image = it.ce_image AND it.actif = 1) '.
124
			'		ON (id_image = it.ce_image AND it.actif = 1) '.
127
			'	LEFT JOIN del_commentaire AS c '.
125
			'	LEFT JOIN del_commentaire AS c '.
128
			'		ON (p.id_observation = c.ce_observation) '.
126
			'		ON (p.id_observation = c.ce_observation) '.
129
			'	LEFT JOIN del_commentaire_vote AS cv '.
127
			'	LEFT JOIN del_commentaire_vote AS cv '.
130
			'		ON (c.id_commentaire = cv.ce_proposition) '.
128
			'		ON (c.id_commentaire = cv.ce_proposition) '.
131
			'GROUP BY id_image, p.id_observation '.
129
			'GROUP BY p.id_image, p.id_observation '.
132
			'ORDER BY modif_date ' . $ordre . ' '.
130
			'ORDER BY modif_date ' . $ordre . ' '.
133
			'LIMIT '.$depart.', '.$limite.
131
			'LIMIT '.$depart.', '.$limite.
134
			' -- '.__FILE__.':'.__LINE__;
132
			' -- '.__FILE__.':'.__LINE__;
135
 
-
 
136
		return $this->bdd->recupererTous($requete);
133
		return $this->bdd->recupererTous($requete);
137
        // On récupère id_obs, id_image, votes, tags, modif_date
134
        // On récupère id_obs, id_image, votes, tags, modif_date
138
	}
135
	}
Line 139... Line 136...
139
 
136
 
Line 224... Line 221...
224
			$obs[$idobs]['longitude'] = $imgdata['longitude'];
221
			$obs[$idobs]['longitude'] = $imgdata['longitude'];
Line 225... Line 222...
225
 
222
 
226
			if (!isset($obs[$idobs]['images'])) {
223
			if (!isset($obs[$idobs]['images'])) {
227
				$obs[$idobs]['images'] = array();
224
				$obs[$idobs]['images'] = array();
228
			}
-
 
-
 
225
			}
229
//print_r($ids);
226
 
230
			$img_obj = array(
227
			$img_obj = array(
231
				'id_image' => $idimg,
228
				'id_image' => $idimg,
232
				'nom_image' => $imgdata['nom_image'],
229
				'nom_image' => $imgdata['nom_image'],
233
                'image_updated' => $imgdata['image_updated'],
230
                'image_updated' => $imgdata['image_updated'],