summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f95833e)
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
if(!in_array($tag, $_SESSION['selected_tags']))
array_push($_SESSION['selected_tags'], $tag);
if(!in_array($tag, $_SESSION['selected_tags']))
array_push($_SESSION['selected_tags'], $tag);
sort($_SESSION['selected_tags']);
}
sort($_SESSION['selected_tags']);
}
{
$_SESSION['tag_condition'] = $mode;
{
$_SESSION['tag_condition'] = $mode;
} // setTagCondition()
/**
} // setTagCondition()
/**
function Tags(mode, id)
{
function Tags(mode, id)
{
+ var objTemp = new Object();
+
- // add the tag to users session
- HTML_AJAX.grab(encodeURI('rpc.php?action=addtag&id=' + id));
+ // add tag to users session
+ objTemp['action'] = 'addtag';
+ objTemp['id'] = id;
}
else if(mode == "del") {
}
else if(mode == "del") {
- // del the tag from users session
- HTML_AJAX.grab(encodeURI('rpc.php?action=deltag&id=' + id));
+ // del tag from users session
+ objTemp['action'] = 'deltag';
+ objTemp['id'] = id;
}
else if(mode == "condition") {
setCheckedValue(id, id.value);
}
else if(mode == "condition") {
setCheckedValue(id, id.value);
- HTML_AJAX.grab(encodeURI('rpc.php?action=tagcondition&mode=' + id.value));
+ objTemp['action'] = 'tagcondition';
+ objTemp['mode'] = id.value;
- refreshAvailableTags();
- refreshSelectedTags();
- refreshPhotoIndex();
+ var retr = HTML_AJAX.post('rpc.php', objTemp);
+ if(retr == "ok") {
+ refreshAvailableTags();
+ refreshSelectedTags();
+ refreshPhotoIndex();
+ }
+ else {
+ window.alert(retr);
+ }
function refreshAvailableTags()
{
function refreshAvailableTags()
{
to_day = document.getElementById('today').value;
to = to_year +"-"+ to_month +"-"+ to_day;
to_day = document.getElementById('today').value;
to = to_year +"-"+ to_month +"-"+ to_day;
- // Create object with values of the form
var objTemp = new Object();
objTemp['action'] = 'search';
var objTemp = new Object();
objTemp['action'] = 'search';
- if(isset($_GET['id']) && is_numeric($_GET['id'])) {
- $fspot->addTag($_GET['id']);
+ if(isset($_POST['id']) && is_numeric($_POST['id'])) {
+ print $fspot->addTag($_POST['id']);
- if(isset($_GET['id']) && is_numeric($_GET['id'])) {
- $fspot->delTag($_GET['id']);
+ if(isset($_POST['id']) && is_numeric($_POST['id'])) {
+ print $fspot->delTag($_POST['id']);
break;
case 'tagcondition':
break;
case 'tagcondition':
- if(isset($_GET['mode']) && in_array($_GET['mode'], Array('or', 'and'))) {
- $fspot->setTagCondition($_GET['mode']);
+ if(isset($_POST['mode']) && in_array($_POST['mode'], Array('or', 'and'))) {
+ print $fspot->setTagCondition($_POST['mode']);