Esempio n. 1
0
     if (!Core::form_verify('create_democratic')) {
         UI::access_denied();
         exit;
     }
     $democratic = Democratic::get_current_playlist();
     // If we don't have anything currently create something
     if (!$democratic->id) {
         // Create the playlist
         Democratic::create($_POST);
         $democratic = Democratic::get_current_playlist();
     } else {
         $democratic->update($_POST);
     }
     // Now check for additional things we might have to do
     if ($_POST['force_democratic']) {
         Democratic::set_user_preferences();
     }
     header("Location: " . AmpConfig::get('web_path') . "/democratic.php?action=show");
     break;
 case 'manage_playlists':
     if (!Access::check('interface', '75')) {
         UI::access_denied();
         break;
     }
     // Get all of the non-user playlists
     $playlists = Democratic::get_playlists();
     require_once AmpConfig::get('prefix') . UI::find_template('show_manage_democratic.inc.php');
     break;
 case 'show_playlist':
 default:
     $democratic = Democratic::get_current_playlist();