<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Arşiv</title>
</head><body><table width="900" bgcolor="#f4f4f4" border="0" cellspacing="8" cellpadding="8" align="center"><tr><td align="center">
<?php
error_reporting(E_ALL ^ E_NOTICE);
$dizin = "../";
$tutucu = opendir($dizin);
while($dosya = readdir($tutucu)){
if(is_file($dizin."/".$dosya))
$resim[] = $dosya;
}
closedir($tutucu);
$limit = 20;
$sf = $_GET["sf"];
$toplam = count($resim);
if($sf < 1) $sf = 1;
$kactan = ($sf-1) * $limit;
$kaca = ($kactan+$limit);
if($kaca > $toplam) $kaca = $toplam;
for($i=$kactan; $i < $kaca; $i++){
echo '<a href="'.$dizin.'/'.$resim[$i].'" target="_blank"><img src="'.$dizin.'/'.$resim[$i].'" border="0" /></a>';
}
echo "<br /><br />";
for($i=1; $i < $toplam / $limit; $i++){
if($sf == $i){ echo "$i"; }
else {echo "<a href='index.php?sf=$i' align='center'>$i</a>"; }
} echo "</tr></table>";
?>
</body></html>
Arkadaşlar bu koda sağlı sollu veri sıralama kodunu entegre edemedim.
Tam nerelere ekliyeceğimi bulamadım yardımcı olursanız çok sevinirim.:S
Sağlı Sollu Veri Sıralama Kodu Ekleme
4
●688
- 18-09-2009, 04:55:13Mantığı aşağıdaki şekildedir. Bunu kendinize göre değiştirebilirsiniz.
<table border="5" align="center"> <?php $a = explode(' ','a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a'); foreach($a as $i => $b){ echo $i % 2 == '0' ? '<tr><td>'.$a[$i].'</td>' : '<td>'.$a[$i].'</td></tr>'."\n"; } ?> </table>