(count($imagelist)-2)) {
$stopgal = count($imagelist);
$startgal = $stopgal - $cmotion_gallery_limit;
if ($startgal < 0) $startgal = 0;
}
$displayFlash = false;
if ($default_big_navigation=="FLASH" && $show_strip) {
$show_strip = false;
$displayFlash = true;
$cmotion_gallery_limit = 10000;
$startgal = 0;
$stopgal = 10000;
$_SESSION['TWG_CURRENT_DIR'] = $twg_album;
$xmlfile = $install_dir . create_cache_file( md5($twg_album) , 'flash.tmp.xml');
$flashxml = file_exists($xmlfile) ? '&twg_data=' . $xmlfile : '&twg_init=' . $xmlfile;
$flash_border_color_data = ($flash_border_color != '') ? '&twg_border_color=' . $flash_border_color : '';
// we include the flash!
echo 'The flash requires at least Flash 8.
Please get it here.';
echo '';
}
$num_twg_shown_images = $stopgal - $startgal;
if ($show_strip) {
echo "
";
// Modified Code for XHTML Doctypes in Firefox
if ($msie){ // For IE
echo '
';
}
else{ // For FF
echo '
';
}
$thumbimage = create_thumb_image($twg_album, $imagelist[0]);
$thumb = create_cache_file($thumbimage,$extension_thumb);
if (file_exists($thumb) && !$disable_direct_thumbs_access && !$show_clipped_images) {
$size1st = getimagesize($thumb);
$size1stX = $size1st[0];
} else {
$size1stX = $thumb_pic_size;
}
$twg_offset1st = floor(($thumb_pic_size - $size1stX) / 2);
// echo $twg_offset1st;
// $imgtwg_offset = -$twg_offset1st; // we have to add the starting twg_offset!
echo ' ';
if ($startgal > 0) {
$hreflast = $_SERVER['PHP_SELF'] . "?twg_album=" . urlencode($twg_album) . "&twg_dir=back&twg_show=" . $imagelist[$startgal-1] . $twg_standalone;
$hreflastjs = $_SERVER['PHP_SELF'] . "?twg_album=" . urlencode($twg_album) . "&twg_dir=back&twg_show=" . $imagelist[$startgal-1] . $twg_standalonejs;
printf("", $hreflast, $install_dir, $lang_back, $lang_back);
} else {
echo ' ';
$hreflast = "#";
$hreflastjs = "#";
}
echo ' ';
for($i = $startgal; (($i < count($imagelist)) && ($i < $stopgal)) ; $i++) {
$thumbimage = create_thumb_image($twg_album, $imagelist[$i]);
$thumb = create_cache_file($thumbimage,$extension_thumb);
$thumbexists = false;
if (file_exists($thumb)) {
$thumbexists = true;
}
if ($thumbexists && !$disable_direct_thumbs_access && !$show_clipped_images) {
$size = getimagesize($thumb);
$sizeX = $size[0];
$sizeY = $size[1];
} else {
$sizeX = $thumb_pic_size;
$sizeY = $thumb_pic_size;
}
// here we calculate the point how much we have to jump the cmotion gallery forward
if ($i < $current) {
$imgtwg_offset += $sizeX + $space;
}
if ($i == $current) { // the last image!
// echo floor((120 - $sizeX) /2);
$imgtwg_offset += floor(($sizeX / 2) - ($size1stX / 2)) ;
}
// echo $imgtwg_offset;
loadXMLFiles($twg_album);
$beschreibung = getBeschreibung($imagelist[$i], $werte, $index);
$beschreibungtext = $beschreibung;
if (($beschreibung <> " ") && ($beschreibung <> "")) {
$beschreibunga = php_to_all_html_chars(escapeHochkomma($beschreibung));
$beschreibung = "title='" . $beschreibunga . "'";
$beschreibung .= " alt='" . $beschreibunga . "'";
} else {
$beschreibung = " alt='' ";
}
if (($i > ($act_nr - $preloadrange)) && ($i < ($act_nr + $preloadrange))) {
if ($thumbexists && !$disable_direct_thumbs_access) {
// TODO: check if encode is needed !!!!!
$src = create_cache_file(cacheencode($thumbimage),$extension_thumb,true);
} else {
$ccomment = "";
$ccount = getKommentarCount($imagelist[$i], $twg_album, $kwerte, $kindex);
if ($ccount > 0) {
$ccomment = "&twg_comment=" . $ccount; // this is done to cut of the upper right corner to indicate a comment!
}
$src = $install_dir . 'image.php?twg_album=' . urlencode($twg_album) . '&twg_type=thumb&twg_show=' . $imagelist[$i] . $ccomment;
}
if ($show_clipped_images) {
$html_size = ' width=' . $sizeX . ' height=' . $sizeY . ' ';
} else {
$html_size = "";
}
if ($show_thumbs_as_text) {
echo ''.$beschreibungtext.'';
if (($i < count($imagelist)-1) && ($i < $stopgal-1)) {
echo ' | ';
}
} else {
echo ' ';
}
} else {
echo ' ';
}
} // for
// now we create the Array with the imagesources we have to replace!
} // end if ($show_strip) {
echo '';
// we insert the script here because otherwise the function os not known sometimes
echo '
';
if ($show_strip) {
$thumbimage = str_replace("/", "_", $twg_album) . "_" . $imagelist[count($imagelist)-1];
$thumb = create_cache_file($thumbimage,$extension_thumb);
if (file_exists($thumb) && !$disable_direct_thumbs_access && !$show_clipped_images) {
$size1st = getimagesize($thumb);
$size1stX = $size1st[0];
} else {
$size1stX = $thumb_pic_size;
}
// firefox add 2 pixel per image because it dows not calculate
$firefox_fix = 0;
if ($isns) {
$firefox_fix = 2 * ($num_twg_shown_images-1);
}
echo ' ';
if ($stopgal < count($imagelist)) {
$hrefnext = $_SERVER['PHP_SELF'] . "?twg_album=" . urlencode($twg_album) . "&twg_dir=next&twg_show=" . $imagelist[$stopgal] . $twg_standalone ;
$hrefnextjs = $_SERVER['PHP_SELF'] . "?twg_album=" . urlencode($twg_album) . "&twg_dir=next&twg_show=" . $imagelist[$stopgal] . $twg_standalonejs;
printf("", $hrefnext, $install_dir, $lang_forward, $lang_forward);
} else {
echo ' ';
$hrefnext = "#";
$hrefnextjs = "#";
}
if (!$show_thumbs_as_text) {
echo ' ';
}
echo '';
echo ' ';
}
// thin function is need after all the others because we need some content from the php function before!
echo '';
}
?> |