summaryrefslogtreecommitdiffstats
path: root/localplay.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-14 07:04:26 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-09-14 07:04:26 +0000
commitd1dcfcbc903153007fff2c155248046ecfbdc76a (patch)
tree400ed80dd1ce436818c893bb5f53d4b9d95443ec /localplay.php
parentf2f82cae3114683dd230328a4638b8cb35b46c3b (diff)
downloadampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.tar.gz
ampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.tar.bz2
ampache-d1dcfcbc903153007fff2c155248046ecfbdc76a.zip
some fixes for the localplay, you can now install the MPD controller, and add instances, just not actually play to it... realized I need to think on how to do that a little...
Diffstat (limited to 'localplay.php')
-rw-r--r--localplay.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/localplay.php b/localplay.php
index 4cc0b094..c808270c 100644
--- a/localplay.php
+++ b/localplay.php
@@ -23,12 +23,29 @@ require 'lib/init.php';
show_header();
+// Check to see if we've got the rights to be here
+if (!Config::get('allow_localplay_playback') || !$GLOBALS['user']->has_access('25')) {
+ access_denied();
+}
+
+
switch ($_REQUEST['action']) {
case 'show_add_instance':
+ // This requires 50 or better
+ if (!$GLOBALS['user']->has_access('50')) { access_denied(); break; }
+
+ // Get the current localplay fields
+ $localplay = new Localplay($GLOBALS['user']->prefs['localplay_controller']);
+ $fields = $localplay->get_instance_fields();
require_once Config::get('prefix') . '/templates/show_localplay_add_instance.inc.php';
break;
case 'add_instance':
-
+ // This requires 50 or better!
+ if (!$GLOBALS['user']->has_access('50')) { access_denied(); break; }
+
+ // Setup the object
+ $localplay = new Localplay($GLOBALS['user']->prefs['localplay_controller']);
+ $localplay->add_instance($_POST);
break;
case 'delete_song':
$song_id = scrub_in($_REQUEST['song_id']);