Projet

Général

Profil

Révision 4fcec884 www/index.php

Voir les différences:

www/index.php
1 1
<?php
2
# uncomment this to check for uninitialized variables etc.:
3
# error_reporting (E_ALL);
2
// uncomment this to check for uninitialized variables etc.:
3
// error_reporting (E_ALL);
4 4

  
5
#language support
5
//language support
6 6
require_once ("lib/lib.l10n.php");
7 7
require_once("inc/config.inc.php");
8 8
require_once("inc/www.class.inc.php");
......
10 10
//session_name("navstevnik");
11 11
//session_register("page");
12 12

  
13
#set the language translation
13
//set the language translation
14 14
l10n::set("$root/l10n/".$sclang."/main.lang");
15 15
l10n::set("$root/l10n/".$sclang."/date.lang");
16 16

  
17

  
18

  
19

  
20
# always get sorted directory entries
17
// always get sorted directory entries
21 18
$adr = new SortDir("$gallery_dir");
22 19

  
23
# get variables passed in from the URL:
20
// get variables passed in from the URL:
24 21
$galerie='';
25 22
if (isset($_GET['galerie'])) $galerie=$_GET["galerie"];
26 23
if (isset($_GET['gallery'])) $galerie=$_GET["gallery"];
......
42 39

  
43 40
if (!is_dir("$gallery_dir/$galerie/thumbs")) {
44 41
  $galerie = "";
45
}
42
 }
46 43

  
47 44
//read interesting stuff from info.txt
48 45
if ($galerie) { 
49
	readInfo("$root/$gallery_dir/$galerie/info.txt", $galerie);
50
//check for restricted access
51
	if ($galerielogin[$galerie]) {
52
			 access_check($galerielogin[$galerie],$galeriepw[$galerie],$galerie);
53
	}
54
}
46
  readInfo("$root/$gallery_dir/$galerie/info.txt", $galerie);
47
  //check for restricted access
48
  if ($galerielogin[$galerie]) {
49
    access_check($galerielogin[$galerie],$galeriepw[$galerie],$galerie);
50
  }
51
 }
55 52

  
56 53
$page->process_comment_form();
57 54

  
......
60 57
//ryxeo
61 58
if($_GET['slideshow'] == 'play')
62 59
  $slideshow = true;
63
else
64
  $slideshow = false;
60
 else
61
   $slideshow = false;
65 62

  
66 63
if($_GET['directdownload'] == "true") {
67 64
  require_once("$root/inc/photo.class.inc.php");
......
78 75
  readfile($picture->preview);
79 76
  //print_r($picture);
80 77
  exit;
81
}
78
 }
