issue55, PHPFSPOT_IMG can now display a random selected photo
[phpfspot.git] / phpfspot.js
index 5aac78800011fd5c8008dec6e295fda099531361..9e1a932431923d2d9303628d53fc0826da72aecc 100644 (file)
@@ -113,6 +113,9 @@ function startSearch()
       request = request + '&from='+ from +'&to='+ to;
    }
 
+   var sort_order = document.getElementsByName('sort_order')[0];
+   request = request + '&sort_order='+ sort_order.options[sort_order.selectedIndex].value;
+
    HTML_AJAX.grab(encodeURI(request));
 
    refreshAvailableTags();
@@ -297,6 +300,19 @@ function preloadPhotos(lbImg) {
    }
 }
 
+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 = '';