From b50897cb0fdf0d42d306b20b8e38f19f8e2832e3 Mon Sep 17 00:00:00 2001
From: jimmacfx ";
- echo $galeriename[$foldername];
- echo "";
+ print " href=\"$ThisScript?galerie=$foldername\">";
+ print $galeriename[$foldername];
+ print "";
} else {
- echo " href=\"$ThisScript?galerie=$foldername\">$foldername";
+ print " href=\"$ThisScript?galerie=$foldername\">$foldername";
}
if (@$galeriedesc[$foldername]) {
- echo "" . $galeriedesc[$foldername];
- echo "\n";
+ print "" . $galeriedesc[$foldername];
+ print "\n";
}
if (@$galerieauthor[$foldername]) {
- echo " \n";
+ print " \n";
}
if (@$galerieday[$foldername]) {
- echo "";
- echo "$monthname " . $galerieday[$foldername];
- echo "\n";
+ print "";
+ print "$monthname " . $galerieday[$foldername];
+ print "\n";
}
- echo " \n";
+ print " \n";
$path = "$gallery_dir/$galerie/thumbs";
$imgfiles = new SortDir($path);
check($galerie); // check for nasty input
@@ -316,223 +237,166 @@ if (!$galerie) {
} else
$title = "Photo ${x[1]}";
- echo " ";
- echo "";
+ print "";
- echo "\n";
+ print " src=\"$thumb\" ";
+ print "alt=\"photo No. ${x[1]}\" />";
+ print "
';
- $comment_data = stripslashes(strip_tags($comment_data,$allowedTags));
- // thanks google:
- // http://www.google.com/googleblog/2005/01/preventing-comment-spam.html
- $comment_data = eregi_replace("error( __('No comment spam'), __('Your comment includes blacklisted word') . __('No comment spam') );
- $page->footer();
- exit; //stop everything
- }
- }
-
- if ($comment_kolacek!=md5($comment_spamcheck)) {
- $page->error( __('No comment spam'), __('You ve written the check number wrong' ) );
- $page->footer();
- exit; //stop everything
- }
-
- if (!$comment_name) {
- $comment_name = $_COOKIE["username"];
- }
-
- // ok so we got a comment
- if ($comment_name && $save_comment_name) {
- // save out name in a cookie
- if (!setcookie("username","$comment_name",
- mktime(0, 0, 0, 12, 30, 2030))) {
- print __('Could not set name cookie!');
- exit;
- }
- }
-
- // create a user_comment file if not existant or append to it
- if (is_writable("$root/$gallery_dir/$galerie/comments")) { // needs perms
- $comment = "$root/$gallery_dir/$galerie/comments/user_$snimek.txt";
- $fh = fopen("$comment", "a");
-
- if (!$comment_name) {
- $comment_name = __('Anonymous');
- }
- if (!fwrite($fh, "$year
\n";
- echo "";
+ print "$year
\n";
+ print "";
}
$month=$galeriemonth["$foldername"];
# now months
if (@$thismonth!=$month) {
#first one
- if (@$thismonth) { echo " $monthname
\n";
+ print " $monthname
\n";
}
#galleries within month
if ($galerielogin[$foldername]) {
- echo "
"; - echo ""; - echo $galeriedesc[$galerie] . "
\n"; + print ""; + print ""; + print $galeriedesc[$galerie] . "
\n"; } if ($galerieauthor[$galerie]) { - echo "Author: "; - echo ""; - echo $galerieauthor[$galerie] . "
\n"; + print "Author: "; + print ""; + print $galerieauthor[$galerie] . "
\n"; } - echo "\n"; + print "\n
\n"; if (file_exists("$gallery_dir/$galerie/zip/mq.zip")) { - echo "[ " . __('zipped MQ images') . " ] "; + print "[ " . __('zipped MQ images') . " ] "; } if (file_exists("$gallery_dir/$galerie/zip/mq.tar.bz2")) { - echo "[ " . __('MQ images tarball') . " ] "; + print "[ " . __('MQ images tarball') . " ] "; } if (file_exists("$gallery_dir/$galerie/zip/hq.zip")) { - echo "[ " . __('zipped HQ images') . " ]"; + print "[ " . __('zipped HQ images') . " ]"; } if (file_exists("$gallery_dir/$galerie/zip/hq.tar.bz2")) { - echo "[ " . __('HQ images tarball') . " ]"; + print "[ " . __('HQ images tarball') . " ]"; } - echo "
"; + print ""; ####################### # Individual Image # ####################### } else { //low-res image # finish off header - echo "\n > "; + print "\n > "; if ($galeriename[$galerie]) { - echo $galeriename[$galerie]; + print $galeriename[$galerie]; } else { - echo $galerie; + print $galerie; } - echo "\n > Photo"; - echo " $snimek"; + print "\n > Photo"; + print " $snimek"; $path = "$gallery_dir/$galerie/thumbs"; $imgfiles = new SortDir("$path"); check($galerie); $path = "$gallery_dir/$galerie/lq"; $file = "$path/img-$snimek.jpg"; if (!file_exists($file)) { - echo __('No such image'); + print __('No such image'); $page->footer(); exit; } - $imgsize = getimagesize("$root/$file"); - /* - navigation($galerie, $snimek, null); - */ + + if (!$picture) { //picture may have been created if commentform submitted + require_once("$root/inc/photo.class.inc.php"); + $picture = new C_photo($file, $snimek); + } // mini thumbnail roll if ($show_thumbs) { - echo "\n\n