82 79

  
83 80
$page->header("Photos");
84 81
require("inc/header.inc.php");
......
87 84
//print "<div class=\"navigation\"><a href=\"$ThisScript\">" . $scnamegallery . "</a>";
88 85
print "<div class=\"navigation\"><a href=\"./\">" . $scnamegallery . "</a>";
89 86

  
90
#############################
91
# 	Overall Gallery Index		#
92
#############################
87
//############################
88
// 	Overall Gallery Index
89
//############################
93 90
if (!$galerie) {
94
   # finish off navigation bar
95
   print "</div>\n\n<!-- listing galleries-->\n\n";  
96
	 # I've nuked date.txt to replace it with a more generic info.txt
97
   # It optionally supplies i18n name, camera model, author and date
98
	 # TODO: imgconv script support
99
   while ($file = $adr->Read()) {
100
      // checking for inc is only really needed when gallery_dir == $root
101
      // hopefully not many galleries will be named inc ;)
102
      if (is_dir("$gallery_dir/$file") && !ereg("\.", $file) && $file!="inc") { 
103
         // Use date file for gallery date if avaliable
104
				 // info.txt format described in README
105
         readInfo("$root/$gallery_dir/$file/info.txt", $file);
106
         
107
      }
108
   }
109

  
110
	 if (!isset($galeriemonth)) $galeriemonth = array();
111
   if (!isset($galerieday)) $galerieday = array();
112
	 //sort within month depending on $sortinmonth
113
	 if ($sortinmonth) {
114
		 //alphabetically
115
		 ksort($galeriemonth);
116
		 reset($galeriemonth);
117
	 } else {//by date
118
		 arsort($galerieday);
119
		 reset($galerieday);
120
	 }
121

  
122

  
123
	 $thisyear = 0;
124
	 if (!$yearto) $yearto = date("Y");
125
   for ($i = $yearto; $i >= $yearsince; $i--) {
126
      for ($thismonth=12; $thismonth>0; $thismonth--) { // go year by year, month by month
127
																												// down
128
				 foreach ($galerieday as $foldername => $day) { //using $galerieday (for when sorted)
129
						if ($galeriemonth["$foldername"] == $thismonth && 
130
							      $galerieyear["$foldername"] == $i) { //such Y/M exists
131

  
132
								$galerieyearordered["$foldername"]=$galerieyear["$foldername"];
133
								$galeriemonthordered["$foldername"]=$galeriemonth["$foldername"];
134
						}
135
				 }
91
  // finish off navigation bar
92
  print "</div>\n\n<!-- listing galleries-->\n\n";  
93
  // I've nuked date.txt to replace it with a more generic info.txt
94
  // It optionally supplies i18n name, camera model, author and date
95
  // TODO: imgconv script support
96
  while ($file = $adr->Read()) {
97
    // checking for inc is only really needed when gallery_dir == $root
98
    // hopefully not many galleries will be named inc ;)
99
    if (is_dir("$gallery_dir/$file") && !ereg("\.", $file) && $file!="inc") { 
100
      // Use date file for gallery date if avaliable
101
      // info.txt format described in README
102
      readInfo("$root/$gallery_dir/$file/info.txt", $file);
103
      
104
    }
105
  }
106
  
107
  if (!isset($galeriemonth)) $galeriemonth = array();
108
  if (!isset($galerieday)) $galerieday = array();
109
  //sort within month depending on $sortinmonth
110
  if ($sortinmonth) {
111
    //alphabetically
112
    ksort($galeriemonth);
113
    reset($galeriemonth);
114
  } else {//by date
115
    arsort($galerieday);
116
    reset($galerieday);
117
  }
118
  
119
  
120
  $thisyear = 0;
121
  if (!$yearto) $yearto = date("Y");
122
  for ($i = $yearto; $i >= $yearsince; $i--) {
123
    for ($thismonth=12; $thismonth>0; $thismonth--) { // go year by year, month by month
124
      // down
125
      foreach ($galerieday as $foldername => $day) { //using $galerieday (for when sorted)
126
	if ($galeriemonth["$foldername"] == $thismonth && 
127
	    $galerieyear["$foldername"] == $i) { //such Y/M exists
128
	  
129
	  $galerieyearordered["$foldername"]=$galerieyear["$foldername"];
130
	  $galeriemonthordered["$foldername"]=$galeriemonth["$foldername"];
131
	}
136 132
      }
137
   }
138

  
139

  
140
	 $months = array(__('January'), __('February'), __('March'), __('April'), __('May'), __('June'), __('July'), __('August'),
141
	 __('September'), __('October'), __('November'), __('December'));
142
	 $one_out = false;
143
	 foreach ($galerieyearordered as $foldername => $year) {
144
		  $one_out = true;
145
			if (@$thisyear!=$year) { #if the year is not equal to the current year
146
				 #This is the first year
147
				 if (@$thisyear) { print "   </div>\n</div>\n";}// end last year if this is 
148
																				 // not the first one
149
				 #This is a new year
150
				 unset($thismonth);
151
				 print "<div class=\"year\"><h3>$year</h3>\n";
152
				 print "";
153
			}
154
			$month=$galeriemonth["$foldername"];
155
			# now months
156
			if (@$thismonth!=$month) {
157
				 #first one
158
				 if (@$thismonth) { print "   </div>\n"; } // end of last month if
159
																							// this is not the first one
160
				 #new month
161
				 $monthindex = $month - 1;
162
				 $monthname = $months[$monthindex];
163
				 print "   <div class=\"month\"><h4>$monthname</h4>\n";
164
			}
165
			#galleries within month	
166
			if ($galerielogin[$foldername]) {
167
				print "      <p class=\"restricted\"><a ";
168
			} else {
169
				print "      <p><a ";
170
			}
171
			if (@$galeriename[$foldername]) {
172
				print " href=\"$ThisScript?galerie=$foldername\">";
173
				print $galeriename[$foldername];
174
				print "</a>";
175
			} else {
176
				print " href=\"$ThisScript?galerie=$foldername\">$foldername</a>";
177
			}
178
			if (@$galeriedesc[$foldername]) {
179
				print "<span class=\"desc\">" . $galeriedesc[$foldername];
180
				print "</span>\n";
181
			}
182
			if (@$galerieauthor[$foldername]) {
183
				print "<span class=\"author\">by&nbsp;" . $galerieauthor[$foldername];
184
				print "</span>\n";
185
			}
186
			if (@$galerieday[$foldername]) {
187
				print "<span class=\"date\">";
188
				print "$monthname&nbsp;" . $galerieday[$foldername];
189
				print "</span>\n";
190
			}
191
			print "</p>\n";
192
			$thisyear=$year;
193
			$thismonth=$month;
194
	 }
195
	 if ($one_out) print ("   </div>\n</div>\n\n");
133
    }
134
  }
135
  
136
  
137
  $months = array(__('January'), __('February'), __('March'), __('April'), __('May'), __('June'), __('July'), __('August'),
138
		  __('September'), __('October'), __('November'), __('December'));
139
  $one_out = false;
140
  foreach ($galerieyearordered as $foldername => $year) {
141
    $one_out = true;
142
    if (@$thisyear!=$year) { //if the year is not equal to the current year
143
      //This is the first year
144
      if (@$thisyear) { print "   </div>\n</div>\n";}// end last year if this is 
145
      // not the first one
146
      //This is a new year
147
      unset($thismonth);
148
      print "<div class=\"year\"><h3>$year</h3>\n";
149
      print "";
150
    }
151
    $month=$galeriemonth["$foldername"];
152
    // now months
153
    if (@$thismonth!=$month) {
154
      //first one
155
      if (@$thismonth) { print "   </div>\n"; } // end of last month if
156
      // this is not the first one
157
      //new month
158
      $monthindex = $month - 1;
159
      $monthname = $months[$monthindex];
160
      print "   <div class=\"month\"><h4>$monthname</h4>\n";
161
    }
162
    //galleries within month	
163
    if ($galerielogin[$foldername]) {
164
      print "      <p class=\"restricted\"><a ";
165
    } else {
166
      print "      <p><a ";
167
    }
168
    if (@$galeriename[$foldername]) {
169
      print " href=\"$ThisScript?galerie=$foldername\">";
170
      print $galeriename[$foldername];
171
      print "</a>";
172
    } else {
173
      print " href=\"$ThisScript?galerie=$foldername\">$foldername</a>";
174
    }
175
    if (@$galeriedesc[$foldername]) {
176
      print "<span class=\"desc\">" . $galeriedesc[$foldername];
177
      print "</span>\n";
178
    }
179
    if (@$galerieauthor[$foldername]) {
180
      print "<span class=\"author\">by&nbsp;" . $galerieauthor[$foldername];
181
      print "</span>\n";
182
    }
183
    if (@$galerieday[$foldername]) {
184
      print "<span class=\"date\">";
185
      print "$monthname&nbsp;" . $galerieday[$foldername];
186
      print "</span>\n";
187
    }
188
    print "</p>\n";
189
    $thisyear=$year;
190
    $thismonth=$month;
191
  }
192
  if ($one_out) print ("   </div>\n</div>\n\n");
196 193
   
197
##############################
198
#  Individual Gallery Index  #
199
##############################
200
} elseif (!$snimek) {
194
  //#############################
195
  //  Individual Gallery Index  #
196
  //#############################
197
 } elseif (!$snimek) {
201 198
	 
202
   # finish off navigation header
199
   // finish off navigation header
203 200
	 
204 201
   print "\n &gt; ";
205
	 if ($galeriename[$galerie]) {
206
		 print $galeriename[$galerie];
207
	 } else {
208
		 print $galerie;
209
	 }
210
	 print "</div>\n\n";
202
   if ($galeriename[$galerie]) {
203
     print $galeriename[$galerie];
204
   } else {
205
     print $galerie;
206
   }
207
   print "</div>\n\n";
211 208

  
212
	 //thumbnails
213
	 print "<p class=\"bigthumbnails\">\n";
209
   //thumbnails
210
   print "<p class=\"bigthumbnails\">\n";
214 211
   $path = "$gallery_dir/$galerie/thumbs";
215 212
   $imgfiles = new SortDir($path);
216 213
   check($galerie); // check for nasty input
217 214
   while ($file = $imgfiles->read()) {
218
      if (is_file("$path/$file") && eregi("^img-([0-9]+)\.(png|jpe?g)", $file, $x)) {
215
     if (is_file("$path/$file") && eregi("^img-([0-9]+)\.(png|jpe?g)", $file, $x)) {
219 216
				 				 
220
         $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}";
221
         $imgsize = getimagesize("$root/$thumb");
222
				 //check for portraits
223
				 $portrait = "false";
224
				 $class = "";
225
				 if($imgsize[0]<100) {
226
					 //portraits need a special class for styling
227
					 $class = "portrait";
228
				 }
229
				 //check for number of comments per photo
230
				 if ($comments) { //there probably won't be user comments if it's off
231
				   $NumOfComments = 0;
232
					 if (file_exists("$gallery_dir/$galerie/comments/user_${x[1]}.txt")) {
233
							if ($class) $class .= " ";
234
							$class .= "hascomments";
235
							//now let's count'em
236
							$fh = fopen("$gallery_dir/$galerie/comments/user_${x[1]}.txt","r");
237
							while (!feof($fh)) {
238
								$line = fgets($fh);
239
								if (eregi("commententry",$line)) $NumOfComments++;
240
							}
241
							fclose($fh);
242
					 }
243
					 if ($NumOfComments==1) {
244
						 $NumOfComments = $NumOfComments . " " . __('Comment');
245
					 } else {
246
						 $NumOfComments = $NumOfComments . " " . __('Comments');
247
					 }
248
				 }
249
	 if (file_exists("$gallery_dir/$galerie/comments/${x[1]}.txt") &&
250
		   $title = file_get_contents("$gallery_dir/$galerie/comments/${x[1]}.txt")) {
251
	     $title = ereg_replace("(\"|\')","",trim(strip_tags($title)));
252
	     $title = ereg_replace("(.{77}).*","\\1",$title);
253
	 } else 
254
	   $title = "Photo ${x[1]}";
255

  
256
         print "   <a href=\"$ThisScript?galerie=$galerie&amp;photo=${x[1]}\"";
257
				 print " title=\"$title, $NumOfComments\"";
258
				 if ($class) print " class=\"$class\"";
259
				 print ">";
260
         print "<img ";
261
         if (isset($thumbsize)) {
262
            print "width=\"120\" height=\"80\" ";
263
         } else {
264
            // scale portraits to 80 height
265
            if ($portrait) {
266
							//portrait
267
               print "width=\"";
268
               $scaled = round($imgsize[0] / 1.5);
269
               print $scaled;
270
               print "\" height=\"${imgsize[0]}\"";
271
            } else {
272
							//landscape
273
               print $imgsize[3]; 
274
            }
275
         }
276
         print " src=\"$thumb\" ";
277
         print "alt=\"photo No. ${x[1]}\" />";
278
         print "</a>\n";
279
      }
217
       $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}";
218
       $imgsize = getimagesize("$root/$thumb");
219
       //check for portraits
220
       $portrait = "false";
221
       $class = "";
222
       if($imgsize[0]<100) {
223
	 //portraits need a special class for styling
224
	 $class = "portrait";
225
       }
226
       //check for number of comments per photo
227
       if ($comments) { //there probably won't be user comments if it's off
228
	 $NumOfComments = 0;
229
	 if (file_exists("$gallery_dir/$galerie/comments/user_${x[1]}.txt")) {
230
	   if ($class) $class .= " ";
231
	   $class .= "hascomments";
232
	   //now let's count'em
233
	   $fh = fopen("$gallery_dir/$galerie/comments/user_${x[1]}.txt","r");
234
	   while (!feof($fh)) {
235
	     $line = fgets($fh);
236
	     if (eregi("commententry",$line)) $NumOfComments++;
237
	   }
238
	   fclose($fh);
239
	 }
240
	 if ($NumOfComments==1) {
241
	   $NumOfComments = $NumOfComments . " " . __('Comment');
242
	 } else {
243
	   $NumOfComments = $NumOfComments . " " . __('Comments');
244
	 }
245
       }
246
       if (file_exists("$gallery_dir/$galerie/comments/${x[1]}.txt") &&
247
	   $title = file_get_contents("$gallery_dir/$galerie/comments/${x[1]}.txt")) {
248
	 $title = ereg_replace("(\"|\')","",trim(strip_tags($title)));
249
	 $title = ereg_replace("(.{77}).*","\\1",$title);
250
       } else 
251
	 $title = "Photo ${x[1]}";
252

  
253
       print "   <a href=\"$ThisScript?galerie=$galerie&amp;photo=${x[1]}\"";
254
       print " title=\"$title, $NumOfComments\"";
255
       if ($class) print " class=\"$class\"";
256
       print ">";
257
       print "<img ";
258
       if (isset($thumbsize)) {
259
	 print "width=\"120\" height=\"80\" ";
260
       } else {
261
	 // scale portraits to 80 height
262
	 if ($portrait) {
263
	   //portrait
264
	   print "width=\"";
265
	   $scaled = round($imgsize[0] / 1.5);
266
	   print $scaled;
267
	   print "\" height=\"${imgsize[0]}\"";
268
	 } else {
269
	   //landscape
270
	   print $imgsize[3]; 
271
	 }
272
       }
273
       print " src=\"$thumb\" ";
274
       print "alt=\"photo No. ${x[1]}\" />";
275
       print "</a>\n";
276
     }
280 277
   }
