CC-1724:Phone home statistics
- Final commit for client side.
This commit is contained in:
parent
1fbaa7d5fb
commit
e762633405
|
@ -21,8 +21,11 @@ class NowplayingController extends Zend_Controller_Action
|
||||||
|
|
||||||
//popup if previous page was login
|
//popup if previous page was login
|
||||||
$refer_sses = new Zend_Session_Namespace('referrer');
|
$refer_sses = new Zend_Session_Namespace('referrer');
|
||||||
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
|
$user = new User($userInfo->id);
|
||||||
|
|
||||||
if($refer_sses->referrer == 'login' && Application_Model_Nowplaying::ShouldShowPopUp()
|
if($refer_sses->referrer == 'login' && Application_Model_Nowplaying::ShouldShowPopUp()
|
||||||
&& !Application_Model_Preference::GetSupportFeedback()){
|
&& !Application_Model_Preference::GetSupportFeedback() && $user->isAdmin()){
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js','text/javascript');
|
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/nowplaying/register.js','text/javascript');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,42 +116,6 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
Application_Model_Preference::SetRemindMeDate($now);
|
Application_Model_Preference::SetRemindMeDate($now);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*public function registersubmitAction(){
|
|
||||||
$request = $this->getRequest();
|
|
||||||
$baseUrl = $request->getBaseUrl();
|
|
||||||
|
|
||||||
$this->view->headScript()->appendFile($baseUrl.'/js/airtime/preferences/preferences.js','text/javascript');
|
|
||||||
$this->view->statusMsg = "";
|
|
||||||
|
|
||||||
$form = new Application_Form_RegisterAirtime();
|
|
||||||
|
|
||||||
if ($request->isPost()) {
|
|
||||||
|
|
||||||
if ($form->isValid($request->getPost())) {
|
|
||||||
|
|
||||||
$values = $form->getValues();
|
|
||||||
var_dump($values);
|
|
||||||
Application_Model_Preference::SetHeadTitle($values["stnName"], $this->view);
|
|
||||||
Application_Model_Preference::SetPhone($values["Phone"]);
|
|
||||||
Application_Model_Preference::SetEmail($values["Email"]);
|
|
||||||
Application_Model_Preference::SetStationWebSite($values["StationWebSite"]);
|
|
||||||
Application_Model_Preference::SetSupportFeedback($values["SupportFeedback"]);
|
|
||||||
Application_Model_Preference::SetPublicise($values["Publicise"]);
|
|
||||||
|
|
||||||
$imagePath = $form->Logo->getFileName();
|
|
||||||
|
|
||||||
Application_Model_Preference::SetStationCountry($values["Country"]);
|
|
||||||
Application_Model_Preference::SetStationCity($values["City"]);
|
|
||||||
Application_Model_Preference::SetStationDescription($values["Description"]);
|
|
||||||
Application_Model_Preference::SetStationLogo($imagePath);
|
|
||||||
|
|
||||||
// unset session
|
|
||||||
Zend_Session::namespaceUnset('referrer');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$this->_redirect('Nowplaying');
|
|
||||||
}*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
|
|
||||||
// Station Name
|
// Station Name
|
||||||
$stnName = new Zend_Form_Element_Text("stnName");
|
$stnName = new Zend_Form_Element_Text("stnName");
|
||||||
$stnName->setLabel("Station Name:")
|
$stnName->setLabel("Station Name:(*)")
|
||||||
->setRequired(true)
|
->setRequired(true)
|
||||||
->setValue(Application_Model_Preference::GetStationName())
|
->setValue(Application_Model_Preference::GetStationName())
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
|
@ -27,7 +27,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
$this->addElement('text', 'Phone', array(
|
$this->addElement('text', 'Phone', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'label' => 'Phone:',
|
'label' => 'Phone:',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'value' => Application_Model_Preference::GetPhone(),
|
'value' => Application_Model_Preference::GetPhone(),
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
@ -38,7 +38,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
//Email
|
//Email
|
||||||
$this->addElement('text', 'Email', array(
|
$this->addElement('text', 'Email', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'label' => 'Email:',
|
'label' => 'Email:(*)',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'value' => Application_Model_Preference::GetEmail(),
|
'value' => Application_Model_Preference::GetEmail(),
|
||||||
|
@ -61,7 +61,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
// county list dropdown
|
// county list dropdown
|
||||||
$this->addElement('select', 'Country', array(
|
$this->addElement('select', 'Country', array(
|
||||||
'label' => 'Country:',
|
'label' => 'Country:',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'value' => Application_Model_Preference::GetStationCountry(),
|
'value' => Application_Model_Preference::GetStationCountry(),
|
||||||
'multiOptions' => $country_list,
|
'multiOptions' => $country_list,
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
@ -72,7 +72,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
// Station city
|
// Station city
|
||||||
$this->addElement('text', 'City', array(
|
$this->addElement('text', 'City', array(
|
||||||
'label' => 'City:',
|
'label' => 'City:',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'value' => Application_Model_Preference::GetStationCity(),
|
'value' => Application_Model_Preference::GetStationCity(),
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
@ -84,7 +84,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
$description = new Zend_Form_Element_Textarea('Description');
|
$description = new Zend_Form_Element_Textarea('Description');
|
||||||
$description->class = 'input_text_area';
|
$description->class = 'input_text_area';
|
||||||
$description->setLabel('Station Description:')
|
$description->setLabel('Station Description:')
|
||||||
->setRequired(true)
|
->setRequired(false)
|
||||||
->setValue(Application_Model_Preference::GetStationDescription())
|
->setValue(Application_Model_Preference::GetStationDescription())
|
||||||
->setDecorators(array('ViewHelper'))
|
->setDecorators(array('ViewHelper'))
|
||||||
->setAttrib('ROWS','2')
|
->setAttrib('ROWS','2')
|
||||||
|
@ -99,17 +99,17 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
->addValidator('Count', false, 1)
|
->addValidator('Count', false, 1)
|
||||||
->addValidator('Extension', false, 'jpg,png,gif')
|
->addValidator('Extension', false, 'jpg,png,gif')
|
||||||
->addValidator('ImageSize', false, array(
|
->addValidator('ImageSize', false, array(
|
||||||
'minwidth' => 180,
|
'minwidth' => 200,
|
||||||
'minheight' => 180,
|
'minheight' => 200,
|
||||||
'maxwidth' => 1000,
|
'maxwidth' => 600,
|
||||||
'maxheight' => 1000));
|
'maxheight' => 600));
|
||||||
$this->addElement($upload);
|
$this->addElement($upload);
|
||||||
|
|
||||||
//enable support feedback
|
//enable support feedback
|
||||||
$this->addElement('checkbox', 'SupportFeedback', array(
|
$this->addElement('checkbox', 'SupportFeedback', array(
|
||||||
'label' => 'Send support feedback',
|
'label' => 'Send support feedback',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'value' => Application_Model_Preference::GetSupportFeedback(),
|
'value' => 1,
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
'ViewHelper'
|
'ViewHelper'
|
||||||
)
|
)
|
||||||
|
@ -121,9 +121,6 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
->setRequired(false)
|
->setRequired(false)
|
||||||
->setDecorators(array('ViewHelper'))
|
->setDecorators(array('ViewHelper'))
|
||||||
->setValue(Application_Model_Preference::GetPublicise());
|
->setValue(Application_Model_Preference::GetPublicise());
|
||||||
if(!Application_Model_Preference::GetSupportFeedback()){
|
|
||||||
$checkboxPublicise->setAttrib("disabled", "disabled");
|
|
||||||
}
|
|
||||||
$this->addElement($checkboxPublicise);
|
$this->addElement($checkboxPublicise);
|
||||||
|
|
||||||
// text area for sending detail
|
// text area for sending detail
|
||||||
|
@ -132,7 +129,8 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
||||||
'required' => false,
|
'required' => false,
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'readonly' => true,
|
'readonly' => true,
|
||||||
'rows' => 24,
|
'rows' => 5,
|
||||||
|
'cols' => 61,
|
||||||
'value' => Application_Model_Preference::GetSystemInfo(),
|
'value' => Application_Model_Preference::GetSystemInfo(),
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
'ViewHelper'
|
'ViewHelper'
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
||||||
$this->addElement('text', 'Phone', array(
|
$this->addElement('text', 'Phone', array(
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'label' => 'Phone:',
|
'label' => 'Phone:',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'value' => Application_Model_Preference::GetPhone(),
|
'value' => Application_Model_Preference::GetPhone(),
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
@ -50,7 +50,7 @@ class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
||||||
// county list dropdown
|
// county list dropdown
|
||||||
$this->addElement('select', 'Country', array(
|
$this->addElement('select', 'Country', array(
|
||||||
'label' => 'Country:',
|
'label' => 'Country:',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'value' => Application_Model_Preference::GetStationCountry(),
|
'value' => Application_Model_Preference::GetStationCountry(),
|
||||||
'multiOptions' => $country_list,
|
'multiOptions' => $country_list,
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
@ -61,7 +61,7 @@ class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
||||||
// Station city
|
// Station city
|
||||||
$this->addElement('text', 'City', array(
|
$this->addElement('text', 'City', array(
|
||||||
'label' => 'City:',
|
'label' => 'City:',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'value' => Application_Model_Preference::GetStationCity(),
|
'value' => Application_Model_Preference::GetStationCity(),
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
@ -72,7 +72,7 @@ class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
||||||
// Station Description
|
// Station Description
|
||||||
$this->addElement('textarea', 'Description', array(
|
$this->addElement('textarea', 'Description', array(
|
||||||
'label' => 'Station Description:',
|
'label' => 'Station Description:',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'class' => 'input_text_area',
|
'class' => 'input_text_area',
|
||||||
'value' => Application_Model_Preference::GetStationDescription(),
|
'value' => Application_Model_Preference::GetStationDescription(),
|
||||||
'decorators' => array(
|
'decorators' => array(
|
||||||
|
|
|
@ -288,7 +288,7 @@ class Application_Model_Preference
|
||||||
return $out;
|
return $out;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetSystemInfo(){
|
public static function GetSystemInfo($returnArray=false){
|
||||||
exec('/usr/bin/airtime-check-system', $output);
|
exec('/usr/bin/airtime-check-system', $output);
|
||||||
|
|
||||||
$output = preg_replace('/\s+/', ' ', $output);
|
$output = preg_replace('/\s+/', ' ', $output);
|
||||||
|
@ -297,7 +297,7 @@ class Application_Model_Preference
|
||||||
foreach( $output as $key => &$out){
|
foreach( $output as $key => &$out){
|
||||||
$info = explode('=', $out);
|
$info = explode('=', $out);
|
||||||
if(isset($info[1])){
|
if(isset($info[1])){
|
||||||
$key = str_replace(' ', '_', $info[0]);
|
$key = str_replace(' ', '_', trim($info[0]));
|
||||||
$key = strtoupper($key);
|
$key = strtoupper($key);
|
||||||
$systemInfoArray[$key] = $info[1];
|
$systemInfoArray[$key] = $info[1];
|
||||||
}
|
}
|
||||||
|
@ -306,17 +306,26 @@ class Application_Model_Preference
|
||||||
$outputArray = array();
|
$outputArray = array();
|
||||||
|
|
||||||
$outputArray['STATION_NAME'] = Application_Model_Preference::GetStationName();
|
$outputArray['STATION_NAME'] = Application_Model_Preference::GetStationName();
|
||||||
|
$outputArray['PHONE'] = Application_Model_Preference::GetPhone();
|
||||||
|
$outputArray['EMAIL'] = Application_Model_Preference::GetEmail();
|
||||||
$outputArray['STATION_WEB_SITE'] = Application_Model_Preference::GetStationWebSite();
|
$outputArray['STATION_WEB_SITE'] = Application_Model_Preference::GetStationWebSite();
|
||||||
$outputArray['STATION_COUNTRY'] = Application_Model_Preference::GetStationCountry();
|
$outputArray['STATION_COUNTRY'] = Application_Model_Preference::GetStationCountry();
|
||||||
$outputArray['STATION_CITY'] = Application_Model_Preference::GetStationCity();
|
$outputArray['STATION_CITY'] = Application_Model_Preference::GetStationCity();
|
||||||
$outputArrat['STATION_DESCRIPTION'] = Application_Model_Preference::GetStationDescription();
|
$outputArrat['STATION_DESCRIPTION'] = Application_Model_Preference::GetStationDescription();
|
||||||
//$outputArray['Version'] = $systemInfoArray['AIRTIME_VERSION'];
|
|
||||||
$outputArray['WEB_SERVER'] = php_sapi_name();
|
// get web server info
|
||||||
//$outputArray['OS Info'] = $systemInfoArray['OS'];
|
$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'] = User::getUserCount();
|
$outputArray['NUM_OF_USERS'] = User::getUserCount();
|
||||||
$outputArray['NUM_OF_SONGS'] = StoredFile::getFileCount();
|
$outputArray['NUM_OF_SONGS'] = StoredFile::getFileCount();
|
||||||
$outputArray['NUM_OF_PLAYLISTS'] = Playlist::getPlaylistCount();
|
$outputArray['NUM_OF_PLAYLISTS'] = Playlist::getPlaylistCount();
|
||||||
$outputArray['NUM_OF_SCHEDULED_PLAYLIST'] = Schedule::getSchduledPlaylistCount();
|
$outputArray['NUM_OF_SCHEDULED_PLAYLISTS'] = Schedule::getSchduledPlaylistCount();
|
||||||
|
$outputArray['NUM_OF_PAST_SHOWS'] = ShowInstance::GetShowInstanceCount(date("Y-m-d H:i:s"));
|
||||||
$outputArray['UNIQUE_ID'] = Application_Model_Preference::GetUniqueId();
|
$outputArray['UNIQUE_ID'] = Application_Model_Preference::GetUniqueId();
|
||||||
|
|
||||||
$outputArray = array_merge($outputArray, $systemInfoArray);
|
$outputArray = array_merge($outputArray, $systemInfoArray);
|
||||||
|
@ -325,8 +334,11 @@ class Application_Model_Preference
|
||||||
foreach($outputArray as $key => $out){
|
foreach($outputArray as $key => $out){
|
||||||
$outputString .= $key.' : '.$out."\n";
|
$outputString .= $key.' : '.$out."\n";
|
||||||
}
|
}
|
||||||
|
if($returnArray){
|
||||||
return $outputString;
|
return $outputArray;
|
||||||
|
}else{
|
||||||
|
return $outputString;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetRemindMeDate($now){
|
public static function SetRemindMeDate($now){
|
||||||
|
|
|
@ -1866,6 +1866,13 @@ class ShowInstance {
|
||||||
return new ShowInstance($id);
|
return new ShowInstance($id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// returns number of show instances that ends later than $day
|
||||||
|
public static function GetShowInstanceCount($day){
|
||||||
|
global $CC_CONFIG, $CC_DBC;
|
||||||
|
$sql = "SELECT count(*) as cnt FROM $CC_CONFIG[showInstances] WHERE ends < '$day'";
|
||||||
|
return $CC_DBC->GetOne($sql);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show Data Access Layer */
|
/* Show Data Access Layer */
|
||||||
|
|
|
@ -1,162 +1,164 @@
|
||||||
<div class="dialogPopup register-dialog" title="Register Airtime">
|
<div class="dialogPopup register-dialog" title="Register Airtime">
|
||||||
<form id="register-form" method="<?php echo $this->element->getMethod() ?>" action="<?php echo $this->element->getAction() ?>" enctype="multipart/form-data">
|
<form id="register-form" method="<?php echo $this->element->getMethod() ?>" action="<?php echo $this->element->getAction() ?>" enctype="multipart/form-data">
|
||||||
<dl class="zend_form">
|
<fieldset>
|
||||||
<div class="info-text">
|
<dl class="zend_form">
|
||||||
<p>Help Airtime improve by letting us know you are using it. This info
|
<dt class="block-display info-text">
|
||||||
will be collected regularly in order to improve your user experience.</p>
|
Help Airtime improve by letting us know you are using it. This info
|
||||||
</div>
|
will be collected regularly in order to improve your user experience.
|
||||||
<dd id="SupportFeedback-element">
|
</dt>
|
||||||
<label class="optional" for="SupportFeedback">
|
<dd id="SupportFeedback-element" class="block-display">
|
||||||
<?php echo $this->element->getElement('SupportFeedback') ?>
|
<label class="optional" for="SupportFeedback">
|
||||||
<strong><?php echo $this->element->getElement('SupportFeedback')->getLabel() ?></strong>
|
<?php echo $this->element->getElement('SupportFeedback') ?>
|
||||||
</label>
|
<strong><?php echo $this->element->getElement('SupportFeedback')->getLabel() ?></strong>
|
||||||
<?php if($this->element->getElement('SupportFeedback')->hasErrors()) : ?>
|
</label>
|
||||||
<ul class='errors'>
|
<?php if($this->element->getElement('SupportFeedback')->hasErrors()) : ?>
|
||||||
<?php foreach($this->element->getElement('SupportFeedback')->getMessages() as $error): ?>
|
<ul class='errors'>
|
||||||
<li><?php echo $error; ?></li>
|
<?php foreach($this->element->getElement('SupportFeedback')->getMessages() as $error): ?>
|
||||||
<?php endforeach; ?>
|
<li><?php echo $error; ?></li>
|
||||||
</ul>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
</ul>
|
||||||
</dd>
|
<?php endif; ?>
|
||||||
<div class="info-text">
|
</dd>
|
||||||
<p>Click the box below to advertise your station on Sourcefabric.org.</p>
|
<dt class="block-display info-text">
|
||||||
</div>
|
Click the box below to advertise your station on Sourcefabric.org. In order to publicise your station, "Send support feedback" must be enabled
|
||||||
<dd id="publicize-element">
|
</dt>
|
||||||
<label class="optional" for="Publicise">
|
<dd id="publicize-element" class="block-display">
|
||||||
<?php echo $this->element->getElement('Publicise') ?>
|
<label class="optional" for="Publicise">
|
||||||
<strong><?php echo $this->element->getElement('Publicise')->getLabel() ?></strong>
|
<?php echo $this->element->getElement('Publicise') ?>
|
||||||
</label>
|
<strong><?php echo $this->element->getElement('Publicise')->getLabel() ?></strong>
|
||||||
<?php if($this->element->getElement('Publicise')->hasErrors()) : ?>
|
</label>
|
||||||
<ul class='errors'>
|
<?php if($this->element->getElement('Publicise')->hasErrors()) : ?>
|
||||||
<?php foreach($this->element->getElement('Publicise')->getMessages() as $error): ?>
|
<ul class='errors'>
|
||||||
<li><?php echo $error; ?></li>
|
<?php foreach($this->element->getElement('Publicise')->getMessages() as $error): ?>
|
||||||
<?php endforeach; ?>
|
<li><?php echo $error; ?></li>
|
||||||
</ul>
|
<?php endforeach; ?>
|
||||||
<?php endif; ?>
|
</ul>
|
||||||
</dd>
|
<?php endif; ?>
|
||||||
<div class="info-text" style="clear: both;padding: 4px 0 4px 15px;"><p> Note: In order to publicise your station, "Send support feedback" must be enabled</p></div>
|
</dd>
|
||||||
<div id="public-info" style="display:none;">
|
</dl>
|
||||||
|
<dl id="public-info" style="display:none;">
|
||||||
<dt id="stnName-label" class="block-display">
|
<dt id="stnName-label">
|
||||||
<label class="optional" for="stnName"><?php echo $this->element->getElement('stnName')->getLabel() ?></label>
|
<label class="optional" for="stnName"><?php echo $this->element->getElement('stnName')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="stnName-element" class="block-display">
|
<dd id="stnName-element">
|
||||||
<?php echo $this->element->getElement('stnName') ?>
|
<?php echo $this->element->getElement('stnName') ?>
|
||||||
<?php if($this->element->getElement('stnName')->hasErrors()) : ?>
|
<?php if($this->element->getElement('stnName')->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach($this->element->getElement('stnName')->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement('stnName')->getMessages() as $error): ?>
|
||||||
<li><?php echo $error; ?></li>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="Phone-label" class="block-display">
|
<dt id="Phone-label">
|
||||||
<label class="optional" for="Phone"><?php echo $this->element->getElement('Phone')->getLabel() ?></label>
|
<label class="optional" for="Phone"><?php echo $this->element->getElement('Phone')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="Phone-element" class="block-display">
|
<dd id="Phone-element">
|
||||||
<?php echo $this->element->getElement('Phone') ?>
|
<?php echo $this->element->getElement('Phone') ?>
|
||||||
<?php if($this->element->getElement('Phone')->hasErrors()) : ?>
|
<?php if($this->element->getElement('Phone')->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach($this->element->getElement('Phone')->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement('Phone')->getMessages() as $error): ?>
|
||||||
<li><?php echo $error; ?></li>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="Email-label" class="block-display">
|
<dt id="Email-label">
|
||||||
<label class="optional" for="Email"><?php echo $this->element->getElement('Email')->getLabel() ?></label>
|
<label class="optional" for="Email"><?php echo $this->element->getElement('Email')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="Email-element" class="block-display">
|
<dd id="Email-element">
|
||||||
<?php echo $this->element->getElement('Email') ?>
|
<?php echo $this->element->getElement('Email') ?>
|
||||||
<?php if($this->element->getElement('Email')->hasErrors()) : ?>
|
<?php if($this->element->getElement('Email')->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach($this->element->getElement('Email')->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement('Email')->getMessages() as $error): ?>
|
||||||
<li><?php echo $error; ?></li>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="StationWebSite-label" class="block-display">
|
<dt id="StationWebSite-label">
|
||||||
<label class="optional" for="StationWebSite"><?php echo $this->element->getElement('StationWebSite')->getLabel() ?></label>
|
<label class="optional" for="StationWebSite"><?php echo $this->element->getElement('StationWebSite')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="StationWebSite-element" class="block-display clearfix">
|
<dd id="StationWebSite-element">
|
||||||
<?php echo $this->element->getElement('StationWebSite') ?>
|
<?php echo $this->element->getElement('StationWebSite') ?>
|
||||||
<?php if($this->element->getElement('StationWebSite')->hasErrors()) : ?>
|
<?php if($this->element->getElement('StationWebSite')->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach($this->element->getElement('StationWebSite')->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement('StationWebSite')->getMessages() as $error): ?>
|
||||||
<li><?php echo $error; ?></li>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="Country-label" class="block-display">
|
<dt id="Country-label">
|
||||||
<label class="optional" for="Country"><?php echo $this->element->getElement('Country')->getLabel() ?></label>
|
<label class="optional" for="Country"><?php echo $this->element->getElement('Country')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="Country-element" class="block-display clearfix">
|
<dd id="Country-element">
|
||||||
<?php echo $this->element->getElement('Country') ?>
|
<?php echo $this->element->getElement('Country') ?>
|
||||||
<?php if($this->element->getElement('Country')->hasErrors()) : ?>
|
<?php if($this->element->getElement('Country')->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach($this->element->getElement('Country')->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement('Country')->getMessages() as $error): ?>
|
||||||
<li><?php echo $error; ?></li>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="City-label" class="block-display">
|
<dt id="City-label">
|
||||||
<label class="optional" for="City"><?php echo $this->element->getElement('City')->getLabel() ?></label>
|
<label class="optional" for="City"><?php echo $this->element->getElement('City')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="City-element" class="block-display clearfix">
|
<dd id="City-element">
|
||||||
<?php echo $this->element->getElement('City') ?>
|
<?php echo $this->element->getElement('City') ?>
|
||||||
<?php if($this->element->getElement('City')->hasErrors()) : ?>
|
<?php if($this->element->getElement('City')->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach($this->element->getElement('City')->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement('City')->getMessages() as $error): ?>
|
||||||
<li><?php echo $error; ?></li>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="Description-label" class="block-display">
|
<dt id="Description-label">
|
||||||
<label class="optional" for="Description"><?php echo $this->element->getElement('Description')->getLabel() ?></label>
|
<label class="optional" for="Description"><?php echo $this->element->getElement('Description')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="Description-element" class="block-display clearfix">
|
<dd id="Description-element">
|
||||||
<?php echo $this->element->getElement('Description') ?>
|
<?php echo $this->element->getElement('Description') ?>
|
||||||
<?php if($this->element->getElement('Description')->hasErrors()) : ?>
|
<?php if($this->element->getElement('Description')->hasErrors()) : ?>
|
||||||
<ul class='errors'>
|
<ul class='errors'>
|
||||||
<?php foreach($this->element->getElement('Description')->getMessages() as $error): ?>
|
<?php foreach($this->element->getElement('Description')->getMessages() as $error): ?>
|
||||||
<li><?php echo $error; ?></li>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="Logo-label" class="block-display">
|
<dt id="Logo-label" class="block-display">
|
||||||
<label class="optional" for="Description"><?php echo $this->element->getElement('Logo')->getLabel() ?></label>
|
<label class="optional" for="Description"><?php echo $this->element->getElement('Logo')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<?php if($this->element->getView()->logoImg){?>
|
|
||||||
<div id="Logo-img-container"><img id="logo-img" onload='resizeImg(this);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" /></div>
|
<dd id="Logo-element">
|
||||||
<?php }?>
|
<?php if($this->element->getView()->logoImg){?>
|
||||||
<dd id="Logo-element" class="block-display clearfix">
|
<div id="Logo-img-container"><img id="logo-img" onload='resizeImg(this);' src="data:image/png;base64,<?php echo $this->element->getView()->logoImg ?>" /></div>
|
||||||
<?php echo $this->element->getElement('Logo') ?>
|
<?php }?>
|
||||||
<div class="info-text"><p>Min. size: 180x180 Max. size: 600x600</p></div>
|
|
||||||
<?php if($this->element->getElement('Logo')->hasErrors()) : ?>
|
<?php echo $this->element->getElement('Logo') ?>
|
||||||
<ul class='errors'>
|
<p class="info-text">Min. size: 180x180 Max. size: 600x600</p>
|
||||||
<?php foreach($this->element->getElement('Logo')->getMessages() as $error): ?>
|
<?php if($this->element->getElement('Logo')->hasErrors()) : ?>
|
||||||
<li><?php echo $error; ?></li>
|
<ul class='errors'>
|
||||||
<?php endforeach; ?>
|
<?php foreach($this->element->getElement('Logo')->getMessages() as $error): ?>
|
||||||
</ul>
|
<li><?php echo $error; ?></li>
|
||||||
<?php endif; ?>
|
<?php endforeach; ?>
|
||||||
</dd>
|
</ul>
|
||||||
</div>
|
<?php endif; ?>
|
||||||
</dl>
|
</dd>
|
||||||
<h3 class="collapsible-header">
|
</dl>
|
||||||
<span class="arrow-icon"></span>Show me what I am sending
|
</fieldset>
|
||||||
</h3>
|
<h3 class="collapsible-header">
|
||||||
|
<span class="arrow-icon"></span>Show me what I am sending
|
||||||
<div class="collapsible-content" id="show_what_sending" style="display: none;">
|
</h3>
|
||||||
<fieldset class="display_field">
|
|
||||||
<dl>
|
<div class="collapsible-content" id="show_what_sending" style="display: none;">
|
||||||
<?php echo $this->element->getElement('SendInfo') ?>
|
<fieldset class="display_field">
|
||||||
</dl>
|
<dl>
|
||||||
</fieldset>
|
<?php echo $this->element->getElement('SendInfo') ?>
|
||||||
</div>
|
</dl>
|
||||||
</form>
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
|
@ -357,10 +357,11 @@ input[type="text"]:focus, input[type="password"]:focus, textarea:focus, .input_t
|
||||||
border: 1px solid #5b5b5b;
|
border: 1px solid #5b5b5b;
|
||||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
|
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
text-indent: 3px;
|
margin:0;
|
||||||
}
|
}
|
||||||
.input_select {
|
.input_select, select {
|
||||||
background-color: #DDDDDD;
|
background-color: #DDDDDD;
|
||||||
|
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
|
||||||
border: 1px solid #5b5b5b;
|
border: 1px solid #5b5b5b;
|
||||||
font-family: Arial,Helvetica,sans-serif;
|
font-family: Arial,Helvetica,sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -1639,10 +1640,6 @@ dd.radio-inline-list, .preferences dd.radio-inline-list {
|
||||||
height: 120px;
|
height: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.preferences dd#Description-element.block-display .input_text_area {
|
|
||||||
height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#show_time_info {
|
#show_time_info {
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
height:30px;
|
height:30px;
|
||||||
|
@ -1669,43 +1666,73 @@ button.ui-button.md-cancel {
|
||||||
.dialogPopup dl {
|
.dialogPopup dl {
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:0;
|
padding:0;
|
||||||
}
|
clear:both;
|
||||||
.dialogPopup dt {
|
|
||||||
margin:0;
|
|
||||||
padding: 0 0 5px;
|
|
||||||
}
|
|
||||||
.dialogPopup dt label {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.dialogPopup dd {
|
|
||||||
margin:0 0 4px 0;
|
|
||||||
padding: 0 0 5px;
|
|
||||||
}
|
|
||||||
.dialogPopup dd input[type="text"]{
|
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
.dialogPopup dt {
|
||||||
|
clear: left;
|
||||||
|
padding: 0;
|
||||||
|
float:left;
|
||||||
|
width:35%;
|
||||||
|
}
|
||||||
|
|
||||||
.info-text p {
|
.dialogPopup dt.block-display {
|
||||||
|
float:none;
|
||||||
|
width:100%;
|
||||||
|
padding: 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialogPopup dt label {
|
||||||
|
font-weight: bold;
|
||||||
|
line-height:24px;
|
||||||
|
}
|
||||||
|
.dialogPopup dd {
|
||||||
|
padding: 0;
|
||||||
|
float:left;
|
||||||
|
width:65%;
|
||||||
|
margin:0 0 6px 0;
|
||||||
|
}
|
||||||
|
.dialogPopup dd.block-display {
|
||||||
|
float:none;
|
||||||
|
width:100%;
|
||||||
|
padding: 0 0 10px;
|
||||||
|
margin:0 0 8px 0;
|
||||||
|
}
|
||||||
|
.dialogPopup fieldset dt:last-child, .dialogPopup fieldset dd:last-child {
|
||||||
|
margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-text {
|
||||||
font-size:12px;
|
font-size:12px;
|
||||||
color:#5b5b5b;
|
color:#5b5b5b;
|
||||||
line-height:150%;
|
line-height:150%;
|
||||||
margin-top:0;
|
padding:0 0 6px;
|
||||||
}
|
margin:0;
|
||||||
|
|
||||||
|
}
|
||||||
.dialogPopup label input[type="checkbox"] {
|
.dialogPopup label input[type="checkbox"] {
|
||||||
float:left;
|
float:left;
|
||||||
margin-right:6px;
|
margin-right:6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialogPopup fieldset {
|
.dialogPopup fieldset {
|
||||||
padding: 10px;
|
padding: 0;
|
||||||
|
clear:both;
|
||||||
|
border:none;
|
||||||
}
|
}
|
||||||
.dialogPopup fieldset dd input[type="text"] {
|
.dialogPopup fieldset dd input[type="text"], .dialogPopup fieldset dd textarea {
|
||||||
width:99%;
|
width:99.5%;
|
||||||
|
padding:0;
|
||||||
}
|
}
|
||||||
|
.dialogPopup fieldset dd select {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
|
|
||||||
fieldset.display_field {
|
fieldset.display_field {
|
||||||
background-color:#d5d5d5;
|
background-color:#d5d5d5;
|
||||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
|
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2) inset;
|
||||||
|
padding:10px;
|
||||||
|
border: 1px solid #8F8F8F;
|
||||||
}
|
}
|
||||||
label span {
|
label span {
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
|
@ -1720,7 +1747,6 @@ label span {
|
||||||
padding: 6px 0;
|
padding: 6px 0;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width:60%;
|
width:60%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialogPopup .display_field dt {
|
.dialogPopup .display_field dt {
|
||||||
|
@ -1728,8 +1754,3 @@ label span {
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
width:40%;
|
width:40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sending_textarea {
|
|
||||||
width: 100%;
|
|
||||||
resize: none;
|
|
||||||
}
|
|
|
@ -4,10 +4,10 @@ $(document).ready(function(){
|
||||||
|
|
||||||
dialog.dialog({
|
dialog.dialog({
|
||||||
autoOpen: false,
|
autoOpen: false,
|
||||||
width: 450,
|
width: 500,
|
||||||
resizable: false,
|
resizable: false,
|
||||||
modal: true,
|
modal: true,
|
||||||
position:'center',
|
position:['center',50],
|
||||||
buttons: {
|
buttons: {
|
||||||
"Remind me in 1 week": function() {
|
"Remind me in 1 week": function() {
|
||||||
var url = '/Preference/remindme';
|
var url = '/Preference/remindme';
|
||||||
|
@ -55,22 +55,20 @@ $(document).ready(function(){
|
||||||
$("#public-info").hide();
|
$("#public-info").hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#link_to_whos_using").live('click', function(){
|
||||||
|
window.open("http://sourcefabric.org/en/products/airtime_whosusing");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function validateFields(){
|
function validateFields(){
|
||||||
var stnName = $("#stnName");
|
var stnName = $("#stnName");
|
||||||
var phone = $("#Phone");
|
|
||||||
var email = $("#Email");
|
var email = $("#Email");
|
||||||
var city = $("#City");
|
|
||||||
var description = $("#Description");
|
|
||||||
|
|
||||||
var errors = new Array();
|
var errors = new Array();
|
||||||
|
|
||||||
errors[0] = displayError(stnName);
|
errors[0] = displayError(stnName);
|
||||||
errors[1] = displayError(phone);
|
errors[1] = displayError(email);
|
||||||
errors[2] = displayError(email);
|
|
||||||
errors[3] = displayError(city);
|
|
||||||
errors[4] = displayError(description);
|
|
||||||
|
|
||||||
for( e in errors ){
|
for( e in errors ){
|
||||||
if(errors[e]){
|
if(errors[e]){
|
||||||
|
|
|
@ -127,5 +127,11 @@ AirtimeInstall::CreateZendPhpLogFile();
|
||||||
|
|
||||||
AirtimeInstall::SetUniqueId();
|
AirtimeInstall::SetUniqueId();
|
||||||
|
|
||||||
|
$h = rand(0,23);
|
||||||
|
$m = rand(0,59);
|
||||||
|
|
||||||
|
$fp = fopen('/etc/cron.d/airtime-crons','a');
|
||||||
|
fwrite($fp, "$m $h * * * root /usr/lib/airtime/utils/phone_home_stat\n");
|
||||||
|
fclose($fp);
|
||||||
|
|
||||||
/* FINISHED AIRTIME PHP INSTALLER */
|
/* FINISHED AIRTIME PHP INSTALLER */
|
||||||
|
|
|
@ -89,4 +89,6 @@ AirtimeInstall::RemoveSymlinks();
|
||||||
AirtimeInstall::UninstallBinaries();
|
AirtimeInstall::UninstallBinaries();
|
||||||
AirtimeInstall::RemoveLogDirectories();
|
AirtimeInstall::RemoveLogDirectories();
|
||||||
|
|
||||||
|
unlink('/etc/cron.d/airtime-crons');
|
||||||
|
|
||||||
/* FINISHED AIRTIME PHP UNINSTALLER */
|
/* FINISHED AIRTIME PHP UNINSTALLER */
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Copyright (c) 2010 Sourcefabric O.P.S.
|
||||||
|
#
|
||||||
|
# This file is part of the Airtime project.
|
||||||
|
# http://airtime.sourcefabric.org/
|
||||||
|
#
|
||||||
|
# Airtime is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Airtime is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with Airtime; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# This script cleans audio files in Airtime.
|
||||||
|
#
|
||||||
|
# Absolute path to this script
|
||||||
|
SCRIPT=`readlink -f $0`
|
||||||
|
# Absolute directory this script is in
|
||||||
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
|
invokePwd=$PWD
|
||||||
|
cd $SCRIPTPATH
|
||||||
|
|
||||||
|
php -q phone_home_stat.php "$@" || exit 1
|
|
@ -0,0 +1,71 @@
|
||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
$values = parse_ini_file('/etc/airtime/airtime.conf', true);
|
||||||
|
|
||||||
|
// Name of the web server user
|
||||||
|
$CC_CONFIG['webServerUser'] = $values['general']['web_server_user'];
|
||||||
|
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
|
||||||
|
$CC_CONFIG['rabbitmq'] = $values['rabbitmq'];
|
||||||
|
|
||||||
|
$CC_CONFIG['baseUrl'] = $values['general']['base_url'];
|
||||||
|
$CC_CONFIG['basePort'] = $values['general']['base_port'];
|
||||||
|
|
||||||
|
$CC_CONFIG['baseFilesDir'] = $values['general']['base_files_dir'];
|
||||||
|
// main directory for storing binary media files
|
||||||
|
$CC_CONFIG['storageDir'] = $values['general']['base_files_dir']."/stor";
|
||||||
|
|
||||||
|
// Database config
|
||||||
|
$CC_CONFIG['dsn']['username'] = $values['database']['dbuser'];
|
||||||
|
$CC_CONFIG['dsn']['password'] = $values['database']['dbpass'];
|
||||||
|
$CC_CONFIG['dsn']['hostspec'] = $values['database']['host'];
|
||||||
|
$CC_CONFIG['dsn']['phptype'] = 'pgsql';
|
||||||
|
$CC_CONFIG['dsn']['database'] = $values['database']['dbname'];
|
||||||
|
|
||||||
|
$CC_CONFIG['apiKey'] = array($values['general']['api_key']);
|
||||||
|
|
||||||
|
$CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries'];
|
||||||
|
$CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries'];
|
||||||
|
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/configs/constants.php');
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/configs/conf.php');
|
||||||
|
|
||||||
|
$CC_CONFIG['phpDir'] = $values['general']['airtime_dir'];
|
||||||
|
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/models/Users.php');
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/models/StoredFile.php');
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/models/Playlist.php');
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/models/Schedule.php');
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/models/Shows.php');
|
||||||
|
require_once($CC_CONFIG['phpDir'].'/application/models/Preference.php');
|
||||||
|
|
||||||
|
//Pear classes.
|
||||||
|
set_include_path($CC_CONFIG['phpDir'].'/library/pear' . PATH_SEPARATOR . get_include_path());
|
||||||
|
require_once('DB.php');
|
||||||
|
$CC_DBC = DB::connect($CC_CONFIG['dsn'], FALSE);
|
||||||
|
if (PEAR::isError($CC_DBC)) {
|
||||||
|
echo $CC_DBC->getMessage().PHP_EOL;
|
||||||
|
echo $CC_DBC->getUserInfo().PHP_EOL;
|
||||||
|
echo "Database connection problem.".PHP_EOL;
|
||||||
|
echo "Check if database '{$CC_CONFIG['dsn']['database']}' exists".
|
||||||
|
" with corresponding permissions.".PHP_EOL;
|
||||||
|
if ($p_exitOnError) {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "* Connected to database".PHP_EOL;
|
||||||
|
$CC_DBC->setFetchMode(DB_FETCHMODE_ASSOC);
|
||||||
|
}
|
||||||
|
$infoArray = Application_Model_Preference::GetSystemInfo(true);
|
||||||
|
|
||||||
|
$ch = curl_init();
|
||||||
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
|
curl_setopt($ch, CURLOPT_URL, 'http://stat.sourcefabric.org/index.php?p=airtime');
|
||||||
|
|
||||||
|
$data = json_encode($infoArray);
|
||||||
|
|
||||||
|
$dataArray = array("data" => $data );
|
||||||
|
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataArray);
|
||||||
|
$result = curl_exec($ch);
|
||||||
|
?>
|
Loading…
Reference in New Issue