ik gebruik het volgende script om een fotoboek te laten zien. Alleen, gebeurt er iets raars, op mijn eigen pc gaat alles goed, maar zodra ik het script dan op de server heb gezet, geeft het script op de eerste regel van de eerste pagina maar 4 foto's weer, terwijl de rest van de regels gewoon uit 5 foto's bestaat.
Wie weet raad?
Wie weet raad?
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
| <? $woord = "index"; // naam vd php file $path2 = "$gallery/thumbs"; // dir waar thumbnails in staan $path = "$gallery"; // dir waar foto's in staan $naam = "$gallery"; $page = 0; $title = "$naam - Pagina ". ($page + 1); if ($naam == "laatstelesdag2002") { $naam = "Laatste Lesdag 2002"; $title = "$naam - Pagina ". ($page + 1);} elseif ($naam == "index") { $naam = "Overzicht beschikbare fotoboeken"; $title = "$naam";} // Configuratie $clm = "5"; // Aantal kolommen $rows = "4"; // aantal rijen $t_w = "120"; $t_h = "90"; $min = (1+($page * 20)); $max = (($page + 1) * 20); $break = (($page * 20) + $clm); $handle=opendir("$path2"); include ('../login/leerling/header.inc'); echo ('<div align="left"><font face="Arial, Helvetica, sans-serif" color="#CC6600"'); echo ('size="1">JE BENT IN > INTRANET > FOTOBOEK</font></div>'); echo ("<center>Kijk in het fotoboek naar de leukste foto's die hier gemaakt zijn</center><hr width=75%>"); echo ("<center><b><h2>$title</h2></b>"); if ($gallery == "index") { echo ("<a href='$woord.php?gallery=laatstelesdag2002&page=0'>Laatste lesdag klas 6 2001 - 2002</a>"); } else { echo ("<table border=0 cellpadding=0 cellspacing=0><tr>"); $count = -1; while ($file = readdir($handle)) { if (($count >= $min) AND ($count <= $max)) { if(eregi(".jpg|.jpeg|.gif|.bmp|.png", $file)) { ClearStatCache(); $size = GetImageSize("$path/$file"); $size[0] = $size[0] + 20; $size[1] = $size[1] + 25; $file_size=fileSize("$path/$file"); $file_size = round($file_size / 1000) . "k"; echo ("<td><a href=\"#\" onclick=\"window.open('$path/$file','pix$count','width=$size[0],height=$size[1],innerwidth=$size[0],innerheight=$size[1],directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes,top=0,left=0,leftmargin=0,topmargin=0,marginwidth=0,marginheight=0,screenX=0,screenY=0');return false\"><img src='$path2/$file'"); echo (" border=0 alt=$count height=$t_h></a> <br>$file<br><br> </td>\n"); } if ($count == $break) { echo "</tr>\n<tr>\n"; $break = $count + $clm ; } } $count++; } closedir($handle); echo ("</tr></table>"); $pages = ($count / 20); $pageplus = ($page + 1); $pagemin = ($page - 1); if (($page + 1) < $pages) { $volgende = (" | <a href=$woord.php?gallery=$gallery&page=$pageplus>Volgende 20 foto's</a> |"); } if (($page+1) > "1") { $vorige = ("| <a href=$woord.php?gallery=$gallery&page=$pagemin>Vorige 20 foto's</a> |"); } echo ("$vorige $volgende</div>"); } include ('../login/leerling/footer.inc'); ?> |
Sometimes you need to plan for coincidence