public static function getDataPointsWithinRange($p_start, $p_end) { $sql = <<<SQL SELECT mount_name, count(*) FROM cc_listener_count AS lc INNER JOIN cc_timestamp AS ts ON (lc.timestamp_id = ts.ID) INNER JOIN cc_mount_name AS mn ON (lc.mount_name_id = mn.ID) WHERE (ts.timestamp >=:p1 AND ts.timestamp <=:p2) group by mount_name SQL; $data = Application_Common_Database::prepareAndExecute($sql, array('p1' => $p_start, 'p2' => $p_end)); $out = array(); foreach ($data as $d) { $jump = intval($d['count'] / 1000); $jump = max(1, $jump); $remainder = $jump == 1 ? 0 : 1; $sql = <<<SQL SELECT * FROM (SELECT lc.id, ts.timestamp, lc.listener_count, mn.mount_name, ROW_NUMBER() OVER (ORDER BY timestamp) as rownum FROM cc_listener_count AS lc INNER JOIN cc_timestamp AS ts ON (lc.timestamp_id = ts.ID) INNER JOIN cc_mount_name AS mn ON (lc.mount_name_id = mn.ID) WHERE (ts.timestamp >=:p1 AND ts.timestamp <= :p2) AND mount_name=:p3) as temp WHERE (temp.rownum%:p4) = :p5; SQL; $result = Application_Common_Database::prepareAndExecute($sql, array('p1' => $p_start, 'p2' => $p_end, 'p3' => $d['mount_name'], 'p4' => $jump, 'p5' => $remainder)); $utcTimezone = new DateTimeZone("UTC"); $displayTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone()); foreach ($result as $r) { $t = new DateTime($r['timestamp'], $utcTimezone); $t->setTimezone($displayTimezone); // tricking javascript so it thinks the server timezone is in UTC $dt = new DateTime($t->format("Y-m-d H:i:s"), $utcTimezone); $r['timestamp'] = $dt->format("U"); $out[$r['mount_name']][] = $r; } } $enabledStreamIds = Application_Model_StreamSetting::getEnabledStreamIds(); $enabledOut = array(); foreach ($enabledStreamIds as $sId) { $sql = "SELECT value FROM cc_stream_setting" . " WHERE keyname = :key"; $result = Application_Common_Database::prepareAndExecute($sql, array('key' => $sId . "_mount"), "single"); $enabledMountPoint = $result["value"]; if (isset($out[$enabledMountPoint])) { $enabledOut[$enabledMountPoint] = $out[$enabledMountPoint]; } else { //TODO fix this hack (here for CC-5254) //all shoutcast streams are automatically put under "shoutcast" mount point. if (isset($out["shoutcast"])) { $enabledOut["shoutcast"] = $out["shoutcast"]; } } } return $enabledOut; }
public function startFrom() { $setting = $this->setting; if (Application_Model_Preference::GetPlanLevel() == 'disabled') { $output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device'); $output_sound_device->setLabel(_('Hardware Audio Output'))->setRequired(false)->setValue($setting['output_sound_device'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper')); if (Application_Model_Preference::GetEnableStreamConf() == "false") { $output_sound_device->setAttrib("readonly", true); } $this->addElement($output_sound_device); $output_types = array("ALSA" => "ALSA", "AO" => "AO", "OSS" => "OSS", "Portaudio" => "Portaudio", "Pulseaudio" => "Pulseaudio"); $output_type = new Zend_Form_Element_Select('output_sound_device_type'); $output_type->setLabel(_("Output Type"))->setMultiOptions($output_types)->setValue($setting['output_sound_device_type'])->setDecorators(array('ViewHelper')); if ($setting['output_sound_device'] != "true") { $output_type->setAttrib("disabled", "disabled"); } $this->addElement($output_type); } $icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata'); $icecast_vorbis_metadata->setLabel(_('Icecast Vorbis Metadata'))->setRequired(false)->setValue($setting['icecast_vorbis_metadata'] == "true" ? 1 : 0)->setDecorators(array('ViewHelper')); if (Application_Model_Preference::GetEnableStreamConf() == "false") { $icecast_vorbis_metadata->setAttrib("readonly", true); } $this->addElement($icecast_vorbis_metadata); $stream_format = new Zend_Form_Element_Radio('streamFormat'); $stream_format->setLabel(_('Stream Label:')); $stream_format->setMultiOptions(array(_("Artist - Title"), _("Show - Artist - Title"), _("Station name - Show name"))); $stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat()); $stream_format->setDecorators(array('ViewHelper')); $this->addElement($stream_format); $offAirMeta = new Zend_Form_Element_Text('offAirMeta'); $offAirMeta->setLabel(_('Off Air Metadata'))->setValue(Application_Model_StreamSetting::getOffAirMeta())->setDecorators(array('ViewHelper')); $this->addElement($offAirMeta); $enable_replay_gain = new Zend_Form_Element_Checkbox("enableReplayGain"); $enable_replay_gain->setLabel(_("Enable Replay Gain"))->setValue(Application_Model_Preference::GetEnableReplayGain())->setDecorators(array('ViewHelper')); $this->addElement($enable_replay_gain); $replay_gain = new Zend_Form_Element_Hidden("replayGainModifier"); $replay_gain->setLabel(_("Replay Gain Modifier"))->setValue(Application_Model_Preference::getReplayGainModifier())->setAttribs(array('style' => "border: 0; color: #f6931f; font-weight: bold;"))->setDecorators(array('ViewHelper')); $this->addElement($replay_gain); }
public function indexAction() { $CC_CONFIG = Config::getConfig(); $request = $this->getRequest(); $baseUrl = Application_Common_OsPath::getBaseDir(); $this->view->headScript()->appendFile($baseUrl . 'js/flot/jquery.flot.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl . 'js/flot/jquery.flot.crosshair.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl . 'js/airtime/listenerstat/listenerstat.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl . 'js/timepicker/jquery.ui.timepicker.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl . 'js/airtime/buttons/buttons.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headScript()->appendFile($baseUrl . 'js/airtime/utilities/utilities.js?' . $CC_CONFIG['airtime_version'], 'text/javascript'); $this->view->headLink()->appendStylesheet($baseUrl . 'css/jquery.ui.timepicker.css?' . $CC_CONFIG['airtime_version']); //default time is the last 24 hours. $now = time(); $from = $request->getParam("from", $now - 24 * 60 * 60); $to = $request->getParam("to", $now); $utcTimezone = new DateTimeZone("UTC"); $displayTimeZone = new DateTimeZone(Application_Model_Preference::GetTimezone()); $start = DateTime::createFromFormat("U", $from, $utcTimezone); $start->setTimezone($displayTimeZone); $end = DateTime::createFromFormat("U", $to, $utcTimezone); $end->setTimezone($displayTimeZone); $form = new Application_Form_DateRange(); $form->populate(array('his_date_start' => $start->format("Y-m-d"), 'his_time_start' => $start->format("H:i"), 'his_date_end' => $end->format("Y-m-d"), 'his_time_end' => $end->format("H:i"))); $errorStatus = Application_Model_StreamSetting::GetAllListenerStatErrors(); Logging::info($errorStatus); $out = array(); foreach ($errorStatus as $v) { $key = explode('_listener_stat_error', $v['keyname']); if ($v['value'] != 'OK') { $v['value'] = _("Please make sure admin user/password is correct on System->Streams page."); } $out[$key[0]] = $v['value']; } $this->view->errorStatus = $out; $this->view->date_form = $form; }
public function isValid($data) { $isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled' ? false : true; $isValid = parent::isValid($data); if (!$isSaas) { $master_harbor_input_port = $data['master_harbor_input_port']; $dj_harbor_input_port = $data['dj_harbor_input_port']; if ($master_harbor_input_port == $dj_harbor_input_port && $master_harbor_input_port != "") { $element = $this->getElement("dj_harbor_input_port"); $element->addError("You cannot use same port as Master DJ port."); } if ($master_harbor_input_port != "") { if (is_numeric($master_harbor_input_port)) { if ($master_harbor_input_port != Application_Model_StreamSetting::getMasterLiveStreamPort()) { $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $res = socket_bind($sock, 0, $master_harbor_input_port); if (!$res) { $element = $this->getElement("master_harbor_input_port"); $element->addError("Port '{$master_harbor_input_port}' is not available."); $isValid = false; } socket_close($sock); } } else { $isValid = false; } } if ($dj_harbor_input_port != "") { if (is_numeric($dj_harbor_input_port)) { if ($dj_harbor_input_port != Application_Model_StreamSetting::getDjLiveStreamPort()) { $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); $res = socket_bind($sock, 0, $dj_harbor_input_port); if (!$res) { $element = $this->getElement("dj_harbor_input_port"); $element->addError("Port '{$dj_harbor_input_port}' is not available."); $isValid = false; } socket_close($sock); } } else { $isValid = false; } } } return $isValid; }
public function updateStreamSettingTableAction() { $request = $this->getRequest(); $data = json_decode($request->getParam("data"), true); foreach ($data as $k => $v) { Application_Model_StreamSetting::SetListenerStatError($k, $v); } }
public function getLiquidsoapStatusAction() { $out = array(); $num_of_stream = intval(Application_Model_Preference::GetNumOfStreams()); for ($i = 1; $i <= $num_of_stream; $i++) { $status = Application_Model_StreamSetting::getLiquidsoapError($i); $status = $status == NULL ? "Problem with Liquidsoap..." : $status; if (!Application_Model_StreamSetting::getStreamEnabled($i)) { $status = "N/A"; } $out[] = array("id" => $i, "status" => $status); } die(json_encode($out)); }
public function updateLiquidsoapStatusAction() { $request = $this->getRequest(); $msg = $request->getParam('msg'); $stream_id = $request->getParam('stream_id'); $boot_time = $request->getParam('boot_time'); Application_Model_StreamSetting::setLiquidsoapError($stream_id, $msg, $boot_time); }
public function getAdminPasswordStatusAction() { $out = array(); for ($i = 1; $i <= 3; $i++) { if (Application_Model_StreamSetting::getAdminPass('s' . $i) == '') { $out["s" . $i] = false; } else { $out["s" . $i] = true; } } $this->_helper->json->sendJson($out); }
public static function GetSystemInfo($returnArray = false, $p_testing = false) { exec('/usr/bin/airtime-check-system --no-color', $output); $output = preg_replace('/\\s+/', ' ', $output); $systemInfoArray = array(); foreach ($output as $key => &$out) { $info = explode('=', $out); if (isset($info[1])) { $key = str_replace(' ', '_', trim($info[0])); $key = strtoupper($key); if ($key == 'WEB_SERVER' || $key == 'CPU' || $key == 'OS' || $key == 'TOTAL_RAM' || $key == 'FREE_RAM' || $key == 'AIRTIME_VERSION' || $key == 'KERNAL_VERSION' || $key == 'MACHINE_ARCHITECTURE' || $key == 'TOTAL_MEMORY_MBYTES' || $key == 'TOTAL_SWAP_MBYTES' || $key == 'PLAYOUT_ENGINE_CPU_PERC') { if ($key == 'AIRTIME_VERSION') { // remove hash tag on the version string $version = explode('+', $info[1]); $systemInfoArray[$key] = $version[0]; } else { $systemInfoArray[$key] = $info[1]; } } } } $outputArray = array(); $outputArray['LIVE_DURATION'] = Application_Model_LiveLog::GetLiveShowDuration($p_testing); $outputArray['SCHEDULED_DURATION'] = Application_Model_LiveLog::GetScheduledDuration($p_testing); $outputArray['SOUNDCLOUD_ENABLED'] = self::GetUploadToSoundcloudOption(); if ($outputArray['SOUNDCLOUD_ENABLED']) { $outputArray['NUM_SOUNDCLOUD_TRACKS_UPLOADED'] = Application_Model_StoredFile::getSoundCloudUploads(); } else { $outputArray['NUM_SOUNDCLOUD_TRACKS_UPLOADED'] = NULL; } $outputArray['STATION_NAME'] = self::GetStationName(); $outputArray['PHONE'] = self::GetPhone(); $outputArray['EMAIL'] = self::GetEmail(); $outputArray['STATION_WEB_SITE'] = self::GetStationWebSite(); $outputArray['STATION_COUNTRY'] = self::GetStationCountry(); $outputArray['STATION_CITY'] = self::GetStationCity(); $outputArray['STATION_DESCRIPTION'] = self::GetStationDescription(); // get web server info if (isset($systemInfoArray["AIRTIME_VERSION_URL"])) { $url = $systemInfoArray["AIRTIME_VERSION_URL"]; $index = strpos($url, '/api/'); $url = substr($url, 0, $index); $headerInfo = get_headers(trim($url), 1); $outputArray['WEB_SERVER'] = $headerInfo['Server'][0]; } $outputArray['NUM_OF_USERS'] = Application_Model_User::getUserCount(); $outputArray['NUM_OF_SONGS'] = Application_Model_StoredFile::getFileCount(); $outputArray['NUM_OF_PLAYLISTS'] = Application_Model_Playlist::getPlaylistCount(); $outputArray['NUM_OF_SCHEDULED_PLAYLISTS'] = Application_Model_Schedule::getSchduledPlaylistCount(); $outputArray['NUM_OF_PAST_SHOWS'] = Application_Model_ShowInstance::GetShowInstanceCount(gmdate("Y-m-d H:i:s")); $outputArray['UNIQUE_ID'] = self::GetUniqueId(); $outputArray['SAAS'] = self::GetPlanLevel(); if ($outputArray['SAAS'] != 'disabled') { $outputArray['TRIAL_END_DATE'] = self::GetTrialEndingDate(); } else { $outputArray['TRIAL_END_DATE'] = NULL; } $outputArray['INSTALL_METHOD'] = self::GetInstallMethod(); $outputArray['NUM_OF_STREAMS'] = self::GetNumOfStreams(); $outputArray['STREAM_INFO'] = Application_Model_StreamSetting::getStreamInfoForDataCollection(); $outputArray = array_merge($systemInfoArray, $outputArray); $outputString = "\n"; foreach ($outputArray as $key => $out) { if ($key == 'TRIAL_END_DATE' && ($out != '' || $out != 'NULL')) { continue; } if ($key == "STREAM_INFO") { $outputString .= $key . " :\n"; foreach ($out as $s_info) { foreach ($s_info as $k => $v) { $outputString .= "\t" . strtoupper($k) . " : " . $v . "\n"; } } } elseif ($key == "SOUNDCLOUD_ENABLED") { if ($out) { $outputString .= $key . " : TRUE\n"; } elseif (!$out) { $outputString .= $key . " : FALSE\n"; } } elseif ($key == "SAAS") { if (strcmp($out, 'disabled') != 0) { $outputString .= $key . ' : ' . $out . "\n"; } } else { $outputString .= $key . ' : ' . $out . "\n"; } } if ($returnArray) { $outputArray['PROMOTE'] = self::GetPublicise(); $outputArray['LOGOIMG'] = self::GetStationLogo(); return $outputArray; } else { return $outputString; } }
public function isValid($data) { $isValid = parent::isValid($data); $master_harbor_input_port = $data['master_harbor_input_port']; $dj_harbor_input_port = $data['dj_harbor_input_port']; if ($master_harbor_input_port == $dj_harbor_input_port && $master_harbor_input_port != "") { $element = $this->getElement("dj_harbor_input_port"); $element->addError(_("You cannot use same port as Master DJ port.")); $isValid = false; } if ($master_harbor_input_port != "") { if (is_numeric($master_harbor_input_port)) { if ($master_harbor_input_port != Application_Model_StreamSetting::getMasterLiveStreamPort()) { $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); try { socket_bind($sock, 0, $master_harbor_input_port); } catch (Exception $e) { $element = $this->getElement("master_harbor_input_port"); $element->addError(sprintf(_("Port %s is not available"), $master_harbor_input_port)); $isValid = false; } socket_close($sock); } } else { $isValid = false; } } if ($dj_harbor_input_port != "") { if (is_numeric($dj_harbor_input_port)) { if ($dj_harbor_input_port != Application_Model_StreamSetting::getDjLiveStreamPort()) { $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); try { socket_bind($sock, 0, $dj_harbor_input_port); } catch (Exception $e) { $element = $this->getElement("dj_harbor_input_port"); $element->addError(sprintf(_("Port %s is not available"), $dj_harbor_input_port)); $isValid = false; } socket_close($sock); } } else { $isValid = false; } } return $isValid; }
public function startForm() { $prefix = "s" . $this->prefix; $stream_number = $this->prefix; $setting = $this->setting; $stream_types = $this->stream_types; $stream_bitrates = $this->stream_bitrates; $this->setIsArray(true); $this->setElementsBelongTo($prefix . "_data"); $disable_all = Application_Model_Preference::GetEnableStreamConf() == "false"; $enable = new Zend_Form_Element_Checkbox('enable'); $enable->setLabel(_('Enabled:'))->setValue($setting[$prefix . '_enable'] == 'true' ? 1 : 0)->setDecorators(array('ViewHelper')); if ($disable_all) { $enable->setAttrib("disabled", "disabled"); } $this->addElement($enable); $type = new Zend_Form_Element_Select('type'); $type->setLabel(_("Stream Type:"))->setMultiOptions($stream_types)->setValue(isset($setting[$prefix . '_type']) ? $setting[$prefix . '_type'] : 0)->setDecorators(array('ViewHelper')); if ($disable_all) { $type->setAttrib("disabled", "disabled"); } $this->addElement($type); $bitrate = new Zend_Form_Element_Select('bitrate'); $bitrate->setLabel(_("Bit Rate:"))->setMultiOptions($stream_bitrates)->setValue(isset($setting[$prefix . '_bitrate']) ? $setting[$prefix . '_bitrate'] : 0)->setDecorators(array('ViewHelper')); if ($disable_all) { $bitrate->setAttrib("disabled", "disabled"); } $this->addElement($bitrate); $output = new Zend_Form_Element_Select('output'); $output->setLabel(_("Service Type:"))->setMultiOptions(array("icecast" => "Icecast", "shoutcast" => "SHOUTcast"))->setValue(isset($setting[$prefix . '_output']) ? $setting[$prefix . '_output'] : "icecast")->setDecorators(array('ViewHelper')); if ($disable_all) { $output->setAttrib("disabled", "disabled"); } $this->addElement($output); $channels = new Zend_Form_Element_Select('channels'); $channels->setLabel(_("Channels:"))->setMultiOptions(array("mono" => _("1 - Mono"), "stereo" => _("2 - Stereo")))->setValue(isset($setting[$prefix . '_channels']) ? $setting[$prefix . '_channels'] : "stereo")->setDecorators(array('ViewHelper')); if ($disable_all) { $channels->setAttrib("disabled", "disabled"); } $this->addElement($channels); $host = new Zend_Form_Element_Text('host'); $host->setLabel(_("Server"))->setValue(isset($setting[$prefix . '_host']) ? $setting[$prefix . '_host'] : "")->setValidators(array(array('regex', false, array('/^[0-9a-zA-Z-_.]+$/', 'messages' => _('Invalid character entered')))))->setDecorators(array('ViewHelper')); if ($disable_all) { $host->setAttrib("disabled", "disabled"); } $host->setAttrib('alt', 'domain'); $this->addElement($host); $port = new Zend_Form_Element_Text('port'); $port->setLabel(_("Port"))->setValue(isset($setting[$prefix . '_port']) ? $setting[$prefix . '_port'] : "")->setValidators(array(new Zend_Validate_Between(array('min' => 0, 'max' => 99999))))->addValidator('regex', false, array('pattern' => '/^[0-9]+$/', 'messages' => array('regexNotMatch' => _('Only numbers are allowed.'))))->setDecorators(array('ViewHelper')); if ($disable_all) { $port->setAttrib("disabled", "disabled"); } $this->addElement($port); $pass = new Zend_Form_Element_Text('pass'); $pass->setLabel(_("Password"))->setValue(isset($setting[$prefix . '_pass']) ? $setting[$prefix . '_pass'] : "")->setValidators(array(array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))->setDecorators(array('ViewHelper')); if ($disable_all) { $pass->setAttrib("disabled", "disabled"); } $pass->setAttrib('alt', 'regular_text'); $this->addElement($pass); $genre = new Zend_Form_Element_Text('genre'); $genre->setLabel(_("Genre"))->setValue(isset($setting[$prefix . '_genre']) ? $setting[$prefix . '_genre'] : "")->setDecorators(array('ViewHelper')); if ($disable_all) { $genre->setAttrib("disabled", "disabled"); } $this->addElement($genre); $url = new Zend_Form_Element_Text('url'); $url->setLabel(_("URL"))->setValue(isset($setting[$prefix . '_url']) ? $setting[$prefix . '_url'] : "")->setValidators(array(array('regex', false, array('/^[0-9a-zA-Z\\-_.:\\/]+$/', 'messages' => _('Invalid character entered')))))->setDecorators(array('ViewHelper')); if ($disable_all) { $url->setAttrib("disabled", "disabled"); } $url->setAttrib('alt', 'url'); $this->addElement($url); $name = new Zend_Form_Element_Text('name'); $name->setLabel(_("Name"))->setValue(isset($setting[$prefix . '_name']) ? $setting[$prefix . '_name'] : "")->setDecorators(array('ViewHelper')); if ($disable_all) { $name->setAttrib("disabled", "disabled"); } $this->addElement($name); $description = new Zend_Form_Element_Text('description'); $description->setLabel(_("Description"))->setValue(isset($setting[$prefix . '_description']) ? $setting[$prefix . '_description'] : "")->setDecorators(array('ViewHelper')); if ($disable_all) { $description->setAttrib("disabled", "disabled"); } $this->addElement($description); $mount = new Zend_Form_Element_Text('mount'); $mount->setLabel(_("Mount Point"))->setValue(isset($setting[$prefix . '_mount']) ? $setting[$prefix . '_mount'] : "")->setValidators(array(array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))->setDecorators(array('ViewHelper')); if ($disable_all) { $mount->setAttrib("disabled", "disabled"); } $mount->setAttrib('alt', 'regular_text'); $this->addElement($mount); $user = new Zend_Form_Element_Text('user'); $user->setLabel(_("Username"))->setValue(isset($setting[$prefix . '_user']) ? $setting[$prefix . '_user'] : "")->setValidators(array(array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))->setDecorators(array('ViewHelper')); if ($disable_all) { $user->setAttrib("disabled", "disabled"); } $user->setAttrib('alt', 'regular_text'); $this->addElement($user); $adminUser = new Zend_Form_Element_Text('admin_user'); $adminUser->setLabel(_("Admin User"))->setValue(Application_Model_StreamSetting::getAdminUser($prefix))->setValidators(array(array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))->setDecorators(array('ViewHelper')); if ($disable_all) { $adminUser->setAttrib("disabled", "disabled"); } $adminUser->setAttrib('alt', 'regular_text'); $this->addElement($adminUser); $adminPass = new Zend_Form_Element_Password('admin_pass'); $adminPass->setLabel(_("Admin Password"))->setValue(Application_Model_StreamSetting::getAdminPass($prefix))->setValidators(array(array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))))->setDecorators(array('ViewHelper')); if ($disable_all) { $adminPass->setAttrib("disabled", "disabled"); } $adminPass->setAttrib('alt', 'regular_text'); $this->addElement($adminPass); $liquidsopa_error_msg = '<div class="stream-status status-info"><h3>' . _('Getting information from the server...') . '</h3></div>'; $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/stream-setting-form.phtml', "stream_number" => $stream_number, "enabled" => $enable->getValue(), "liquidsoap_error_msg" => $liquidsopa_error_msg)))); }