diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-23 08:00:34 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-10-23 08:00:34 +0000 |
commit | f283e4040e0dea301c94278470515ca6472af8c2 (patch) | |
tree | 72ddc03245026420fe128c5cd149fa9fa8103d80 /server | |
parent | 2faea5f7b345ba0d9319d4466261b52c7bff0325 (diff) | |
download | ampache-f283e4040e0dea301c94278470515ca6472af8c2.tar.gz ampache-f283e4040e0dea301c94278470515ca6472af8c2.tar.bz2 ampache-f283e4040e0dea301c94278470515ca6472af8c2.zip |
few more tweaks and some work on the tv pages
Diffstat (limited to 'server')
-rw-r--r-- | server/ajax.server.php | 21 | ||||
-rw-r--r-- | server/xml.server.php | 2 |
2 files changed, 21 insertions, 2 deletions
diff --git a/server/ajax.server.php b/server/ajax.server.php index ee3578d5..5c173b10 100644 --- a/server/ajax.server.php +++ b/server/ajax.server.php @@ -34,7 +34,9 @@ $GLOBALS['user'] = new User($_REQUEST['user_id']); $action = scrub_in($_REQUEST['action']); /* Set the correct headers */ -header("Content-type: application/xhtml+xml"); +header("Content-type: text/xml; charset=utf-8"); +header("Content-Disposition: attachment; filename=ajax.xml"); +header("Cache-Control: no-cache"); switch ($action) { /* Controls Localplay */ @@ -112,6 +114,23 @@ switch ($action) { $xml_doc = xml_from_array($results); echo $xml_doc; break; + case 'tv_activate': + if (!$GLOBALS['user']->has_access(100)) { break; } + $tmp_playlist = new tmpPlaylist(); + /* Pull in the info we need */ + $base_id = scrub_in($_REQUEST['playlist_id']); + + /* create the playlist */ + $playlist_id = $tmp_playlist->create('0','vote','song',$base_id); + + $playlist = new tmpPlaylist($playlist_id); + ob_start(); + require_once(conf('prefix') . '/templates/show_tv_adminctl.inc.php'); + $results['tv_control'] = ob_get_contents(); + ob_end_clean(); + $xml_doc = xml_from_array($results); + echo $xml_doc; + break; default: echo "Default Action"; break; diff --git a/server/xml.server.php b/server/xml.server.php index 7ce510fa..352175d0 100644 --- a/server/xml.server.php +++ b/server/xml.server.php @@ -38,7 +38,7 @@ $GLOBALS['user'] = new User($_REQUEST['user_id']); $action = scrub_in($_REQUEST['action']); /* Set the correct headers */ -header("Content-type: application/xhtml+xml"); +header("Content-type: text/xml; charset=utf-8"); switch ($action) { /* Returns an array of artist information */ |