Hallo mensen,
wie kan mij helpen met het volgende probleem:
Ik heb in php een thumb page maar daar zitten de volgende fouten / problemen in die ik er niet uit kan halen:
- Hij telt het aantal pagina's niet goed. Met het count en break commando.
- En hij lijnt alleen de eerste pagina goed uit.
Hieronder vindt je het script
wie kan mij helpen met het volgende probleem:
Ik heb in php een thumb page maar daar zitten de volgende fouten / problemen in die ik er niet uit kan halen:
- Hij telt het aantal pagina's niet goed. Met het count en break commando.
- En hij lijnt alleen de eerste pagina goed uit.
Hieronder vindt je het script
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
| <? // Original script by Arvid Bux // Modificated by Syst3m Err0r // Configuratie // persoon naam of onderwerp naam $person = "Daan Schuurmans Party"; // Thumbnail directory $path = "pictures/daanschuurmans/thumbnails"; // Plaatjes directory $path2 = "pictures/daanschuurmans"; // aantal kolommen $clm = "4"; // aantal rijen $rows = "5"; // thumbnail width $t_w = "120"; // Thumbnail height $t_h = "90"; // Background Color $backcolor = "#ffffff"; // Background Color <td> tag waar 't thumbnailtje instaat $td_bg = "#333333"; // Titel text $title = "$person plaatjes"; // Lettertype $font = "Verdana"; // Letterkleur $fontcolor = "#FFFFFF"; $footer = 'en ik weet niet waarom het niet goed gaat'; ?> <html> <head> <title><? echo $title ?></title> <script> function showPicture(imgName,imgHeight,imgWidth) { popup = window.open( "" ,'_blank','Height=' + imgHeight + ',Width=' + imgWidth + ',scrollbars=no,resize=no,left=0,top=0'); popup.document.write('<html><head><title><? echo $person; ?></title>'); popup.document.write('</head>'); popup.document.write('<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">'); popup.document.write('[img]"[/img]'); popup.document.write('</body></html>'); popup.document.close() } </script> </head> <body bgcolor=<? echo $backcolor ?>> <font face="<? echo $font ?>" size="2" color="#000000"> <br> <br> <center> <b><b><? print ("$title"); ?></b></b><br><br> <center> <? $number = $clm * $rows; $count = -1; $min = (1+($page * $number)); $max = (($page +1) * $number); if(($min=="") AND ($max=="")){$max=$number;$min=1;} if($min=="1"){ $break = $clm;}else{$break = $xdl;} echo "<table border=0 cellpadding=0 cellspacing=4>\n<tr>\n\n"; $d = dir("$path"); while($entry=$d->read()) { if($count < $min){$entry="";} elseif($count > $max){$entry="";} if(eregi(".jpg|.jpeg|.JPG|.JPEG|.gif|.bmp|.png", $entry)): ClearStatCache(); $size = GetImageSize("$path2/$entry"); $file_size=fileSize("$path2/$entry"); $file_size = round($file_size / 1024) . "k"; $td_height = $t_h + 8; $td_width = $t_w + 8; print("<td align=\"center\" valign=\"middle\" > <table border=1 bordercolor=\"#000000\" bgcolor=\"#000000\" cellpadding=0 cellspacing=0> <tr width=$td_width height=$td_height> <td width=$td_width height=$td_height align=\"center\" valign=\"middle\" bgcolor=$td_bg>\n <a href=\"#\" border=0 onmouseover=\"window.status='Vergroten';return true;\" onmouseout=\"window.status=''; return true\" onclick=\"showPicture('$path2/$entry',$size[1],$size[0]);return false\">\n"); if ($size[1] > $size[0]) { print("[img]\"$path/$entry\"[/img]</a>\n"); } elseif ($size[1] < $size[0]) { print("[img]\"$path/$entry\"[/img]</a>\n"); } elseif ($size[1] == $size[0]) { print("[img]\"$path/$entry\"[/img]</a>\n"); } print("</td></tr><tr><td align=\"center\"><font face=\"$font\" size=\"2\" color=\"$fontcolor\"> $count</td></tr></table>\n</td>\n\n"); if ($count == "$break") { echo "</tr>\n<tr>\n"; $break = $count + $clm ; } endif; $count++; } echo "</tr></table>"; $pages = ($break / $clm * $rows); $pageplus = ($page + 1); $pagemin = ($page - 1); if (($page + 1) < $pages) { $volgende = " | <a href=?page=$pageplus>Volgende pagina</a> |"; } if (($page+1) > "1"){ $vorige = "| <a href=?page=$pagemin>Vorige pagina</a> |"; } // Footer, dit staat onder de plaatjes. echo "<br>$vorige $volgende"; echo "<p> $footer"; $d->close(); ?> </center> </font> </body> </html> ?> |