示例#1
0
         break;
     }
     $localplay = new Localplay(AmpConfig::get('localplay_controller'));
     $instance = $localplay->get_instance($_REQUEST['instance']);
     $fields = $localplay->get_instance_fields();
     require_once AmpConfig::get('prefix') . '/templates/show_localplay_edit_instance.inc.php';
     break;
 case 'show_instances':
     // First build the localplay object and then get the instances
     if (!Access::check('localplay', '5')) {
         UI::access_denied();
         break;
     }
     $localplay = new Localplay(AmpConfig::get('localplay_controller'));
     $instances = $localplay->get_instances();
     $fields = $localplay->get_instance_fields();
     require_once AmpConfig::get('prefix') . '/templates/show_localplay_instances.inc.php';
     break;
 case 'show_playlist':
 default:
     if (!Access::check('localplay', '5')) {
         UI::access_denied();
         break;
     }
     // Init and then connect to our localplay instance
     $localplay = new Localplay(AmpConfig::get('localplay_controller'));
     $localplay->connect();
     // Pull the current playlist and require the template
     $objects = $localplay->get();
     require_once AmpConfig::get('prefix') . '/templates/show_localplay_status.inc.php';
     break;