예제 #1
0
             break;
         default:
             exit;
     }
     // end switch on button
     ob_start();
     $_SESSION['state']['sidebar_tab'] = $button;
     require_once AmpConfig::get('prefix') . '/templates/sidebar.inc.php';
     $results['sidebar'] = ob_get_contents();
     ob_end_clean();
     break;
 case 'shoutbox':
     ob_start();
     $since = $_REQUEST['since'];
     if ($since) {
         $shouts = Shoutbox::get_shouts_since(intval($since / 1000));
         echo "<script language='javascript' type='text/javascript'>";
         foreach ($shouts as $id) {
             $shout = new Shoutbox($id);
             echo "noty({text: '" . addslashes($shout->get_display(true)) . "',\n                    type: 'alert', layout: 'bottomRight',\n                    template: '<div class=\"noty_message noty_ampache\"><span class=\"noty_text noty_ampache\"></span><div class=\"noty_close noty_ampache\"></div></div>',\n                });";
         }
         echo "</script>";
     }
     $results['live_shoutbox'] = ob_get_clean();
     break;
 case 'start_channel':
     if (Access::check('interface', '75')) {
         ob_start();
         $channel = new Channel($_REQUEST['id']);
         if ($channel->id) {
             if ($channel->check_channel()) {