281 278
   print "</p>\n";
282 279

  
283
	 //info
284
	 print "<div id=\"info\">\n";
285
	 if ($galeriedesc[$galerie]) {
286
		 print "<p>";
287
		 print "<span class=\"value\">";
288
		 print $galeriedesc[$galerie] . "</span></p>\n";
289
	 }
290
	 if ($galerieauthor[$galerie]) {
291
		 print "<p><span class=\"key\">Author: </span>";
292
		 print "<span class=\"value\">";
293
		 print $galerieauthor[$galerie] . "</span></p>\n";
294
	 }
295
	 print "</div>\n";
280
   //info
281
   print "<div id=\"info\">\n";
282
   if ($galeriedesc[$galerie]) {
283
     print "<p>";
284
     print "<span class=\"value\">";
285
     print $galeriedesc[$galerie] . "</span></p>\n";
286
   }
287
   if ($galerieauthor[$galerie]) {
288
     print "<p><span class=\"key\">Author: </span>";
289
     print "<span class=\"value\">";
290
     print $galerieauthor[$galerie] . "</span></p>\n";
291
   }
292
   print "</div>\n";
296 293

  
297 294
   //and links to archived images:
298 295
   print "\n<p class=\"archives\">\n";
299 296
   if (file_exists("$gallery_dir/$galerie/zip/mq.zip")) {
300
      print "[ <a href=\"$gallery_dir/$galerie/zip/mq.zip\">" . __('zipped MQ images') . "</a> ] ";
297
     print "[ <a href=\"$gallery_dir/$galerie/zip/mq.zip\">" . __('zipped MQ images') . "</a> ] ";
301 298
   }
