En mindre fejl skal rettes.
link er http://gratiis.dk/easygal/den mener der er fejl i linje 57.
koden sersådan ud.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Billed galleri</title>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<link rel="Stylesheet" href="../style.css" type="text/css">
<link rel="Stylesheet" href="../topnav.css" type="text/css">
<script language="Javascript" src="../ie_hover_fix.js" type="text/javascript"></script>
<link rel="Stylesheet" href="gal.css" type="text/css">
</head>
<body>
<div id="container">
<?php
// Fix that we are in a subdir. Makes the menu work.
$filename = "../menu.html";
$fp = fopen ( $filename, "r" );
$data = fread ( $fp, filesize ( $filename ) );
$data = eregi_replace( "href=\"", "href=\"../", $data );
echo $data;
?>
<div class="intro">
<h1>Billede galleri</h1>
<div class="gal">
<?php
$dir = $_REQUEST[ 'subdir' ];
$pic = $_REQUEST[ 'pic' ];
function scandir($dir = './', $sort = 0)
{
$dir_open = @ opendir($dir);
if (! $dir_open)
return false;
while (($dir_content = readdir($dir_open)) !== false)
$files[] = $dir_content;
if ($sort == 1)
rsort($files, SORT_STRING);
else
sort($files, SORT_STRING);
return $files;
}
function listsubdirs ( $dir = '.' ) {
$dirlist = array();
$list = scandir ( $dir );
foreach ( $list as $id => $element ) {
if ( is_dir ( $element ) && $element != "." && $element != ".." ){
$dirlist[$id] = $element;
}
}
return $dirlist;
}
if ( $pic ){
echo "<div class=\"picture_name\">\n";
echo " <div class=\"picture\">\n";
echo " <img src=\"$pic\" alt=\"$pic\">\n";
echo " </div>\n";
echo "<p>$pic</p>\n";
echo "</div>\n";
} else
if ( $dir ){
foreach ( glob ( $dir.'/*{.jpg,*.JPG,*.png,*.PNG,*.gif,*.GIF,*.jpeg,*.JPEG}', GLOB_BRACE^GLOB_NOSORT ) as $file ){
echo "<div class=\"thumb_name\">\n";
echo " <div class=\"thumb\">\n";
echo " <a href=\"index.php?pic=$file\">";
echo " <img src=\"thumb.php?filename=$file\" alt=\"$file\">\n";
echo " </a>";
echo " </div>\n";
echo "<p>$file</p>\n";
echo "</div>\n";
}
} else {
$dirlist = listsubdirs ( '.' );
foreach ( $dirlist as $dir ){
echo "<div class=\"subdir\">\n";
echo " <div class=\"thumb\">\n";
$imagelist = glob ( $dir.'/*{.jpg,*.JPG,*.png,*.PNG,*.gif,*.GIF,*.jpeg,*.JPEG}', GLOB_BRACE^GLOB_NOSORT );
echo " <a href=\"index.php?subdir=$dir\">\n";
echo " <img src=\"thumb.php?filename=$imagelist[0]\" alt=\"$dir\">\n";
echo " </a>\n";
echo " </div>\n";
echo "$dir\n";
echo "</div>\n";
}
}
?>
</div>
</div>
</div>
<?php include("../validator.html"); ?>
</body>
</html>
hjælp mig med at løse fejlen.
