Error: safe mode restriction in effect?????
Alvast bedankt!!!
En 3x posten. Heeft dat nut?
Ik ben geen PHP gewend en ik ben een image gallery aan het maken en als ik een nieuwe dir aanmaak gaat het goed, maar als ik deze opvraag krijg ik die melding.
En how the **** krijg je het voor elkaar 2 zinnen van 3 woorden niet te begrijpen? :P
en dit is de hele melding:
Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 569 is not allowed to access test owned by uid 48 in /home/virtual/site65/fst/var/www/html/fotoboek/index.php on line 106
Warning: opendir(test): failed to open dir: Success in /home/virtual/site65/fst/var/www/html/fotoboek/index.php on line 106
Warning: readdir(): supplied argument is not a valid Directory resource in /home/virtual/site65/fst/var/www/html/fotoboek/index.php on line 107
Ohjah verder, volgens de fout probeer je een map te openen die van iemand anders is (Warning: opendir(): SAFE MODE Restriction in effect. The script whose uid is 569 is not allowed to access test owned by uid 48). Loop ff na of het pad enzo klopt
Is dit zelf aan te passen of moet ik toch bij die gasten zijn?
/var/www/klanten/m/menno/html/scripts/
alleen dit proberen:
/scripts/
Werkte bij mij wel eens...
Edit:
Je path staat er al.. :D
/home/virtual/site65/fst/var/www/html/fotoboek/
Probeer alleen dit:
/fotoboek/
Elwin
Gewijzigd op 08/03/2004 16:34:00 door Elwin - Fratsloos
Ik heb een config.php en een index.php en in de confog.php staat het pad. Kan er anders iets in de index.php verkeerd staan?
Ik weet niet hoe het met de anderen hier zit maar ik ben niet helderziend ....
Sommige "hosters" zetten de safemode standaard aan. Je kan misschien bij je host gaan zeuren of ze het uit willen zetten
maar wel veilig, bij een goede webserver staat het meestal wel aan.
het zal de kans van hacken aanzienlijk verminderen omdat er bijna geen mogelijkheden meer zijn om het systeem in te komen
functies als system() en `` doen het bijvoorbeeld niet meer
Jep en dat is de enige reden
Dit was btw alleen wanneer ik iets wou verwijderen, misschien is jou safe mode strenger ? :/
en daarmee kan je soms safemode omzeilen
Index.php:
Code (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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<?php
$imgdir = $_GET['imgdir'] ;
$page = $_GET['page'];
$a_img = array();
include("header.inc");
require('config.php');
///// for captioning
function caption($filename) {
$is_captioned = check_perms($filename);
if ($is_captioned) {
print"<br><font face='Arial, Helvetica, sans-serif' size=2 color='#000000'>";
include($filename);
print"</font>";
}
}
///// for album description
function album($filename) {
$is_captioned = check_perms($filename);
if ($is_captioned) {
print"<font face='Arial, Helvetica, sans-serif' size=3 color='#000000'>";
include($filename);
print"</font><br>";
}
}
////check file permission
function check_perms($filename) {
if (! file_exists($filename)) return false;
$fileperms = fileperms($filename);
$isreadable = $fileperms & 4;
if ( is_file($filename) ) {
// pictures, thumbnails, config files and comments only need to be readable
if (! $isreadable) {
if (MODE_WARNING) print "$filename: wrong permission <br>";
}
return $isreadable;
}
else if ( is_dir($filename) ) {
// galleries need to be both readable and executable
$isexecutable = $fileperms & 1;
if (! $isreadable || ! $isexecutable)
if (MODE_WARNING) print "$filename: wrong permission <br>";
return ( $isreadable && $isexecutable); // ($dirperms & 5) == 5 ?
}
// default behavior: the filename does not exist
return false;
}
$dh = opendir($dir);
while($file = readdir($dh))
{
if ($file != "." && $file != ".." && is_dir($file))
{$dname[] = $file;
sort($dname);
reset ($dname);
}
}
print "<script language=\"JavaScript\">";
print "function MM_jumpMenu(targ,selObj,restore){eval(targ+\".location='\"+selObj.options[selObj.selectedIndex].value+\"'\");";
print " if (restore) selObj.selectedIndex=0;}";
print "</script>";
print "<form name=\"form1\">";
print "<select name=\"menu1\" onChange=\"MM_jumpMenu('parent',this,0)\">";
print "<option value=\"#\">Ga naar...</option><br>\n";
$u=0;
foreach($dname as $key=>$val)
{ if($dname[$u])
{ print "<option value=\"index.php?imgdir=$dname[$u]\">$dname[$u]</option>\n";
$u++;
}
}
print "</select>";
if ($imgdir =="")
{$imgdir = $dname[0];
}
$dimg = opendir($imgdir);
while($imgfile = readdir($dimg))
{
if( (substr($imgfile,-3)=="gif") || (substr($imgfile,-3)=="jpg") || (substr($imgfile,-3)=="JPG") || (substr($imgfile,-3)=="GIF") )
{
$a_img[count($a_img)] = $imgfile;
sort($a_img);
reset ($a_img);
}
}
print "<h2>$imgdir</h2>";
$totimg = count($a_img); // total images number
$totxpage = $col*$maxrow; // images x page
$totpages = ($totimg%$totxpage==0)?((int)$totimg/$totxpage):((int)($totimg/$totxpage)+1); // number of total pages
if($totimg == false)
print "<br><font size=2 face=verdana>Geen beelden beschikbaar in de \"IMAGES\" directory!!</font><br>";
else
{
print "</form>";
///print album description
$album_name = "$imgdir/album.txt";
album($album_name);
print "<center><table width=700 bgcolor=#ffffff border=0 bordercolor=#ffffff cellpadding=2 cellspacing=3>\n";
// start page
if($page=="" || $page==1)
{
$x=0;
$page = 1;
}
else
$x = (($page-1)*($totxpage));
$r=0;
// print of table
foreach($a_img as $key=>$val)
{
$caption_name = "$imgdir/$a_img[$x].txt";
if(($x%$col)==0)
print "<tr>\n";
if($a_img[$x])
{
$size = getimagesize ("$imgdir/$a_img[$x]");
$halfw = round($size[0]/2);
$halfh = round($size[1]/2);
$quarterw = round($size[0]/4);
$quarterh = round($size[1]/4);
if($size[1] < $size[0])
{
$height = 86;
$width = 130;
$imgnumber = ($x+1);
if("$imgdir/$a_img[$x]" !="")
if ($thumb){
$thumbnail = "thumbs.php?image=$imgdir/$a_img[$x]&newheight=86&newwidth=130&width=$size[0]&height=$size[1]";
}
else
{
$thumbnail = "$imgdir/$a_img[$x]";
}
print "<td align=center valign=top>";
print "<TABLE WIDTH=198 BORDER=0 CELLPADDING=0 CELLSPACING=0>";
print "<TR><TD COLSPAN=3><IMG SRC=\"$place/slide_01.gif\" WIDTH=198 HEIGHT=47></TD></TR>";
print "<TR><TD><IMG SRC=\"$place/slide_02.gif\" WIDTH=33 HEIGHT=86></TD>";
print "<TD><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\"><img src=\"$thumbnail\" height=$height width=$width border=0 alt='$a_img[$x]'></a></TD>";
print "<TD><IMG SRC=\"$place/slide_04.gif\" WIDTH=35 HEIGHT=86></TD></TR><TR>";
print "<TD COLSPAN=3><IMG SRC=\"$place/slide_05.gif\" WIDTH=198 HEIGHT=56><br><font size=\"1\"><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">$size[0] x $size[1]</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$halfw&h=$halfh&t=$imgdir $imgnumber','$x','width=$halfw,height=$halfh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/2</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$quarterw&h=$quarterh&t=$imgdir $imgnumber','$x','width=$quarterw,height=$quarterh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/4 size</a></font>";
caption($caption_name);
print "</TD></TR>";
print "</TABLE></center>";
print "</td>\n";
}
else
{ $height = 130;
$width = 86;
if ($thumb){
$thumbnail = "thumbs.php?image=$imgdir/$a_img[$x]&newheight=130&newwidth=86&width=$size[0]&height=$size[1]";
}
else
{
$thumbnail = "$imgdir/$a_img[$x]";
}
$imgnumber = ($x+1);
if("$imgdir/$a_img[$x]" !="")
print "<td align=center valign=top>";
print "<TABLE WIDTH=198 BORDER=0 CELLPADDING=0 CELLSPACING=0>";
print "<TR><TD COLSPAN=3><IMG SRC=\"$place/slidev_01.gif\" WIDTH=198 HEIGHT=28></TD></TR>";
print "<TR><TD><IMG SRC=\"$place/slidev_02.gif\" WIDTH=56 HEIGHT=130></TD>";
print "<TD><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\"><img src=\"$thumbnail\" height=$height width=$width border=0 alt='$a_img[$x]'></a></TD>";
print "<TD><IMG SRC=\"$place/slidev_04.gif\" WIDTH=56 HEIGHT=130></TD></TR><TR>";
print "<TD COLSPAN=3><IMG SRC=\"$place/slidev_05.gif\" WIDTH=198 HEIGHT=31><br><font size=\"1\"><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">$size[0] x $size[1]</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$halfw&h=$halfh&t=$imgdir $imgnumber','$x','width=$halfw,height=$halfh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/2</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$quarterw&h=$quarterh&t=$imgdir $imgnumber','$x','width=$quarterw,height=$quarterh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/4 size</a></font>";
caption($caption_name);
print "</TD></TR>";
print "</TABLE>";
print "</td>\n";
}
}
if(($x%$col) == ($col-1))
{
print "</tr>\n";
$r++;
}
// print "r=$r - maxrow=$maxrow<br>";
if($r==$maxrow)
{
break;
}
else
$x++;
}
print "</table>\n";
}
// page break
$imgdir = str_replace(" ", "%20", $imgdir);
//page number
print "<p><font size=2 face=verdana>";
if($totimg>$totxpage)
{
if($totpages>$page)
{
$next = $page+1;
$back = ($page>1)?($page-1):"1";
if($page>1)
{
$back = $page-1;
print "<a href=index.php?imgdir=$imgdir&page=1>Eerste pagina</a> | <a href=index.php?imgdir=$imgdir&page=$back><< terug </a>";
}
print " <b>pagina $page van $totpages</b> <a href=index.php?imgdir=$imgdir&page=$next>volgende >></a> | <a href=index.php?imgdir=$imgdir&page=$totpages>laatste pagina</a>";
}
else
{
$next = (($page-1)==0)?"1":($page-1);
print "<a href=index.php?imgdir=$imgdir&page=1>Eerste pagina</a> | <a href=index.php?imgdir=$imgdir&page=$next><< terug</a> <b>pagina $page van $totpages</b> ";
print "</center>";
}
}
include("footer.inc");
?>
$imgdir = $_GET['imgdir'] ;
$page = $_GET['page'];
$a_img = array();
include("header.inc");
require('config.php');
///// for captioning
function caption($filename) {
$is_captioned = check_perms($filename);
if ($is_captioned) {
print"<br><font face='Arial, Helvetica, sans-serif' size=2 color='#000000'>";
include($filename);
print"</font>";
}
}
///// for album description
function album($filename) {
$is_captioned = check_perms($filename);
if ($is_captioned) {
print"<font face='Arial, Helvetica, sans-serif' size=3 color='#000000'>";
include($filename);
print"</font><br>";
}
}
////check file permission
function check_perms($filename) {
if (! file_exists($filename)) return false;
$fileperms = fileperms($filename);
$isreadable = $fileperms & 4;
if ( is_file($filename) ) {
// pictures, thumbnails, config files and comments only need to be readable
if (! $isreadable) {
if (MODE_WARNING) print "$filename: wrong permission <br>";
}
return $isreadable;
}
else if ( is_dir($filename) ) {
// galleries need to be both readable and executable
$isexecutable = $fileperms & 1;
if (! $isreadable || ! $isexecutable)
if (MODE_WARNING) print "$filename: wrong permission <br>";
return ( $isreadable && $isexecutable); // ($dirperms & 5) == 5 ?
}
// default behavior: the filename does not exist
return false;
}
$dh = opendir($dir);
while($file = readdir($dh))
{
if ($file != "." && $file != ".." && is_dir($file))
{$dname[] = $file;
sort($dname);
reset ($dname);
}
}
print "<script language=\"JavaScript\">";
print "function MM_jumpMenu(targ,selObj,restore){eval(targ+\".location='\"+selObj.options[selObj.selectedIndex].value+\"'\");";
print " if (restore) selObj.selectedIndex=0;}";
print "</script>";
print "<form name=\"form1\">";
print "<select name=\"menu1\" onChange=\"MM_jumpMenu('parent',this,0)\">";
print "<option value=\"#\">Ga naar...</option><br>\n";
$u=0;
foreach($dname as $key=>$val)
{ if($dname[$u])
{ print "<option value=\"index.php?imgdir=$dname[$u]\">$dname[$u]</option>\n";
$u++;
}
}
print "</select>";
if ($imgdir =="")
{$imgdir = $dname[0];
}
$dimg = opendir($imgdir);
while($imgfile = readdir($dimg))
{
if( (substr($imgfile,-3)=="gif") || (substr($imgfile,-3)=="jpg") || (substr($imgfile,-3)=="JPG") || (substr($imgfile,-3)=="GIF") )
{
$a_img[count($a_img)] = $imgfile;
sort($a_img);
reset ($a_img);
}
}
print "<h2>$imgdir</h2>";
$totimg = count($a_img); // total images number
$totxpage = $col*$maxrow; // images x page
$totpages = ($totimg%$totxpage==0)?((int)$totimg/$totxpage):((int)($totimg/$totxpage)+1); // number of total pages
if($totimg == false)
print "<br><font size=2 face=verdana>Geen beelden beschikbaar in de \"IMAGES\" directory!!</font><br>";
else
{
print "</form>";
///print album description
$album_name = "$imgdir/album.txt";
album($album_name);
print "<center><table width=700 bgcolor=#ffffff border=0 bordercolor=#ffffff cellpadding=2 cellspacing=3>\n";
// start page
if($page=="" || $page==1)
{
$x=0;
$page = 1;
}
else
$x = (($page-1)*($totxpage));
$r=0;
// print of table
foreach($a_img as $key=>$val)
{
$caption_name = "$imgdir/$a_img[$x].txt";
if(($x%$col)==0)
print "<tr>\n";
if($a_img[$x])
{
$size = getimagesize ("$imgdir/$a_img[$x]");
$halfw = round($size[0]/2);
$halfh = round($size[1]/2);
$quarterw = round($size[0]/4);
$quarterh = round($size[1]/4);
if($size[1] < $size[0])
{
$height = 86;
$width = 130;
$imgnumber = ($x+1);
if("$imgdir/$a_img[$x]" !="")
if ($thumb){
$thumbnail = "thumbs.php?image=$imgdir/$a_img[$x]&newheight=86&newwidth=130&width=$size[0]&height=$size[1]";
}
else
{
$thumbnail = "$imgdir/$a_img[$x]";
}
print "<td align=center valign=top>";
print "<TABLE WIDTH=198 BORDER=0 CELLPADDING=0 CELLSPACING=0>";
print "<TR><TD COLSPAN=3><IMG SRC=\"$place/slide_01.gif\" WIDTH=198 HEIGHT=47></TD></TR>";
print "<TR><TD><IMG SRC=\"$place/slide_02.gif\" WIDTH=33 HEIGHT=86></TD>";
print "<TD><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\"><img src=\"$thumbnail\" height=$height width=$width border=0 alt='$a_img[$x]'></a></TD>";
print "<TD><IMG SRC=\"$place/slide_04.gif\" WIDTH=35 HEIGHT=86></TD></TR><TR>";
print "<TD COLSPAN=3><IMG SRC=\"$place/slide_05.gif\" WIDTH=198 HEIGHT=56><br><font size=\"1\"><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">$size[0] x $size[1]</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$halfw&h=$halfh&t=$imgdir $imgnumber','$x','width=$halfw,height=$halfh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/2</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$quarterw&h=$quarterh&t=$imgdir $imgnumber','$x','width=$quarterw,height=$quarterh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/4 size</a></font>";
caption($caption_name);
print "</TD></TR>";
print "</TABLE></center>";
print "</td>\n";
}
else
{ $height = 130;
$width = 86;
if ($thumb){
$thumbnail = "thumbs.php?image=$imgdir/$a_img[$x]&newheight=130&newwidth=86&width=$size[0]&height=$size[1]";
}
else
{
$thumbnail = "$imgdir/$a_img[$x]";
}
$imgnumber = ($x+1);
if("$imgdir/$a_img[$x]" !="")
print "<td align=center valign=top>";
print "<TABLE WIDTH=198 BORDER=0 CELLPADDING=0 CELLSPACING=0>";
print "<TR><TD COLSPAN=3><IMG SRC=\"$place/slidev_01.gif\" WIDTH=198 HEIGHT=28></TD></TR>";
print "<TR><TD><IMG SRC=\"$place/slidev_02.gif\" WIDTH=56 HEIGHT=130></TD>";
print "<TD><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\"><img src=\"$thumbnail\" height=$height width=$width border=0 alt='$a_img[$x]'></a></TD>";
print "<TD><IMG SRC=\"$place/slidev_04.gif\" WIDTH=56 HEIGHT=130></TD></TR><TR>";
print "<TD COLSPAN=3><IMG SRC=\"$place/slidev_05.gif\" WIDTH=198 HEIGHT=31><br><font size=\"1\"><a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$size[0]&h=$size[1]&t=$imgdir $imgnumber','$x','width=$size[0],height=$size[1],directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">$size[0] x $size[1]</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$halfw&h=$halfh&t=$imgdir $imgnumber','$x','width=$halfw,height=$halfh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/2</a> | <a href='#' onclick=\"window.open('popup.php?img=$imgdir/$a_img[$x]&w=$quarterw&h=$quarterh&t=$imgdir $imgnumber','$x','width=$quarterw,height=$quarterh,directories=no,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,resizable=no');return false\" target=\"_blank\">1/4 size</a></font>";
caption($caption_name);
print "</TD></TR>";
print "</TABLE>";
print "</td>\n";
}
}
if(($x%$col) == ($col-1))
{
print "</tr>\n";
$r++;
}
// print "r=$r - maxrow=$maxrow<br>";
if($r==$maxrow)
{
break;
}
else
$x++;
}
print "</table>\n";
}
// page break
$imgdir = str_replace(" ", "%20", $imgdir);
//page number
print "<p><font size=2 face=verdana>";
if($totimg>$totxpage)
{
if($totpages>$page)
{
$next = $page+1;
$back = ($page>1)?($page-1):"1";
if($page>1)
{
$back = $page-1;
print "<a href=index.php?imgdir=$imgdir&page=1>Eerste pagina</a> | <a href=index.php?imgdir=$imgdir&page=$back><< terug </a>";
}
print " <b>pagina $page van $totpages</b> <a href=index.php?imgdir=$imgdir&page=$next>volgende >></a> | <a href=index.php?imgdir=$imgdir&page=$totpages>laatste pagina</a>";
}
else
{
$next = (($page-1)==0)?"1":($page-1);
print "<a href=index.php?imgdir=$imgdir&page=1>Eerste pagina</a> | <a href=index.php?imgdir=$imgdir&page=$next><< terug</a> <b>pagina $page van $totpages</b> ";
print "</center>";
}
}
include("footer.inc");
?>
Config.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
//Slide gallery variables
$col = 4; //no. of columns in a page
$maxrow = 1; //no. of rows in a page
$dir="."; //directory for this script, no need to change
$thumb = true ; //setting it to TRUE will generate real thumbnails on-the-fly, supports jpg file only and requires GD library. Setting it to FALSE will resize the original file to fit the thumbnail size, long download time. Turn it off if thumbnails don't show properly.
$place = "."; //directory of the slide mount images, no need to change
//Upload/Delete Module variables
$LOGIN = "iam";
$PASSWORD = "menno";
$abpath = "/usr/local/apache/vhosts"; //Absolute path to where images are uploaded. No trailing slash
$sizelim = "no"; //Size limit, yes or no
$size = "2500000"; //Size limit if there is one
$number_of_uploads = 5; //Maximum number of uploads in one time
?>
//Slide gallery variables
$col = 4; //no. of columns in a page
$maxrow = 1; //no. of rows in a page
$dir="."; //directory for this script, no need to change
$thumb = true ; //setting it to TRUE will generate real thumbnails on-the-fly, supports jpg file only and requires GD library. Setting it to FALSE will resize the original file to fit the thumbnail size, long download time. Turn it off if thumbnails don't show properly.
$place = "."; //directory of the slide mount images, no need to change
//Upload/Delete Module variables
$LOGIN = "iam";
$PASSWORD = "menno";
$abpath = "/usr/local/apache/vhosts"; //Absolute path to where images are uploaded. No trailing slash
$sizelim = "no"; //Size limit, yes or no
$size = "2500000"; //Size limit if there is one
$number_of_uploads = 5; //Maximum number of uploads in one time
?>