302 299
   if (file_exists("$gallery_dir/$galerie/zip/mq.tar.bz2")) {
303
      print "[ <a href=\"$gallery_dir/$galerie/zip/mq.tar.bz2\">" . __('MQ images tarball') . "</a> ] ";
300
     print "[ <a href=\"$gallery_dir/$galerie/zip/mq.tar.bz2\">" . __('MQ images tarball') . "</a> ] ";
304 301
   }
305 302
   if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) {
306
      print "[ <a href=\"$gallery_dir/$galerie/zip/hq.zip\">" . __('zipped HQ images') . "</a> ]";
303
     print "[ <a href=\"$gallery_dir/$galerie/zip/hq.zip\">" . __('zipped HQ images') . "</a> ]";
307 304
   }
308 305
   if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) {
309
      print "[ <a href=\"$gallery_dir/$galerie/zip/hq.tar.bz2\">" . __('HQ images tarball') . "</a> ]";
306
     print "[ <a href=\"$gallery_dir/$galerie/zip/hq.tar.bz2\">" . __('HQ images tarball') . "</a> ]";
310 307
   }
311 308
   print "</p>";
312 309

  
313
#######################
314
# 	Individual Image	#
315
#######################
316
} else { //low-res image
317
   # finish off header
318
   print "\n &gt; <a href=\"$ThisScript?galerie=$galerie\">";
319
	 if ($galeriename[$galerie]) {
320
		 print $galeriename[$galerie];
321
	 } else {
322
		 print $galerie;
323
	 }
324
	 print "</a>\n &gt; Photo";
325
   print " $snimek</div>";
326
   $path = "$gallery_dir/$galerie/thumbs";
327
   $imgfiles = new SortDir("$path");
328
   check($galerie);
329
   $path = "$gallery_dir/$galerie/lq";
330
   $file = "$path/img-$snimek.jpg";
331
   if (!file_exists($file)) {
332
      print __('No such image');
333
      $page->footer();
334
      exit;
335
   }
310
   //######################
311
   // 	Individual Image
312
   //######################
313
   } else { //low-res image
314
  // finish off header
315
  print "\n &gt; <a href=\"$ThisScript?galerie=$galerie\">";
316
  if ($galeriename[$galerie]) {
317
    print $galeriename[$galerie];
318
  } else {
319
    print $galerie;
320
  }
321
  print "</a>\n &gt; Photo";
322
  print " $snimek</div>";
323
  $path = "$gallery_dir/$galerie/thumbs";
324
  $imgfiles = new SortDir("$path");
325
  check($galerie);
326
  $path = "$gallery_dir/$galerie/lq";
327
  $file = "$path/img-$snimek.jpg";
328
  if (!file_exists($file)) {
329
    print __('No such image');
330
    $page->footer();
331
    exit;
332
  }
336 333
	 
337
	 if (!$picture) { //picture may have been created if commentform submitted
338
	    require_once("$root/inc/photo.class.inc.php");
339
	    $picture = new C_photo($file, $snimek);
340
	 }
341

  
342
   // mini thumbnail roll
343

  
344
   if ($show_thumbs) {
345
     print "\n<!--mini thumbnail roll-->\n<div id=\"thumbs\" class=\"navigation\" style=\"visibility: hidden\"><ul class=\"thumbs noscript\" style=\"display:none\">";
346
      print "<a id=\"minus\" href=\"$ThisScript?galerie=$galerie&amp;photo=$snimek";
347
      print "\">";
348
      print "</a>\n";
349
      print " : \n";
350
      while ($thumbfile = $imgfiles->read()) {
351
         if ( eregi("^img-([0-9]+)\.(png|jpe?g)",
352
             $thumbfile, $x)) {
353
            $thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}";
354
            print "   <li><a class=\"thumb\" href=\"$ThisScript?galerie=$galerie&amp;photo=${x[1]}&amp;directdownload=true\"";
355
	    print " name=\"" . get_photo_title($galerie, $x[1]) . "\" title=\"" . get_photo_title($galerie, $x[1]) . "\">";
356
            print "</a></li> \n";
357
         }
334
  if (!$picture) { //picture may have been created if commentform submitted
335
    require_once("$root/inc/photo.class.inc.php");
336
    $picture = new C_photo($file, $snimek);
337
  }
338

  
339
  // mini thumbnail roll
340

  
341
  if ($show_thumbs) {
342
    print "\n<!--mini thumbnail roll-->\n<div id=\"thumbs\" class=\"navigation\" style=\"visibility: hidden\"><ul class=\"thumbs noscript\" style=\"display:none\">";
343
    print "<a id=\"minus\" href=\"$ThisScript?galerie=$galerie&amp;photo=$snimek";
344
    print "\">";
345
    print "</a>\n";
346
    print " : \n";
347
    while ($thumbfile = $imgfiles->read()) {
348
      if ( eregi("^img-([0-9]+)\.(png|jpe?g)",
349
		 $thumbfile, $x)) {
350
	$thumb = "$gallery_dir/$galerie/thumbs/img-${x[1]}.${x[2]}";
351
	print "   <li><a class=\"thumb\" href=\"$ThisScript?galerie=$galerie&amp;photo=${x[1]}&amp;directdownload=true\"";
352
	print " name=\"" . get_photo_title($galerie, $x[1]) . "\" title=\"" . get_photo_title($galerie, $x[1]) . "\">";
353
	print "</a></li> \n";
358 354
      }
359
      if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) {
360
         print "<a id=\"zip\" href=\"$gallery_dir/$galerie/zip/hq.zip\">";
361
         print "zip<span /></a>";
362
      }
363
      if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) {
364
         print "<a id=\"zip\" href=\"$gallery_dir/$galerie/zip/hq.tar.bz2\">";
365
         print "zip<span /></a>";
366
      }
367
      print "</ul></div>\n";
368
   } else {
369
      // show the popup button
370
      print "\n<!--mini thumbnail popup-->\n<div class=\"thumbroll\">";
371
      print "<a id=\"plus\" href=\"$ThisScript?galerie=$galerie&amp;photo=$snimek";
372
      print "&amp;show_thumbs=yes\"";
373
			print " title=\"" . __('Show Thumbnail Navigation') . "\">";
374
      print "</a>\n";
375
      print "</div>\n";
376
   }
377

  
378
   /* main image + thumbnail navigation (prev/next) */
379

  
380
   if($slideshow) {
381
     print "
355
    }
356
    if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) {
357
      print "<a id=\"zip\" href=\"$gallery_dir/$galerie/zip/hq.zip\">";
358
      print "zip<span /></a>";
359
    }
