Location: PHPKode > scripts > Dynapic > dynapic/index.php3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<?
INCLUDE "conf.php3";
if ((!isset($gal))||(!isset($title[$gal]))){
print "<TITLE>Categories</TITLE>";
include "banner.php3";
print "<h1>Categories</h1>";
$i=0;
while (isset($title[$i])){
print "<h2><a href=$PHP_SELF?gal=$i>$title[$i]</a></h2>";
$i++;
};
}else{
?>
<TITLE><? print $title[$gal]; ?></TITLE>
</HEAD>
<BODY BACKGROUND="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000ff" VLINK="#800080" ALINK="#ff0000" >
<?
error_reporting(63);
include "banner.php3";
?>
<center>
<h1><? print $title[$gal] ?></h1>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?
if (!isset($pg)){
$pg=0;
};
$handle=opendir($dir[$gal]);
$i=0;
while ($file = readdir($handle)) {
if (eregi("jpg$",$file)){
$folder[$i]=$file;
$i=$i+1;
};
};
closedir($handle);
sort($folder);
$a=0;
$count=$row*$col*$pg;
for ($r=1; $r<=$row; $r++) {
print "<tr>";
if ($count>$i-1) {break;};
for ($c=1; $c<=$col; $c++) {
$tnpath=$tndir[$gal]."/".$folder[$count];
print "<td valign=\"center\" align=\"center\"><a href=\"view.php3?id=$folder[$count]&gal=$gal&pg=$pg&count=$count\"><img src=\"$tnpath\" BORDER=0></a><td valign=\"center\">"; $count++;
if ($count>$i-1) {break;};
} ;
print "</tr>";
}  ;
print "</table><h2>";
if ($pg>0) {
$tmp=$pg-1;;
print "<a href=\"$PHP_SELF?pg=$tmp&gal=$gal\"><img src=\"prev.gif\" alt=\"prev\" width=\"30\" height=\"20\" border=\"0\"></a>" ;
};
$tmp=$pg+1;
print "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp";
if ($tmp*$row*$col<$i) {
$tmp=$pg+1;
print "<a href=\"$PHP_SELF?pg=$tmp&gal=$gal\"><img src=\"next.gif\" alt=\"prev\" width=\"30\" height=\"20\" border=\"0\"></a>" ;
};
print "</h2>";
};
include "bannerbot.php3";
?>
<center>
</BODY>

</HTML>
Return current item: Dynapic