diff options
Diffstat (limited to 'phpfspot.js')
-rw-r--r-- | phpfspot.js | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/phpfspot.js b/phpfspot.js index bd2baf3..d54f8b5 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -137,19 +137,34 @@ function clearSearch() document.getElementsByName('searchfor')[0].value = ''; } +function AskServerWhatToDo() +{ + return HTML_AJAX.grab(encodeURI('rpc.php?action=what_to_do')); +} + function init_phpfspot() { refreshAvailableTags(); - if(photo = getPhotoToShow()) { - showImage(photo) - refreshSelectedTags(); + whattodo = AskServerWhatToDo(); + + if(whattodo == 'showpi') { + showPhotoIndex(); } - else { + if(whattodo == 'showpi_tags') { if(refreshSelectedTags()) { showPhotoIndex(); } } + if(whattodo == 'showpi_date') { + showPhotoIndex(); + } + if(whattodo == 'show_photo') { + if(photo = getPhotoToShow()) { + showImage(photo) + refreshSelectedTags(); + } + } } function setBackGrdColor(item, color) |