setCheckedValue(id, id.value);
HTML_AJAX.grab(encodeURI('rpc.php?action=tagcondition&mode=' + id.value));
}
-
+
refreshAvailableTags();
refreshSelectedTags();
refreshPhotoIndex();
// if no tags are currently selected, return false from here
if(selected_tags.innerHTML == "")
return false;
-
+
return true;
}
to = to_year +"-"+ to_month +"-"+ to_day;
HTML_AJAX.grab(encodeURI('rpc.php?action=date_search&from='+ from +'&to='+ to));
-
+
+ clearSearch();
refreshAvailableTags();
refreshSelectedTags();
refreshPhotoIndex();
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;