Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 510 Rev 546
Line 81... Line 81...
81
		return $txt;
81
		return $txt;
82
	}
82
	}
Line 83... Line 83...
83
	
83
	
84
	protected function etreVide($valeur) {
84
	protected function etreVide($valeur) {
85
		$vide = false;
85
		$vide = false;
86
		if ($valeur == '' || $valeur == 'null' || $valeur == '0') {
86
		if ($valeur == '' || $valeur == 'null'|| $valeur == '000null' || $valeur == '0') {
87
			$vide = true;
87
			$vide = true;
88
		}
88
		}
89
		return $vide;
89
		return $vide;
Line -... Line 90...
-
 
90
	}
-
 
91
	
-
 
92
	protected function formaterDate($date_heure_mysql, $format = '%A %d %B %Y à %H:%M') {
-
 
93
		$date_formatee = '';
-
 
94
		if (!$this->etreVide($date_heure_mysql)) {
-
 
95
			$timestamp = $this->convertirDateHeureMysqlEnTimestamp($date_heure_mysql);
-
 
96
			$date_formatee = strftime($format, $timestamp);
-
 
97
		}
-
 
98
		return $date_formatee;
-
 
99
	}
-
 
100
 
-
 
101
	protected function convertirDateHeureMysqlEnTimestamp($date_heure_mysql){
-
 
102
       $val = explode(' ', $date_heure_mysql);
-
 
103
       $date = explode('-', $val[0]);
-
 
104
       $heure = explode(':', $val[1]);
-
 
105
       return mktime((int) $heure[0], (int) $heure[1], (int) $heure[2], (int) $date[1], (int) $date[2], (int) $date[0]);
90
	}
106
	}
91
	
107
	
Line 92... Line 108...
92
	//+----------------------------------------------------------------------------------------------------------------+
108
	//+----------------------------------------------------------------------------------------------------------------+
93
	// GESTION de l'ENVOIE au NAVIGATEUR
109
	// GESTION de l'ENVOIE au NAVIGATEUR