Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 352 → Rev 353

/trunk/plugins/adminPages/120_registration/OIDplusPageAdminRegistration.class.php
328,11 → 328,34
 
echo file_get_contents(__DIR__ . '/info.tpl');
 
if (!function_exists('curl_exec')) {
echo '<p><font color="red">Note: The "CURL" PHP extension is not installed at your system. Please enable the PHP extension <code>php_curl</code>.';
echo 'Therefore, you <b>cannot</b> register your OIDplus instance at the moment.</font></p>';
return;
}
 
$testurl = 'https://www.google.com/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $testurl);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_NOBODY, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if (!$httpCode) {
echo '<p><font color="red">Note: The "CURL" PHP extension cannot access HTTPS webpages. Therefore, you cannot use this feature. Please download <a href="https://curl.haxx.se/ca/cacert.pem">cacert.pem</a>, place it somewhere and then adjust the setting <code>curl.cainfo</code> in PHP.ini.';
echo 'Therefore, you <b>cannot</b> register your OIDplus instance at the moment.</font></p>';
return;
}
 
$pki_status = OIDplus::getPkiStatus();
 
if (!$pki_status) {
echo '<p>Note: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you <b>cannot</b> register your OIDplus instance at the moment.</p>';
} else {
echo '<p><font color="red">Note: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system).';
echo 'Therefore, you <b>cannot</b> register your OIDplus instance at the moment.</font></p>';
return;
}
 
echo '<p>Privacy level:</p><select name="reg_privacy" id="reg_privacy">';
 
396,6 → 419,5
echo '<p><i>Privacy information:</i> This setting can always be changed in the administrator login / control panel.<br>
<a href="../../../res/OIDplus/privacy_documentation.html" target="_blank">Click here</a> for more information about privacy related topics.</p>';
}
}
 
}