inmiddels heb ik alles werkend op de notice na.
Ik zat even de code te bekijken over isset maar ik kan het nog niet in mijn code verwerken op 1 of andere manier. Hier even een complete code wat ik nu heb draaien.
<!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>Dejavu Reportage - foto gallerij, portfolio, trouwerijen</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<? include('includes/metatags.inc'); ?>
<link href="css/dejastyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<div align="center">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td id="content_cell">
<div class="cellHoogte">
<div id="newTXT"><h1 align="right">Nieuwe foto's</h1>
<?
function getFiles($path) {
//Function takes a path, and returns a numerically indexed array of associative arrays containing file information,
//sorted by the file name (case insensitive). If two files are identical when compared without case, they will sort
//relative to each other in the order presented by readdir()
$files = array();
$fileNames = array();
$i = 0;
if (is_dir($path)) {
if ($dh = opendir($path)) {
while (($file = readdir($dh)) !== false) {
if ($file == "." || $file == "..") continue;
$fullpath = $path . "/" . $file;
$fkey = strtolower($file);
while (array_key_exists($fkey,$fileNames)) $fkey .= " ";
$a = stat($fullpath);
$files[$fkey]['size'] = $a['size'];
if ($a['size'] == 0) $files[$fkey]['sizetext'] = "-";
else if ($a['size'] > 1024) $files[$fkey]['sizetext'] = (ceil($a['size']/1024*100)/100) . " K";
else if ($a['size'] > 1024*1024) $files[$fkey]['sizetext'] = (ceil($a['size']/(1024*1024)*100)/100) . " Mb";
else $files[$fkey]['sizetext'] = $a['size'] . " bytes";
$files[$fkey]['name'] = $file;
$files[$fkey]['type'] = filetype($fullpath);
$fileNames[$i++] = $fkey;
}
closedir($dh);
} else die ("Cannot open directory: $path");
} else die ("Path is not a directory: $path");
sort($fileNames,SORT_STRING);
$sortedFiles = array();
$i = 0;
foreach($fileNames as $f) $sortedFiles[$i++] = $files[$f];
return $sortedFiles;
}
$files = getFiles("./NEW");
foreach ($files as $file) print " <b><a href=\"new.php?naam=$file[name]\">$file[name]</a></b><br>\n";
?>
</div>
<div id="NEW">
<div>
<?php if(!$_GET["naam"]) { //{ openen met ! ervoor = als niet
?>
<img src="/images/intro_new.jpg" />
<?php }else{ //}else{ }sluiten en anders openen{
?>
<iframe style="border: medium none ; background-color:FFFFFF;" src="/NEW/<?php PRINT $_GET["naam"]; ?>/iframe.html" title="Slideshow" frameborder="0" height="370" width="500" scrolling="no"></iframe>
<?php
} //afsluiten
?>
</div>
</div>
<? include('includes/menu.inc'); ?>
</div>
</td>
</tr>
<tr>
<td id="footer">
<? include('includes/footer.inc'); ?>
</td>
</tr>
</table>
</div>
<body>
</body>
</html>