Czyli to tak: wyswietla mi obrazek mini_obraz1.png a odnosnik jest do obraz4.png zamiast obraz1.png.
Chyba coś źle wykodziłem, mogłby ktoś luknąc?
Kod
$data_sesion = $_SESSION["user"];
$t=1;
$i = 0;
if ($handle = opendir('miniaturki/'.$data_sesion.'/'))
{
while (false !== ($file[$i] = readdir($handle)))
{
if ($file[$i] != "." && $file[$i] != ".." && $file[$i] != "index.html")
{
$i++;
}
}
}
$j = 0;
if ($handle2 = opendir('profil/'.$data_sesion.'/'))
{
while (false !== ($file2[$j] = readdir($handle2)))
{
if ($file2[$j] != "." && $file2[$j] != ".." && $file2[$j] != "index.html")
{
echo "<a href='profil/$data_sesion/$file2[$j]/'><img src='miniaturki/$data_sesion/$file[$j]' width=150 height=100></a>";
$j++;
if ($t % 3 == 0) echo '<br /><br />';
$t++;
}
}
closedir($handle2);
closedir($handle);
}
}
$t=1;
$i = 0;
if ($handle = opendir('miniaturki/'.$data_sesion.'/'))
{
while (false !== ($file[$i] = readdir($handle)))
{
if ($file[$i] != "." && $file[$i] != ".." && $file[$i] != "index.html")
{
$i++;
}
}
}
$j = 0;
if ($handle2 = opendir('profil/'.$data_sesion.'/'))
{
while (false !== ($file2[$j] = readdir($handle2)))
{
if ($file2[$j] != "." && $file2[$j] != ".." && $file2[$j] != "index.html")
{
echo "<a href='profil/$data_sesion/$file2[$j]/'><img src='miniaturki/$data_sesion/$file[$j]' width=150 height=100></a>";
$j++;
if ($t % 3 == 0) echo '<br /><br />';
$t++;
}
}
closedir($handle2);
closedir($handle);
}
}