summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-26 04:42:12 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-26 04:42:12 +0000
commit76f3e77c299854030398c23b0401505b6fca1007 (patch)
treeb50487b005e5eef549c475a8655cb1b18def7197 /server
parent97c78343ae899e59226ecbeb88dc4805b5ddc751 (diff)
downloadampache-76f3e77c299854030398c23b0401505b6fca1007.tar.gz
ampache-76f3e77c299854030398c23b0401505b6fca1007.tar.bz2
ampache-76f3e77c299854030398c23b0401505b6fca1007.zip
last commit for the day...
Diffstat (limited to 'server')
-rw-r--r--server/ajax.server.php4
-rw-r--r--server/flag.ajax.php49
2 files changed, 53 insertions, 0 deletions
diff --git a/server/ajax.server.php b/server/ajax.server.php
index cd71ab83..6f3237c6 100644
--- a/server/ajax.server.php
+++ b/server/ajax.server.php
@@ -37,6 +37,10 @@ header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
switch ($_REQUEST['page']) {
+ case 'flag':
+ require_once Config::get('prefix') . '/server/flag.ajax.php';
+ exit;
+ break;
case 'stats':
require_once Config::get('prefix') . '/server/stats.ajax.php';
exit;
diff --git a/server/flag.ajax.php b/server/flag.ajax.php
new file mode 100644
index 00000000..f06a4db6
--- /dev/null
+++ b/server/flag.ajax.php
@@ -0,0 +1,49 @@
+<?php
+/*
+
+ Copyright (c) 2001 - 2007 Ampache.org
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License v2
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+*/
+
+/**
+ * Sub-Ajax page, requires AJAX_INCLUDE as one
+ */
+if (AJAX_INCLUDE != '1') { exit; }
+
+switch ($_REQUEST['action']) {
+ case 'reject':
+ if (!Access::check('interface','75')) {
+ $results['rfc3514'] = '0x1';
+ break;
+ }
+
+ break;
+ case 'accept':
+ if (!Access::check('interface','75')) {
+ $results['rfc3514'] = '0x1';
+ break;
+ }
+
+ break;
+ default:
+ $results['rfc3514'] = '0x1';
+ break;
+} // switch on action;
+
+// We always do this
+echo xml_from_array($results);
+?>