* replace strftime() by datefmt_create() and datefmt_format() (formats:https://unicode-org.github.io/icu/userguide/format_parse/datetime/) * postpone due to issue with git output locale in docker container
		
			
				
	
	
		
			67 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
|   $this_file = basename($_SERVER["SCRIPT_FILENAME"]); //contient le nom de ce fichier (lui-même)
 | |
| 
 | |
|   /*
 | |
|   Petit script pour afficher la dernière date de modification (toute page confondue) sur la page d'accueil (index.php)
 | |
|   */
 | |
|   $mtime_max = exec('git log -1 --pretty="format:%ct" '.$this_file); //récupération de la date de modification de ce fichier et institution comme maximum
 | |
|   $last_rev = exec('git log -1 --pretty=format:"%H" '.$this_file); //récupération du hash du commit associé
 | |
| 
 | |
|   foreach (glob("*.php") as $filename) {  //récupération de la liste de tous les fichiers .php du répertoire courant (les pages en somme)
 | |
|     $mtime = exec('git log -1 --pretty="format:%ct" '.$filename);
 | |
|     if($mtime_max < $mtime) { //si une date de modification est supérieure au max (donc celle de index.php), alors on conserve sa valeur
 | |
|       $mtime_max = $mtime;
 | |
|       $last_rev = exec('git log -1 --pretty=format:"%H" '.$filename); //récupération du hash du commit associé
 | |
|     }
 | |
|   }
 | |
|   $fmt = datefmt_create(
 | |
|     'fr-FR',
 | |
|     IntlDateFormatter::FULL,
 | |
|     IntlDateFormatter::FULL,
 | |
|     'Europe/Paris',
 | |
|     IntlDateFormatter::GREGORIAN,
 | |
|     'd MMMM Y à HH:mm:ss O'
 | |
|   );
 | |
| 
 | |
| ?>
 | |
| 
 | |
| <!DOCTYPE HTML>
 | |
| <html>
 | |
| 	<HEAD>
 | |
|     <?php include 'includes/header.html'; ?>
 | |
|     <title>Accueil</title>
 | |
| 	</HEAD>
 | |
| 	<BODY>
 | |
| 		<CENTER>
 | |
| 		<?php include 'includes/titre.php'; ?>
 | |
| 		<br>
 | |
| 		<?php include 'includes/menu.php'; ?>
 | |
|         <p style="text-align:right;">Dernière mise à jour du site le <?php echo datefmt_format($fmt, $mtime_max); ?><br>git revision: <a href="https://git.gnous.fr/gnous/main_website/commit/<?php echo $last_rev;?>" target="_blank"><?php echo substr($last_rev, 0, 7);?></a></p>
 | |
| 
 | |
| 		<div style="width:40%;">
 | |
| 		<p style="text-align: right;">
 | |
| 		«<i>Ton site il est très utile et très peu énergivore mais il n'est pas très très beau...</i>»<br>
 | |
| 		Louise, le 17 novembre 2021
 | |
| 		</p>
 | |
| 
 | |
| 		<p style="text-align: justify;">
 | |
| 		Ce site web utilise exclusivement les technologies <abbr title="HyperText Markup Language">HTML</abbr>, <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> et <abbr title="Cascading Style Sheets">CSS</abbr> (un tout petit peu) pour présenter le projet <abbr title="GNOUS's Not Only Ultra Symbolic">GNOUS</abbr>.
 | |
| 		Son aspect austère résulte d'un manque évident de goût graphique, mais surtout de la volonté de minimiser son impact environnemental au travers de sa consommation énergétique.
 | |
| 		</p>
 | |
| 		</div>
 | |
| 
 | |
| 		<br>
 | |
| 		<br>
 | |
| 
 | |
| 		<img src="ressources/logo.svg" height=400>
 | |
| 		</CENTER>
 | |
| 		<BR><BR>
 | |
|       <?php
 | |
| 
 | |
|       ?>
 | |
|       <footer>
 | |
| 	<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/deed.fr" target="_blank"><img alt="Licence Creative Commons (CC BY-SA 4.0)" style="display: block;border-width:0;margin-left: auto;margin-right: auto;" src="/ressources/licence-cc-by-sa.png"/></a>
 | |
|       </footer>
 | |
| 	</BODY>
 | |
| </HTML>
 |