registerNamespace('Application_'); $resourceLoader = new Zend_Loader_Autoloader_Resource(array( 'basePath' => $CC_CONFIG['phpDir'].'/'.'application', 'namespace' => 'Application', 'resourceTypes' => array( 'model' => array( 'path' => 'models/', 'namespace' => 'Model', ), 'common' => array( 'path' => 'common/', 'namespace' => 'Common', ), ), )); $infoArray = Application_Model_Preference::GetSystemInfo(true); if(Application_Model_Preference::GetSupportFeedback() == '1'){ $url = 'http://stat.sourcefabric.org/index.php?p=airtime'; //$url = 'http://localhost:9999/index.php?p=airtime'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_URL, $url); $data = json_encode($infoArray); $dataArray = array("data" => $data ); curl_setopt($ch, CURLOPT_POSTFIELDS, $dataArray); $result = curl_exec($ch); curl_close($ch); } // Get latest version from stat server and store to db if(Application_Model_Preference::GetPlanLevel() == 'disabled'){ $url = 'http://stat.sourcefabric.org/airtime-stats/airtime_latest_version'; //$url = 'http://localhost:9999/index.php?p=airtime'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_URL, $url); $result = curl_exec($ch); if(curl_errno($ch)) { echo "curl error: " . curl_error($ch) . "\n"; } else { $resultArray = explode("\n", $result); if (isset($resultArray[0])) { Application_Model_Preference::SetLatestVersion($resultArray[0]); } if (isset($resultArray[1])) { Application_Model_Preference::SetLatestLink($resultArray[1]); } } curl_close($ch); }