$this->tmpl->assign('searchfor', $_SESSION['searchfor']);
$this->tmpl->assign('page_title', $this->cfg->page_title);
$this->tmpl->assign('current_condition', $_SESSION['tag_condition']);
+ $this->tmpl->assign('template_path', 'themes/'. $this->cfg->theme_name);
$_SESSION['start_action'] = $_GET['mode'];
$this->tmpl->assign('to_date', $this->get_calendar('to'));
$this->tmpl->assign('sort_field', $this->get_sort_field());
$this->tmpl->assign('content_page', 'welcome.tpl');
- $this->tmpl->assign('template_path', 'themes/'. $this->cfg->theme_name);
$this->tmpl->show("index.tpl");
} // get_sort_order()
+ /***
+ * return the next to be shown slide show image
+ *
+ * this function returns the URL of the next image
+ * in the slideshow sequence.
+ */
public function getNextSlideShowImage()
{
$all_photos = $this->getPhotoSelection();
} // getNextSlideShowImage()
+ /***
+ * return the previous to be shown slide show image
+ *
+ * this function returns the URL of the previous image
+ * in the slideshow sequence.
+ */
+ public function getPrevSlideShowImage()
+ {
+ $all_photos = $this->getPhotoSelection();
+
+ if(!isset($_SESSION['slideshow_img']) || $_SESSION['slideshow_img'] == 0)
+ $_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;
+
+ } // getPrevSlideShowImage()
+
public function resetSlideShow()
{
if(isset($_SESSION['slideshow_img']))
function startSlideShow()
{
- HTML_AJAX.grab(encodeURI('rpc.php?action=reset_slideshow'));
- nextSlide();
- setInterval("nextSlide()", 3000);
+ if(!sliding) {
+ HTML_AJAX.grab(encodeURI('rpc.php?action=reset_slideshow'));
+ nextSlide();
+ sliding = setInterval("nextSlide()", 3000);
+ document.getElementById('stop_ico').src = "resources/32_stop.png";
+ }
+ else {
+ clearInterval(sliding);
+ sliding = 0;
+ document.getElementById('stop_ico').src = "resources/32_play.png";
+ }
}
function nextSlide()
document.getElementById('slide_img').src = next_img;
}
+function prevSlide()
+{
+ prev_img = HTML_AJAX.grab(encodeURI('rpc.php?action=get_prev_slideshow_img'));
+ document.getElementById('slide_img').src = prev_img;
+}
+
+function pauseSlideShow()
+{
+ if(!sliding_paused) {
+ sliding_paused = 1;
+ clearInterval(sliding);
+ document.getElementById('pause_ico').src = "resources/32_play.png";
+ }
+ else {
+ sliding_paused = 0;
+ sliding = setInterval("nextSlide()", 3000);
+ document.getElementById('pause_ico').src = "resources/32_pause.png";
+ }
+}
+
function startAutoBrowse()
{
if(!autobrowse) {
var calendar_shown = 0;
var calendar_mode = '';
var autobrowse = 0;
+var sliding = 0;
+var sliding_paused = 0;
<img id="slide_img" alt="slideshow_img" />
</a>
</div>
+ <div style="margin: 0 auto; padding: 10px;">
+ <a href="javascript:prevSlide();" onclick="click(this);" title="slive to previous photo"><img id="rew_ico" src="resources/32_rew.png" /></a>
+ <a href="javascript:pauseSlideShow();" onclick="click(this);"><img id="pause_ico" src="resources/32_pause.png" /></a>
+ <a href="javascript:startSlideShow();" onclick="click(this);" title="stop and revert slideshow"><img id="stop_ico" src="resources/32_stop.png" /></a>
+ <a href="javascript:nextSlide();" onclick="click(this);" title="slide to next photo"><img id="fwd_ico" src="resources/32_fwd.png" /></a>
+ </div>
</body>
{include file="footer.tpl"}