360
    if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) {
361
      print "<a id=\"zip\" href=\"$gallery_dir/$galerie/zip/hq.tar.bz2\">";
362
      print "zip<span /></a>";
363
    }
364
    print "</ul></div>\n";
365
  } else {
366
    // show the popup button
367
    print "\n<!--mini thumbnail popup-->\n<div class=\"thumbroll\">";
368
    print "<a id=\"plus\" href=\"$ThisScript?galerie=$galerie&amp;photo=$snimek";
369
    print "&amp;show_thumbs=yes\"";
370
    print " title=\"" . __('Show Thumbnail Navigation') . "\">";
371
    print "</a>\n";
372
    print "</div>\n";
373
  }
374

  
375
  /* main image + thumbnail navigation (prev/next) */
376

  
377
  if($slideshow) {
378
    print "
382 379
<div id=\"gallery\" class=\"content\">
383 380
  <div class=\"slideshow-container\">
384 381
   <div id=\"loading\" class=\"loader\"></div>
385 382
   <div id=\"slideshow\" class=\"slideshow\" style=\"height:480;\"></div>
386 383
  </div>
387 384
</div>\n";
388
   }
389
   else {
390
     $picture->renderPreview();
391
     $page->navigation($galerie, $snimek, "prev");
392
     $page->navigation($galerie, $snimek, "next");
393
   }
