Beispiel #1
0
 public function testSettingsDoSave()
 {
     $val = SettingsData::GetSettingValue('PHPVMS_VERSION');
     $this->assertTrue($val);
     $save = SettingsData::SaveSetting('PHPVMS_VERSION', $val);
     $this->assertTrue($val, DB::$error);
     echo '<br />';
 }
 /**
  * Get the total number of hours flown by pilots
  */
 public static function TotalHours()
 {
     return SettingsData::GetSettingValue('TOTAL_HOURS');
 }
Beispiel #3
0
 public static function RegisterInstall($version = '')
 {
     if ($version == '') {
         $version = PHPVMS_VERSION;
     }
     $ext = serialize(get_loaded_extensions());
     $params = new SimpleXMLElement('<registration/>');
     $params->addChild('name', SITE_NAME);
     $params->addChild('url', SITE_URL);
     $params->addChild('email', SettingsData::GetSettingValue('ADMIN_EMAIL'));
     $params->addChild('version', $version);
     $params->addChild('php', phpversion());
     $params->addChild('mysql', @mysql_get_server_info());
     $params->addChild('ext', $ext);
     $url = 'http://api.phpvms.net/register';
     # Do fopen(), if that fails then it'll default to
     #	curl
     error_reporting(0);
     $file = new CodonWebService();
     $response = $file->post($url, $params->asXML());
 }