Gallery popup problem
Jeg har lidt probs med mit gallery... problemet er at det nu åbner en ny side hvos man man vælge størrelse på pic osv... kan testes her...www.eterno.dk/gallery-cvs-20030630/
MEN. Det jeg vil nu er at når der klikkes på de thumbs, så skal de komme op som på dem her...
www.eterno.dk/galleri/jonas-a3/
Håber det kan fikses...
:::KODE:::
<script type="text/JavaScript">
var billede;
function NewWindow(url) {
var streng="<html><body leftmargin=0 topmargin=0 bgcolor=#000000>";
streng+='<img src=\"'+url+'\"></body></html>';
billede = new Image();
billede.src = url;
var t = new Date().getTime();
var hojde = (billede.height+30)
var bredde = (billede.width+10)
var horisontal = (screen.width - bredde)/2;
var vertikal = (screen.height - hojde)/2;
win = window.open('','link'+t,'height='+ hojde + ',width=' + bredde + ', top=' + vertikal + ', left='+horisontal)
win.document.open();
win.document.write(streng);
win.document.close();
win.resizeTo (bredde, hojde)
}
</script>
<?php
require("include/includes.php");
?>
<html>
<head>
<link href="include/stile.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%">
<tr>
<?php
$dir_count = 0;
if ($path == "" && count(split(";",PHOTO_ROOTPATH)) == 1) $path = PHOTO_ROOTPATH;
if ($path == "") {
$roots = split(";",PHOTO_ROOTPATH);
while (list($key,$val) = each($roots)) {
$root = trim($val);
print_dir($root,$root);
}
} else {
print_dirs($path);
}
if ($dir_count > 0) {
print(" <tr>\n");
print(" <td width=\"5\" height=\"5\"><img src=\"gfx/pixel.gif\" width=\"5\" height=\"5\"></td>\n");
print(" <td width=\"145\" height=\"5\" valign=\"top\"><img src=\"gfx/dots.gif\" width=\"145\" height=\"1\"></td>\n");
print(" <td width=\"5\" height=\"5\"><img src=\"gfx/pixel.gif\" width=\"5\" height=\"5\"></td>\n");
print(" </tr>\n");
}
?> <?php
if ($path != "") {
$images = array();
$d = dir($path);
while($entry = $d->read()) {
if ($entry != "." && $entry != "..") {
if (!is_dir($path . "/" . $entry) && is_picture($entry)) {
$images[] = $entry;
}
}
}
$d->close();
sort($images, SORT_REGULAR);
if ($filename != "" && $scale > 0) {
$width = $photo_scalesizes[$scale-1]['width'];
$height = $photo_scalesizes[$scale-1]['height'];
$info = $image->get_info($path, $filename);
$w = 0;
$h = 0;
if ($info["width"] >= $info["height"]) {
// landscape
$w = $width;
} else {
// portrait
$h = $height;
}
$size = $image->calc_resize($info["width"], $info["height"], $w, $h);
if ($size["width"] > $width) {
$w = $width;
}
if ($size["height"] > $height) {
$h = $height;
}
$size = $image->calc_resize($info["width"], $info["height"], $w, $h);
print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n");
print("<form metod=\"get\">\n");
print("<input type=\"hidden\" name=\"path\" value=\"" . $path . "\">\n");
print("<input type=\"hidden\" name=\"filename\" value=\"" . $filename . "\">\n");
print(" <tr>\n");
print(" <td colspan=\"2\"><a href=\"" . PHOTO_IMAGEURL . $path . "/" . $filename . "\" onclick=\"NewWindow(this.href);return false;\">" . $image->tag($path, $filename, $size['width'], $size['height']) . "</a><br> <br></td>\n");
print(" </tr>\n");
print(" <tr>\n");
print(" <td align=\"left\" valign=\"top\">");
print("<input type=\"button\" value=\"Thumb view\" onclick=\"document.location.href='?path=" . $path . "'\"> <select name=\"scale\" onchange=\"this.form.submit()\"> ");
for ($i=0; $i<count($photo_scalesizes); $i++) {
print("<option value=\"" . ($i+1) . "\"" . (($i+1) == $scale ? " SELECTED" : "") . ">" . $photo_scalesizes[$i]['width'] . "x" . $photo_scalesizes[$i]['height'] . "</option>");
}
print("</select> </td>\n");
print(" <td align=\"right\" valign=\"top\">");
for ($i=0; $i<count($images); $i++) {
if ($images[$i] == $filename) {
if ($i > 0) {
$prevfile = $images[$i-1];
}
if ($i < count($images) - 1) {
$nextfile = $images[$i+1];
}
break;
}
}
print("<input type=\"button\" value=\"< Previous\" onclick=\"document.location.href='?path=" . $path . (isset($prevfile) ? "&filename=" . $prevfile . "&scale=" . $scale . "'\"" : "'\" DISABLED") . ">");
print("<input type=\"button\" value=\"Next >\" onclick=\"document.location.href='?path=" . $path . (isset($nextfile) ? "&filename=" . $nextfile . "&scale=" . $scale . "'\"" : "'\" DISABLED") . ">");
print("</td>\n");
print(" </td>\n");
print(" </tr>\n");
print("</form>\n");
print("</table>\n");
} else {
$img = 0;
print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"" . PHOTO_THUMBSPACE . "\">\n");
for ($i = 0; $i < (count($images) / PHOTO_COLS); $i++) {
print(" <tr>\n");
for ($col = 0; $col < PHOTO_COLS; $col++) {
print(" <td valign=\"top\">\n");
if ($img < count($images) && $images[$img] != "") {
print_picture($path, $images[$img]);
} else {
print(" ");
}
print(" </td>\n");
$img++;
}
print(" </tr>\n");
}
print("</table>\n");
}
}
?>
</td>
</tr>
</table>
</body>
</html>