v3 de la recup/affichage des img
This commit is contained in:
parent
7fdee72682
commit
fd2b40d097
30
index.php
30
index.php
@ -19,25 +19,31 @@
|
||||
</br></br>
|
||||
|
||||
<?php
|
||||
|
||||
$dir_nom = './img';
|
||||
$dir = opendir($dir_nom) or die('Erreur : le répertoire indiqué n\'existe pas');
|
||||
$fichier = array();
|
||||
$dir = opendir($dir_nom) or die('Oups ! Le répertoire demandé semble ne pas exister.');
|
||||
$fichier= array();
|
||||
$dossier= array();
|
||||
|
||||
while($element = readdir($dir)) {
|
||||
if($element != '.' && $element != '..') {
|
||||
if (!is_dir($dir_nom.'/'.$element)) {$fichier[] = $element;}
|
||||
}
|
||||
if (!is_dir($dir_nom.'/'.$element)) {
|
||||
$fichier[] = $element;
|
||||
}
|
||||
} else {
|
||||
$dossier[] = $element;
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($fichier)){
|
||||
rsort($fichier);
|
||||
closedir($dir);
|
||||
|
||||
if(!empty($dossier));
|
||||
rsort($dossier);
|
||||
foreach($dossier as $lien=>$date)
|
||||
sort($fichier);
|
||||
foreach($fichier as $lien) {
|
||||
echo "<div align=\"center\"><a href=\"$dir_nom/$lien\" target=\"_blank\"><img src=\"$dir_nom/$lien\"></a></div>\r
|
||||
<div align=\"center\"><p>🔍 <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>";
|
||||
echo "<div align=\"center\"><img src=\"$dir_nom/$lien\"></img></div>\r
|
||||
<div align=\"center\"><p>🔍 <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>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</br>
|
||||
|
Loading…
Reference in New Issue
Block a user