";
print_next_last_pics($twg_album, $image, $thumb_pic_size, "left");
echo "
| ";
} else if ($imagetext && $image_txt_position == "side") {
echo "| ";
includeImagepageDescription($basedir . "/" . $twg_album);
echo " |
| ";
}
}
$linkfilename = $basedir . "/" . $twg_album . "/link.txt";
$videofolder = false;
// we enable or disable the download of images or link to a location!
if (file_exists($linkfilename)) { // link file exists !!!
$dateilink = fopen($linkfilename, "r");
$download1 = trim(fgets($dateilink, filesize($linkfilename)+1));
$download2 = "";
fclose($dateilink);
} else if ($enable_download) {
if ($open_download_in_new_window && !$video_dir) {
$target = " target='_blank' ";
} else {
$target = "";
}
$zip_found = false;
if ($enable_download_as_zip) {
$zipfile = $basedir . "/" . $twg_album . "/" . str_replace("/", "_", $twg_album) . ".zip";
$zipfile2 = $basedir . "/" . $twg_album . "/" . str_replace("/", "_", $twg_album) . ".txt";
if ((file_exists($zipfile) || file_exists($zipfile2)) && $twg_download != 'single') { // && $twg_download != 'single') { // hard for dhtml !
$target = "";
$download1 = "";
$download2 = "";
$zip_found = true;
}
}
$other = false;
if (!$zip_found) {
$other_format = removeExtension($basedir . "/" . $twg_album . "/" . urldecode($image));
if (file_exists($other_format)) { // check for 123.swf.jpg -> 123.swf
$other_format = twg_urlencode($other_format);
$download1 = '';
$download2 = "";
$other = true;
} else {
foreach($other_file_formats as $label => $key) {
$other_format = exchangeExtension($basedir . "/" . $twg_album . "/" . urldecode($image), $label);
if (file_exists($other_format)) {
if (filesize($other_format) > 0) {
$other_format = twg_urlencode($other_format);
$download1 = '';
$download2 = "";
$other = true;
} else if ($video_flash_site != "" && $video_player == "MP3") {
$other_format = $video_flash_site . removePrefix(exchangeExtension(urldecode($image), "mp3"));
$download1 = '';
$download2 = "";
$other = true;
}
}
}
}
if ($video_flash_site != "" && $video_player == "MP3") {
$other_format = $video_flash_site . removePrefix(exchangeExtension(urldecode($image), "mp3"));
$download1 = '';
$download2 = "";
$other = true;
}
if ($video_flash_site == "http://" && $video_player == "WMP") {
$embedstring = $video_flash_site . urldecode(removeExtension(replace_url_chars(urldecode($image))));
$download1 = '';
$download2 = "";
$other = true;
}
if ($other) {
// everything already done
} else if ($enable_direct_download) {
$remote_image = twg_checkurl($basedir . "/" . $twg_album);
if ($remote_image) {
$image_full = getRemoteImagePath($remote_image, $image);
} else {
if ($twg_album) {
$image_full = $basedir . "/" . $twg_album . "/" . urldecode($image);
}else {
$image_full = $basedir . "/" . urldecode($image);
}
$image_full = twg_urlencode($image_full);
}
$image_full = getTWGHttpRoot($install_dir) . $image_full;
// TODO: duplicate block see else - refactor if time!
$onclick = "";
if ($open_as_popup) {
$onclick = " onclick='javascript:return openImage(\"".$install_dir."\");' ";
}
if ($activate_lightbox_image && !$default_is_fullscreen && !$use_lytebox) {
$lb_image = " rel='lightbox' ";
if ($show_captions) {
$lb_image .= " title='" . replacesmilies(php_to_all_html_chars($beschreibung, false)) . "'";
}
} else {
if ($activate_lightbox_image && $use_lytebox ) {
// onclick is overwritten again!
$onclick = " onclick='return startLytebox(".get_image_number($twg_album,$image).");' ";
}
$lb_image = "";
}
// end duplicate
$download1 = '';
$download2 = "";
} else {
if ($open_in_maximized_view && !$default_is_fullscreen) {
$href = getTWGHttpRoot($install_dir) . 'index.php?twg_album='.$album_enc.'&twg_show='.$image_enc.'&&twg_zoom=TRUE';
$open_as_popup = false;
$target = "";
} else {
$href = getTWGHttpRoot($install_dir) . 'image.php?twg_album='.$album_enc.'&twg_show='. $image_enc;
$hrefjs = getTWGHttpRoot($install_dir) . 'image.php?twg_album='.$album_enc.'&twg_show='.$image;
}
// TODO: duplicate block see else - refactor if time!
$onclick = "";
if ($open_as_popup) {
$onclick = " onclick='javascript:return openImage(\"".$install_dir."\");' ";
}
if ($activate_lightbox_image && !$default_is_fullscreen && !$use_lytebox) {
$lb_image = " rel='lightbox' ";
if ($show_captions) {
$lb_image .= " title='" . replacesmilies(php_to_all_html_chars($beschreibung, false)) . "'";
}
} else {
if ($activate_lightbox_image && $use_lytebox ) {
// onclick is overwritten again!
$onclick = " onclick='return startLytebox(".get_image_number($twg_album,$image).");' ";
}
$lb_image = "";
}
// end duplicate
$download1 = '';
$download2 = "";
}
}
} else {
$download1 = "";
$download2 = "";
}
if ($default_is_fullscreen) {
$type = "fullscreen";
} else {
$type = "small";
}
if ($center_cmotiongal_over_image && !$show_thumbs_as_text) {
$jscenter = " onMouseOver='if (window.centerGalLater) centerGalLater();' ";
} else {
$jscenter = "";
}
if ($use_small_pic_size_as_height) { // fast way to get the height
if ($enable_drop_shadow) {
$tdheight = "style='height:" . ($small_pic_size + 24) . "px;' ";
} else {
$tdheight = "style='height:" . ($small_pic_size + 6) . "px;' ";
}
} else {
$aktimage = replace_valid_url($image);
$thumbimage = create_thumb_image($twg_album, $aktimage);
$small = create_cache_file($thumbimage,$extension_small);
if ($default_big_navigation!="DHTML" && $default_big_navigation != "FLASH" && (file_exists($small) || $disable_direct_thumbs_access)) {
// get size ....
$smallsize = getimagesize($small);
$pic_size_y = $smallsize[1];
if ($enable_drop_shadow) {
$tdheight = "style='height:" . ($pic_size_y + 24) . "px;' ";
} else {
$tdheight = "style='height:" . ($pic_size_y + 6) . "px;' ";
}
} else if ($show_captions) {
$tdheight = "style='padding-bottom:5px;'";
} else {
$tdheight = '';
}
}
if (!$default_is_fullscreen) {
if ($video_dir && (!$mixed_video_image_content || ($mixed_video_image_content && hasVideoPrefix($image)))) {
// if ($iswindows || $isMac || $video_player == "FLASH" || $video_player == "MP3" || $video_player == "GOOGLE") {
include dirname(__FILE__) . "/videostreaming.inc.php";
// }
} else {
if ($wii && $show_wii_buttons) {
$wiiback = " |  | ";
$wiivor = " | ";
} else {
$wiivor = "";
$wiiback = "";
}
$image_src = $install_dir.'image.php?twg_album='.$album_enc.'&twg_type='.$type.'&twg_show='.$image_enc.'&twg_rot='.$twg_rot;
if ($twg_rot == -1) {
$image_src = opimizeSmallLink($image_src);
}
if ($enable_drop_shadow) {
printf("%s%s  %s |
| %s ", $wiiback, $tdheight, $download1 , $image_src, $beschreibungalt, $jscenter, $download2, $wiivor);
} else {
printf("%s%s  %s | %s ", $wiiback, $tdheight, $download1 , $image_src, $beschreibungalt, $jscenter, $download2, $wiivor);
}
}
if ($default_big_navigation == "HTML_SIDE" && !$top10) {
echo "";
print_next_last_pics($twg_album, $image, $thumb_pic_size, "right");
echo "
| ";
} else if ($imagetext && $image_txt_position == "side") {
echo " | | ";
includeImagepageDescription2($basedir . "/" . $twg_album);
echo " |
|