$this->tmpl->show("export.tpl");
return;
break;
+ case 'slideshow':
+ $this->tmpl->show("slideshow.tpl");
+ return;
+ break;
}
$this->tmpl->assign('from_date', $this->get_calendar('from'));
}
$export_link = "index.php?mode=export";
+ $slideshow_link = "index.php?mode=slideshow";
$this->tmpl->assign('extern_link', $extern_link);
+ $this->tmpl->assign('slideshow_link', $slideshow_link);
$this->tmpl->assign('export_link', $export_link);
$this->tmpl->assign('count', $count);
$this->tmpl->assign('width', $this->cfg->thumb_width);
}
} // get_sort_order()
+
+ public function getNextSlideShowImage()
+ {
+ $all_photos = $this->getPhotoSelection();
+
+ if(!isset($_SESSION['slideshow_img']) || $_SESSION['slideshow_img'] == count($all_photos)-1)
+ $_SESSION['slideshow_img'] = 0;
+ else
+ $_SESSION['slideshow_img']++;
+
+ $server_name = $_SERVER['SERVER_NAME'];
+ if(!isset($_SERVER['HTTPS'])) $protocol = "http";
+ else $protocol = "https";
+
+ return $protocol ."://". $server_name . $this->cfg->web_path ."phpfspot_img.php?idx=". $all_photos[$_SESSION['slideshow_img']] ."&width=". $this->cfg->photo_width;
+
+ } // getNextSlideShowImage()
+
+ public function resetSlideShow()
+ {
+ if(isset($_SESSION['slideshow_img']))
+ unset($_SESSION['slideshow_img']);
+ } // resetSlideShow()
}
?>
}
}
+function startSlideShow()
+{
+ HTML_AJAX.grab(encodeURI('rpc.php?action=reset_slideshow'));
+ nextSlide();
+}
+
+function nextSlide()
+{
+ next_img = HTML_AJAX.grab(encodeURI('rpc.php?action=get_next_slideshow_img'));
+ document.getElementById('slide_img').src = next_img;
+ setTimeout("nextSlide()", 3000);
+}
+
var startup = 1;
var calendar_shown = 0;
var calendar_mode = '';
print $fspot->whatToDo();
break;
+ case 'reset_slideshow':
+ print $fspot->resetSlideShow();
+ break;
+
+ case 'get_next_slideshow_img':
+ print $fspot->getNextSlideShowImage();
+ break;
+
}
} // process_ajax_request();