Zend - The PHP Company




Graphics

Add Code


showing in directory images  

Type: application
Added by: salak
Entered: 04/08/2000
Last modified: 08/12/1999
Rating: *** (3 votes)
Views: 6760
showing in directory images


<?
// adil@ispro.net.tr
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Adil KAZANOGLU</TITLE>
</HEAD>

<BODY BGCOLOR="#FFFFFF">
<center>
<?
$handle
=opendir('.');
$i=0;
while (
$file readdir($handle)) {
  if((
strpos($file,".JPG")>0) OR (strpos($file,".jpg")>0) OR (strpos($file,".gif")>0) OR (strpos($file,".GIF")>0)){
                
$i++;
                
$array[$i]=$file;
        }
}
closedir($handle);
if(
$sayac=='') {
        
$sayac=1;
}
$asagi=$sayac-1;
$yukari=$sayac+1;
if (
$sayac==1){
        
$asagi=$i;
}
if (
$sayac==$i){
        
$yukari=1;
}
?>
<table border="0">
<tr>
   <td colspan="3"><font size="5">IMAGES(<? print "$sayac"?>)</font></td>
</tr>
<tr>
   <td colspan="1" align="right"><a href="index.php?sayac=<? print "$asagi";?>"> <<<<< </a></td>
   <td colspan="1" align="center"><a href="index.php?sayac=1"> Basa DON ! </a></td>
   <td colspan="1" align="left"><a href="index.php?sayac=<? print "$yukari";?>"> >>>>> </a></td>
</tr>
</table><table border="1">
<tr>
   <td colspan="3"><img src="<? print "$array[$sayac]"?>"></td>
</tr>
<tr>
</tr>
</table>
</center>
</BODY>
</HTML>


Usage Example


See the example


Rate This Script





Search



This Category All Categories