diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2007-07-20 17:59:03 +0000 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2007-07-20 17:59:03 +0000 |
commit | 005562e4a4fb2b37fc6f1d4a8ca4a9c11ab42ed1 (patch) | |
tree | c7b99f7229c044b75c5754dc162c3633528724e4 /phpfspot.class.php | |
parent | 51ab51f6a487cd793e523aebb61ed43c2b7314bf (diff) |
issue46, first slideshow implementation
git-svn-id: file:///var/lib/svn/phpfspot/trunk@225 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r-- | phpfspot.class.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php index 2c3170c..25d144c 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -135,6 +135,10 @@ class PHPFSPOT { $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')); @@ -865,8 +869,10 @@ class PHPFSPOT { } $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); @@ -1651,6 +1657,29 @@ class PHPFSPOT { } } // 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() } ?> |