Commit b0ff89ba authored by Zéfling's avatar Zéfling 🎨
Browse files

Version corrigée

parent a04aae77
img
\ No newline at end of file
<?php
//ini_set('display_errors',1);
//error_reporting(E_ALL);
ini_set('display_errors',1);
error_reporting(E_ALL);
//------------- Function suite ---------------------------------------------------------------------
function xhtml($texte) {
return str_replace('&', '&amp;', $texte);
}
//------------- Function pause ---------------------------------------------------------------------
$compt = compteur();
$adresse="http://gif.ikilote.net";
$taille= 20;
$adresse="http://img.ikilote.net";
$taille= 24;
//------------- Function suite ---------------------------------------------------------------------
......@@ -22,200 +22,116 @@ function cmp ($a, $b) {
sort($tmp);
return (strcmp(strtoupper($tmp[1]) , strtoupper($b))) ? 1 : -1;
}
function nombre() {
$i = 0;
if ($dh = opendir('.')) {
$filelist = array();
while (($file2 = readdir($dh)) !== false) {
if (($file2 != "index.php") && ($file2 != "..") && ($file2 != "Fond.gif") && ($file2 != "online.dat") && ($file2 != "counter.txt")) {
$filelist[]=$file2;
}
//------------- Page ------------------------------------------------------------------------
echo <<<HTML
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xml:lang="fr" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml">
<head><title>GIF</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="keywords" content="smiley, kaoani, japonais, japanese" />
<meta name="description" content="GIF" />
<meta name="robots" content="all" />
<link rel="shortcut icon" type="image/png" href="/favicon.png" />
<style>
.pages {
text-align:center;
}
.page-select {
color:red;
}
for ($x=1; $x < count($filelist); $x++) {
if (is_dir($filelist[$x])) {
$handle=opendir($filelist[$x]);
$i = $i - 1;
while ($file3 = readdir($handle)) {
if ($file3 != "..") {
$i++;
}
}
}
ul {
display:grid;
list-style: none;
grid-template-columns: 33% 33% 33%;
grid-gap: 0.333%;
width: 100%;
padding: 0;
margin: 0;
}
}
return $i;
}
function OnlineT($Lg1, $Lg2) {
$settijd = "1";
$bestandsnaam = "online.dat";
if (!isset($datumi)) $datumi = dirname(__FILE__)."/$bestandsnaam";
$datum = date("d-m-Y");
$test="---";
$tijd = @time();
$ip = $_SERVER['REMOTE_ADDR'];
$string = "$ip|$tijd|$datum\n";
$a = fopen("$bestandsnaam", "a+");
fputs($a, $string);
fclose($a); $tijduit = time()-(60*$settijd); $all = "";
$i = 0; $datumi = file($bestandsnaam);
for ($num = 0; $num < count($datumi); $num++) {
$stukken = explode("|",$datumi[$num]);
if ($stukken[1] > $tijduit) {
$all .= $stukken[0]; $all .= ",";
li {
text-align: center;
justify-content: end;
display: flex;
flex-direction: column;
}
$i++;
}
$all = substr($all,0,strlen($all)-1);
$arraypieces = explode(",",$all);
$gebruikers = count(array_flip(array_flip($arraypieces)));
if ($gebruikers ==1){
echo("$gebruikers $Lg1");
} else {
echo("$gebruikers $Lg2");
}
$dell = "";
for ($numm = 0; $numm < count($datumi);$numm++) {
$kolomen = explode("|",$datumi[$numm]);
if ($kolomen[1] > $tijduit) {
$dell .= "$kolomen[0]|$kolomen[1]|$kolomen[2]";
img{
max-width: 90%;
height: auto;
max-height: 250px;
}
input {
width: -moz-available;
width: -webkit-available;
width: available;
}
</style>
</head>
<body style="background-image:url(/Fond.gif)">
<h1>GIF</h1>
<div>
HTML;
$nom = 'img';
$i = -1;
$nom_dossier = str_replace ('&', '%26', $nom);
// parcourt du dossier
$handle = opendir($nom);
while ($file2 = readdir($handle)) {
if ($file2 != "." && $file2 != "..") {
$filelist[]=$file2;
$i++;
}
if (!$datumi) $datumi = dirname(__FILE__)."/$bestandsnaam";
$tijd = @time();
$ip = $_SERVER['REMOTE_ADDR'];
$string = "$dell";
$a = fopen("$bestandsnaam", "w+");
fputs($a, $string);
fclose($a);
}
usort($filelist, "cmp");
// gestion de la pagination
//------------- Page ------------------------------------------------------------------------
echo '<?xml version="1.0" encoding="utf-8"?>'.
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'.
'<html xml:lang="fr" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/1999/xhtml">'.
'<head><title>'.$LgFF0.' - '.$LgTitre.'</title>'.
'<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />'.
'<meta name="keywords" content="smiley, kaoani, japonais, japanese" />'.
'<meta name="description" content="'.$LgTitre.'" />'.
'<meta name="robots" content="all" />'.
'<link rel="shortcut icon" type="image/png" href="/favicon.png" />'.
'</head><body style="background-image:url(/Fond.gif)">'.
'<p style="margin-top:1em;text-align:center;font-weight: bold;font-size:25pt">'.$LgTitre.'</p>'.
'<div style="text-align:center">';
//OnlineT($LgOnline, $LgOnlines);
echo ("<br />$compt");
$nbr = nombre();
echo ("<p style=\"text-align:center\">$LgTexteP1$nbr$LgTexteP2</p>");
if (!isset($_GET['nom']) || empty($_GET['nom'])) {
echo ("<p style=\"text-align:center\"><a href=\"/japanese/\">$LgJapon</a> - <a href=\"/french/\">$LgFrance</a> - <a href=\"/english/\">$LgAnglais</a></p>");
$handle = opendir('.');
$filelist = array();
while ($file2 = readdir($handle)) {
if (is_dir($file2) && $file2 != '..') {
$filelist[]=$file2;
}
}
usort($filelist, "cmp");
echo ('<table border="0" cellpadding="5" cellspacing="0" style="margin-left:auto;margin-right:auto; text-align:center">');
for ($x=1; $x < count($filelist); $x++) {
if(($x%4)==1 && $x != 1) echo ("</tr>");
if(($x%4)==1) echo ("<tr>");
$temp = xhtml(lang($filelist[$x], $langage));
$i = -1;
if (is_dir($filelist[$x])) {
$handle=opendir($filelist[$x]);
while ($file3 = readdir($handle)) {
if ($file3 != "..") {
$i++;
$name[$i] = $file3;
}
}
}
echo ("<td><img src=\"".xhtml("/$filelist[$x]/$name[1]")."\" alt=\"".xhtml($name[1])."\" />");
$nom_dossier = str_replace ('&', '%26', $filelist[$x]);
echo ("<br /> <a href=\"/$langage/$nom_dossier/1.html\">$temp</a>");
//if ($langage != '') {echo("&langage=$langage");}
if ($i > $taille) {
echo '<br />';
//echo ("">$temp</a><br>");
for ($j=1; $j<=(($i-1)/$taille)+1; $j++) {
echo ("- <a href=\"/$langage/$nom_dossier/$j.html\">$j</a>");
//if ($langage != '') {echo("langage=$langage&");}
//echo ("page=$j\"></a>");
if ($j%10 == 0) echo (" - <br />");
}
echo (' - <br />');
$page = (!isset($_GET['page'])) ? 1 : $_GET['page'];
if ($page != '') {
echo '<div class="pages">-';
for ($j = 1; $j <= (($i - 1) / $taille) + 1; $j++) {
if ($j == $page) {
echo " <span class=\"page-select\">$j</span> -";
} else {
//echo ("\">$temp</a><br>");
echo ('<br />');
}
echo ("$i $LgImage");
echo ("</td>");
}
if(!(($x%4)==1 && $x != 1)) echo ("</tr>");
echo ('</table>');
} else {
$nom = $_GET['nom'];
if ($langage != '') {
echo ("<p style=\"text-align:center\"><a href=\"/$langage/\">$LgRetour</a></p>");
} else {
echo ("<p style=\"text-align:center\"><a href=\"/$langage/\">$LgRetour</a></p>");
}
$i = -1;
$nom_dossier = str_replace ('&', '%26', $nom);
$handle=opendir($nom);
while ($file2 = readdir($handle)) {
if ($file2 != "..") {
$filelist[]=$file2;
$i++;
}
}
$temp = xhtml(lang($nom, $langage));
usort($filelist, "cmp");
echo ("<p style=\"text-align:center\">$temp - $i $LgImage");
$page = (!isset($_GET['page'])) ? '' : $_GET['page'];
if ($page != '') {
echo ('<br />-');
for ($j=1; $j<=(($i-1)/$taille)+1; $j++) {
if ($j == $page) {
echo(" <span style=\"color:red\">$j</span> -");
} else {
echo (" <a href=\"/$langage/$nom_dossier/");
//if ($langage != '') {echo("langage=$langage&");}
echo ("$j.html\">$j</a> -");
}
}
for ($j=1; ($j<=$taille+1) && ($j+($page-1)*$taille <= sizeof($filelist)); $j++ ) {
$fileliste[$j] = $filelist[$j+($page-1)*$taille];
echo " <a href=\"/?page=$j\">$j</a> -";
}
$filelist = $fileliste;
}
echo ('</p><table cellpadding="0" cellspacing="0" style="margin-left:auto;margin-right:auto; ">');
for ($x=1; $x < sizeof($filelist); $x++) {
echo ('<tr>');
echo ("<td style=\"border-bottom:1px dotted black;text-align:center\"><img src=\"/$nom_dossier/$filelist[$x]\" alt=\"{$filelist[$x]}\" /></td>");
echo ("<td style=\"border-bottom:1px dotted black\">".
"<span style=\"display:block;float:left;width:100px;\">HTML :</span> &lt;img src=\"$adresse/$nom_dossier/$filelist[$x]\"&gt;<br />".
"<span style=\"display:block;float:left;width:100px;\">XHTML :</span> &lt;img src=\"$adresse/$nom_dossier/$filelist[$x]\" alt=\"\" /&gt;<br />".
"<span style=\"display:block;float:left;width:100px;\">Ik` Code :</span> [img=\"$adresse/$nom_dossier/$filelist[$x]\"]<br />".
"<span style=\"display:block;float:left;width:100px;\">BBcode :</span> [img]$adresse/$nom_dossier/$filelist[$x][/img]</td>");
echo ('</tr>');
echo '</div>';
$ln = count($filelist);
for (
$j = 1;
($j <= $taille) && ($j + ($page - 1) * $taille <= $ln);
$j++
) {
$fileliste[$j] = $filelist[ $j + ($page - 1) * $taille -1 ];
}
echo ('</table>');
$filelist = $fileliste;
}
echo ("<div style=\"text-align:center\">$LgMerci<br /><a href=\"mailto:zefling@yahoo.fr\">Zefling</a><br /><br />$LgRemercie</div>");
echo ("<hr style=\"color:#0099FF\" /><div style=\"text-align:center\"><span style=\"fonf-size:8pt\">$LgSSect - $LgZaide - Copyright 2000-2009 - $LgDroit</span></div></div></body></html>");
?>
\ No newline at end of file
// liste des GIF
echo '<ul>';
for ($x = 1; $x <= count($filelist); $x++) {
echo <<<HTML
<li>
<div>
<img src="/$nom_dossier/$filelist[$x]" alt="{$filelist[$x]}" />
</div>
<div>
<input type="text" size="100" value="![...]($adresse/$nom_dossier/$filelist[$x])" />
</div>
</li>
HTML;
}
echo '</ul>';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment