rendered paste body<?php
session_start();
session_cache_limiter();
error_reporting(0);
include "galleri.inc";
$picturedir = $_GET['dir'];
$strtdir = getcwd();
$ch = chdir ($picturedir);
$myhost = $_SERVER['HTTP_HOST'];
if ($ch) include "galleri.inc";
$mydir = getcwd();
$tmp = chdir ($strtdir);
?>
<html>
<head>
<meta http-equiv="Pragma" content="no-cache">
<title>Handelsvarer</title>
<link rel="stylesheet" type="text/css"
href="../xpress.css" />
</head>
<body bgcolor="#CECECE">
<table width="400" border="0" align="center" cellpadding="0" cellspacing="0" id="links">
<tr>
<td><a href="galleri.php?dir=test1" target="_self">test dir</a></td>
</tr>
</table>
<br>
<div align="center"></div>
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<?php
$cellcount = 0;
$piccount = 0;
if (is_dir($picturedir)) {
if ($dh = opendir($picturedir)) {
while ($filename = readdir($dh)) {
if (basename($filename) != basename($filename,$exten)) {
$picpath[] = $picturedir."/".$filename;
$fnbase[] = basename ($filename,$exten);
$capname[] = $picturedir."/".$fnbase.$text;
}
}
for ( i=0; picpath.length; i++) {
$cellcount++;
$piccount++;
$picpath[i];
if ($cellcount == 1)
echo "<table width=\"500\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\n";
echo "<tr>\n";
echo "<td width=\"500\" height=\"150\">\n";
echo "<img src=\"".$picpath[i]."\" width=".$tbwidth." border=0>";
echo "</a></td><br>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td width=\"500\" id=\"varenr\">";
readfile($capname[i]);
echo "</td>\n";
echo "</tr>\n";
$cellcount = 0;
echo "</table>\n";
echo "<br>\n";
echo "<br>\n";
}
closedir($dh);
}
}
if ($cellcount != 0) echo "</tr>\n";
?>
</td>
</tr>
</table>
<p> </p>
</body>
</html>