Пример #1
0
     } 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();
     if (!$democratic->id) {
         require_once AmpConfig::get('prefix') . UI::find_template('show_democratic.inc.php');
         break;
     }
     $democratic->set_parent();
     $democratic->format();
     require_once AmpConfig::get('prefix') . UI::find_template('show_democratic.inc.php');
     $objects = $democratic->get_items();
     Song::build_cache($democratic->object_ids);
     Democratic::build_vote_cache($democratic->vote_ids);