예제 #1
0
     break;
 case 'stop_channel':
     if (Access::check('interface', '75')) {
         ob_start();
         $channel = new Channel($_REQUEST['id']);
         if ($channel->id) {
             $channel->stop_channel();
             sleep(1);
             echo $channel->get_channel_state();
         }
         $results['channel_state_' . $_REQUEST['id']] = ob_get_clean();
     }
     break;
 case 'slideshow':
     ob_start();
     $images = Slideshow::get_current_slideshow();
     if (count($images) > 0) {
         $fsname = 'fslider_' . time();
         echo "<div id='" . $fsname . "'>";
         foreach ($images as $image) {
             echo "<img src='" . $image['url'] . "' alt='' onclick='update_action();' />";
         }
         echo "</div>";
         $results['fslider'] = ob_get_clean();
         ob_start();
         echo "<script language='javascript' type='text/javascript'>";
         echo "\$('#" . $fsname . "').rhinoslider({\n                    showTime: 15000,\n                    effectTime: 2000,\n                    randomOrder: true,\n                    controlsPlayPause: false,\n                    autoPlay: true,\n                    showBullets: 'never',\n                    showControls: 'always',\n                    controlsMousewheel: false,\n            });";
         echo "</script>";
     }
     $results['fslider_script'] = ob_get_clean();
     break;