diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-12 07:36:52 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-11-12 07:36:52 +0000 |
commit | f435ca753c1d6ce8f657c3374ae71daec6daf2be (patch) | |
tree | 47fcefdbfb3b3ffd71c8bc27b35af0255df62e83 /democratic.php | |
parent | 7b303176665062673f07f451ddbf571f8a2c3c80 (diff) | |
download | ampache-f435ca753c1d6ce8f657c3374ae71daec6daf2be.tar.gz ampache-f435ca753c1d6ce8f657c3374ae71daec6daf2be.tar.bz2 ampache-f435ca753c1d6ce8f657c3374ae71daec6daf2be.zip |
more democratic play work, still not working going to need db change to make it work how I want, will do later
Diffstat (limited to 'democratic.php')
-rw-r--r-- | democratic.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/democratic.php b/democratic.php index e14cc17a..abd7ab68 100644 --- a/democratic.php +++ b/democratic.php @@ -31,6 +31,27 @@ show_header(); // Switch on their action switch ($_REQUEST['action']) { + case 'show_create': + if (!$GLOBALS['user']->has_access('75')) { + access_denied(); + break; + } + + // Show the create page + require_once Config::get('prefix') . '/templates/show_create_democratic.inc.php'; + + break; + case 'create': + // Only power users here + if (!$GLOBALS['user']->has_access('75')) { + access_denied(); + break; + } + // Create the playlist + //FIXME: don't use hardcoded id value here, needs db rework to fix this + Democratic::create('-1','vote','song',$_REQUEST['democratic']); + header("Location: " . Config::get('web_path') . "/democratic.php?action=manage_playlists"); + break; case 'create_playlist': /* Only Admins Here */ if (!$GLOBALS['user']->has_access(100)) { @@ -75,6 +96,14 @@ switch ($_REQUEST['action']) { if ($stream_type != 'localplay') { exit; } break; case 'manage_playlists': + if (!$GLOBALS['user']->has_access('75')) { + access_denied(); + break; + } + // Get all of the non-user playlists + $playlists = Democratic::get_playlists(); + + require_once Config::get('prefix') . '/templates/show_manage_democratic.inc.php'; break; case 'update_playlist': |