';
for ($imageid = 0 ; $imageid < $old_imageid;++$imageid) {
if (isset($imageid)) {
$aktimage = replace_valid_url($imagelist[$imageid]);
$ccount = getKommentarCount($imagelist[$imageid], $twg_album, $kwerte, $kindex);
$b = $beschreibung = getBeschreibung($imagelist[$imageid], $werte, $index);
if (($beschreibung <> " ") && ($beschreibung <> "")) {
$beschreibunga = php_to_all_html_chars(escapeHochkomma($beschreibung));
if ($show_number_of_comments && ($ccount > 0)) {
$beschreibunga .= ' | ' . $lang_comments . ': ' . $ccount;
}
$titel = $beschreibung = 'title="' . $beschreibunga . '"';
$beschreibung .= ' alt="' . $beschreibunga . '"';
} else if ($ccount > 0) {
$beschreibunga = $lang_comments . ': ' . $ccount;
$titel = $beschreibung = 'title="' . $beschreibunga . '"';
$beschreibung .= ' alt="' . $beschreibunga . '"';
} else {
$beschreibung = ' alt="" ';
$titel = '';
}
$href = ' href="'.$_SERVER['PHP_SELF'].'?twg_album='.$album_enc.'&twg_show='.$aktimage . $twg_standalone.'" ';
if ($use_original_on_thumbspage) {
$hreffull = ' href="'.getTWGHttpRoot($install_dir) . 'image.php?twg_album=' .$album_enc. '&twg_show=' .$aktimage. '" ';
} else {
$hreffull = ' href="'.getTWGHttpRoot($install_dir) . 'image.php?twg_album='.$album_enc.'&twg_show='.$aktimage.'&twg_type=small" ';
}
// end of block
printf("
", $imageid, $hreffull, $titel);
}
}
echo '
';
$imageid = $old_imageid;
}
if ($imagelist[0] != "") {
echo "';
for ($imageid = $imageid ; $imageid < count($imagelist);++$imageid) {
$aktimage = replace_valid_url($imagelist[$imageid]);
$ccount = getKommentarCount($imagelist[$imageid], $twg_album, $kwerte, $kindex);
$b = $beschreibung = getBeschreibung($imagelist[$imageid], $werte, $index);
if (($beschreibung <> " ") && ($beschreibung <> "")) {
$beschreibunga = php_to_all_html_chars(escapeHochkomma($beschreibung));
if ($show_number_of_comments && ($ccount > 0)) {
$beschreibunga .= ' | ' . $lang_comments . ': ' . $ccount;
}
$titel = $beschreibung = 'title="' . $beschreibunga . '"';
$beschreibung .= ' alt="' . $beschreibunga . '"';
} else if ($ccount > 0) {
$beschreibunga = $lang_comments . ': ' . $ccount;
$titel = $beschreibung = 'title="' . $beschreibunga . '"';
$beschreibung .= ' alt="' . $beschreibunga . '"';
} else {
$beschreibung = ' alt="" ';
$titel = '';
}
$href = ' href="'.$_SERVER['PHP_SELF'].'?twg_album='.$album_enc.'&twg_show='.$aktimage . $twg_standalone.'" ';
if ($use_original_on_thumbspage) {
$hreffull = ' href="'.getTWGHttpRoot($install_dir) . 'image.php?twg_album=' .$album_enc. '&twg_show=' .$aktimage. '" ';
} else {
$hreffull = ' href="'.getTWGHttpRoot($install_dir) . 'image.php?twg_album='.$album_enc.'&twg_show='.$aktimage.'&twg_type=small" ';
}
// end of block
printf("
", $imageid, $hreffull, $titel);
}
echo '
';
$imageid = $old_imageid;
}
$_SESSION["twg_minus_rows"] = $minus_rows; // stored for offset needed in details page
$thumbnails = $thumbnails_x * $thumbnails_y ;
$actpage = 0;
// start 1 | 2 |3 ...
$showpaging = count($imagelist) > $thumbnails;
if ($paging_use_style && $showpaging) {
echo '";
}
if ($showpaging) {
if ($twg_offset > 0) {
$hreflast = $_SERVER['PHP_SELF'] . '?twg_album='.$album_enc.'&twg_offset=' . ($twg_offset - $thumbnails) . $twg_standalone;
$hreflastjs = $_SERVER['PHP_SELF'] . '?twg_album='.$album_enc.'&twg_offset=' . ($twg_offset - $thumbnails) . $twg_standalonejs;
echo '';
printf("
%s ", $hreflast , $lang_thumb_back);
print $spacer_char;
} else {
echo "
" . $lang_thumb_back . " ";
}
$numpages = ceil(count($imagelist) / ($thumbnails));
if ($numpages <= $paging_steps) { // we show all
$paging_num = $paging_steps;
}
if ($numpages <= 25) { // 10 Schritte
$paging_steps = ceil($paging_steps/2);
}
for($i = 0; $i < $numpages ; $i++) {
$twg_offset_ = $i * ($thumbnails);
$trenner = false;
if ($twg_offset >= $twg_offset_ && $twg_offset < $twg_offset_+$thumbnails) {
$actpage = $i;
echo "
" . ($i + 1) . "";
$trenner = true;
} else {
if ( (abs($twg_offset - $twg_offset_) < ($paging_num * $thumbnails)) || ($i == $numpages-1) || ($i == 0) || (($i % $paging_steps) == $paging_steps-1)) {
printf("
%s", $_SERVER['PHP_SELF'], $album_enc, $twg_offset_, $twg_standalone, $i + 1);
$trenner = true;
}
}
if ($trenner && $actpage != $numpages - 1) {
echo $spacer_char;
}
}
if ($actpage != $numpages - 1) {
$hrefnext = $_SERVER['PHP_SELF'] . '?twg_album='.$album_enc.'&twg_offset='. ($twg_offset + $thumbnails) . $twg_standalone;
$hrefnextjs = $_SERVER['PHP_SELF'] . '?twg_album='.$album_enc.'&twg_offset='. ($twg_offset + $thumbnails) . $twg_standalonejs;
echo '';
printf("
%s ", $hrefnext , $lang_thumb_forward);
} else {
echo "
" . $lang_thumb_forward . " ";
}
}
if ($paging_use_style && $showpaging) {
echo "
";
}
// ende 1 | 2 |3 ...
if (!$show_subdirs_first) {
show_folders($path, $twg_foffset, $twg_offset, $twg_album);
}
$preload = "";
for($p = 0; $p < $thumbnails && ($imageid < $total); $p++) {
$aktimage = replace_valid_url($imagelist[$imageid]);
$thumbimage = create_thumb_image($twg_album, $aktimage);
$thumb = create_cache_file($thumbimage,$extension_thumb);
$ccount = getKommentarCount($imagelist[$imageid], $twg_album, $kwerte, $kindex);
if (!file_exists($thumb) || $disable_direct_thumbs_access) {
$preload .= "'" . $install_dir . "image.php?twg_album=" . $album_enc . "&twg_type=thumb&twg_show=" . $aktimage . "'";
} else {
$preload .= "'" . create_cache_file(cacheencode($thumbimage),$extension_thumb,true) . "'";
}
$preload .= ",";
$imageid++;
}
if ($preload <> "") {
$preload = substr($preload, 0, -1);
echo "";
}
}
function print_album_tree($basedir)
{
global $album_tree_width, $autoclose_tree, $album_tree_default_open;
global $lang_galleries,$show_counter_in_jstree, $multi_root_mode;
global $lang_open_all, $lang_close_all,$lang_refresh_album_cache;
global $install_dir, $twg_album, $opera, $twg_root,$twg_standalonejs;
$path = $basedir . "/" . $twg_album;
$rootalbum = '';
if ($multi_root_mode && $twg_album) {
$elements = explode ("/", $twg_album);
$basedir = $basedir . '/' . $elements[0];
$rootalbum = 'twg_album=' . urlencode($elements[0]);
}
if ($album_tree_default_open) {
$display = "";
} else {
$display = "display:none;";
}
if ($autoclose_tree) {
$icon = "autohideOn.png";
} else {
$icon = "autohideOff.png";
}
echo "
";
}
/*
escapes the caption -