394
   print "</div>\n"; //end image div
395

  
396

  
397
   if(!$slideshow) {
398
     if (function_exists(exif_read_data)) require("$root/inc/exif.inc.php"); 
399
     /* Image comment
400
	really poor naming here, it is caption.
401
     */
402
     $picture->renderCaption();
385
  }
386
  else {
387
    $picture->renderPreview();
388
    $page->navigation($galerie, $snimek, "prev");
389
    $page->navigation($galerie, $snimek, "next");
390
  }
391
  print "</div>\n"; //end image div
392

  
393

  
394
  if(!$slideshow) {
395
    if (function_exists(exif_read_data)) require("$root/inc/exif.inc.php"); 
396
    /* Image comment
397
       really poor naming here, it is caption.
398
    */
399
    $picture->renderCaption();
403 400
     
404 401
     
405
     //show page counter
406
     if ($log_access) {
407
       $picture->renderCounter();
408
     }
402
    //show page counter
403
    if ($log_access) {
404
      $picture->renderCounter();
405
    }
409 406
     
410
     $picture->renderBigSize();
407
    $picture->renderBigSize();
411 408
     
412
     $page->user_comments($picture->number);
413
     $page->navigation($galerie, $snimek, null);
414
   }
415
}
409
    $page->user_comments($picture->number);
410
    $page->navigation($galerie, $snimek, null);
411
  }
412
 }
416 413

  
417 414
require("inc/footer.inc.php");
418 415

  
......
430 427
  });
431 428
});
432 429
</script>\n";
433
}
430
 }
434 431

  
435 432
$page->footer();
436 433
?>

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux