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)
{
HTML_AJAX.grab(encodeURI('rpc.php?action=reset'));
clearSearch();
+ refreshAvailableTags();
+ refreshSelectedTags();
+ refreshPhotoIndex();
}
var startup = 1;