Compare commits

..

3 Commits

Author SHA1 Message Date
26d98a5319 réduction du nb d'img pour les tests 2022-09-17 00:54:35 +02:00
cec911053c chargement paresseux des images 2022-09-17 00:52:57 +02:00
fd2b40d097 v3 de la recup/affichage des img 2022-09-17 00:41:44 +02:00
7 changed files with 18 additions and 12 deletions

View File

Before

Width:  |  Height:  |  Size: 769 KiB

After

Width:  |  Height:  |  Size: 769 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 785 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -19,24 +19,30 @@
</br></br> </br></br>
<?php <?php
$dir_nom = './img'; $dir_nom = './img';
$dir = opendir($dir_nom) or die('Erreur : le répertoire indiqué n\'existe pas'); $dir = opendir($dir_nom) or die('Oups ! Le répertoire demandé semble ne pas exister.');
$fichier = array(); $fichier= array();
$dossier= array();
while($element = readdir($dir)) { while($element = readdir($dir)) {
if($element != '.' && $element != '..') { if($element != '.' && $element != '..') {
if (!is_dir($dir_nom.'/'.$element)) {$fichier[] = $element;} if (!is_dir($dir_nom.'/'.$element)) {
$fichier[] = $element;
}
} else {
$dossier[] = $element;
} }
} }
closedir($dir);
if(!empty($fichier)){ if(!empty($dossier));
rsort($fichier); rsort($dossier);
foreach($dossier as $lien=>$date)
sort($fichier);
foreach($fichier as $lien) { foreach($fichier as $lien) {
echo "<div align=\"center\"><a href=\"$dir_nom/$lien\" target=\"_blank\"><img src=\"$dir_nom/$lien\"></a></div>\r echo "<div align=\"center\"><img src=\"$dir_nom/$lien\" loading=\"lazy\"></img></div>\r
<div align=\"center\"><p>&#128269; <a href=\"http://saucenao.com/search.php?db=999&url=https://concepts.esenjin.xyz/teumbleur/v3/img/$lien\" target=\_blank>source</a></p></div>\r\r </br></br>"; <div align=\"center\"><p>&#128269; <a href=\"http://saucenao.com/search.php?db=999&url=https://concepts.esenjin.xyz/teumbleur/v3/img/$lien\" target=\_blank>source</a></p></div>\r\r </br></br>";
} }
}
?> ?>