Subversion Repositories eFlore/Applications.cel

Rev

Rev 537 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 537 Rev 875
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
// ATTENTION ! Classe compatible uniquement avec nouveau format de bdd du cel //
-
 
3
 
2
/**
4
/**
3
* PHP Version 5
5
* PHP Version 5
4
*
6
*
5
* @category  PHP
7
* @category  PHP
6
* @package   jrest
8
* @package   jrest
Line 27... Line 29...
27
			}
29
			}
28
		}
30
		}
29
	}
31
	}
Line 30... Line 32...
30
 
32
 
-
 
33
	private function reparerDatesImages() {
-
 
34
		
-
 
35
		// TODO : effectuer une réexctraction de la date grâce au metadonnées
31
	private function reparerDatesImages() {
36
		// pas urgent
32
		$query = 'UPDATE cel_images SET ci_meta_date = ci_meta_date_time ';
37
		/*$query = 'UPDATE cel_images SET date_prise_de_vue = ci_meta_date_time ';
Line 33... Line 38...
33
				'WHERE ci_meta_date IS NULL AND ci_meta_date_time IS NOT NULL' ;
38
				'WHERE ci_meta_date IS NULL AND ci_meta_date_time IS NOT NULL' ;
34
 
39
 
Line 40... Line 45...
40
        	die($res->getMessage());
45
        	die($res->getMessage());
41
        }
46
        }
Line 42... Line 47...
42
 
47
 
43
		header('content-type: text/html charset=utf-8');
48
		header('content-type: text/html charset=utf-8');
44
		print "Réparation des dates effectuées";
49
		print "Réparation des dates effectuées";
45
		exit() ;
50
		exit() ;*/
Line 46... Line 51...
46
	}
51
	}
47
	
52
	
48
	private function suppressionFichiersImagesOrphelins() {
53
	private function suppressionFichiersImagesOrphelins() {
Line 165... Line 170...
165
		$id_image = str_replace('_', '', $nom_fichier_sans_extension);
170
		$id_image = str_replace('_', '', $nom_fichier_sans_extension);
Line 166... Line 171...
166
		
171
		
167
		// suppression des 0 devant
172
		// suppression des 0 devant
Line 168... Line 173...
168
		$id_image += 0;
173
		$id_image += 0;
169
		
174
		
Line 170... Line 175...
170
		$requete_id_image_existe = 'SELECT COUNT(ci_id_image) as image_existe FROM cel_images WHERE ci_id_image = '.$id_image;
175
		$requete_id_image_existe = 'SELECT COUNT(id_image) as image_existe FROM cel_images WHERE id_image = '.$id_image;
171
		$image_existe = $this->executerRequete($requete_id_image_existe);
176
		$image_existe = $this->executerRequete($requete_id_image_existe);
172
		
177