mirror of
https://github.com/CAcertOrg/cats.git
synced 2024-11-22 05:14:04 +00:00
Merge branch 'bug-1376' into testserver
Conflicts: lang/french.php
This commit is contained in:
commit
3a3c3aa3d2
5 changed files with 17 additions and 119 deletions
|
@ -81,12 +81,17 @@ define("Class_Quiz_08","passed the test.");
|
|||
define("Class_Quiz_09","not passed the test.");/*Bsp:You have reached 0 % and so you did not pass */
|
||||
define("Class_Quiz_10_AnonymousCert", "You did the test using an anonymous certificate so you can not request a printed or PDF certificate for passing the test.<br />");
|
||||
define("Class_Quiz_11_RequestCert", "Request Certificate");
|
||||
/* Original text
|
||||
define("Class_Quiz_12_ExplainCert", "Due to privacy concerns we may not collect your personal data here.<br /><br />".
|
||||
"To request a printed or PDF certificate send a mail to <a class=\"http\" href=\"mailto:education@cacert.org?subject=Certificate for AssurerChallenge\">education@cacert.org</a> and tell us if you want the printed or PDF version. If you'd like a printed certificate please include your postal address.<br />".
|
||||
"The mail may be <a class=\"http\" href=\"education.txt\">encrypted</a> and <b>must be signed by the certificate you used to do the test</b> so we can verify that you did pass the test by checking its serial number. ".
|
||||
"Have a look at the \"logged in as:\" box at the upper right corner to find out something about the certificate you are using.<br />".
|
||||
"<br /><em>For a printed certificate we'd ask you for a donation of about 5 EUR for mailing inside Europe and 10 EUR for global mail to cover the cost of handling and postage.<br />".
|
||||
"To make a donation using PayPal click the button below, <a class=\"http\" href=\"https://www.cacert.org/index.php?id=13\">https://www.cacert.org/index.php?id=13</a> shows you all methods to donate to CAcert.</em><br />".
|
||||
"<br />We are sorry for the inconvenience.<br />");*/
|
||||
/* Replacement for the time we cannot handle certificate requests */
|
||||
define("Class_Quiz_12_ExplainCert", "Due to privacy concerns we may not collect your personal data here.<br /><br />".
|
||||
"We currently cannot process requests for Certificates of Achievement. You may nevertheless request on by mailing to <a class=\"http\" href=\"mailto:education@cacert.org?subject=Certificate for AssurerChallenge\">education@cacert.org</a> but please expect that handling the request may need a <b>very</b> long time!<br />".
|
||||
"<br />We are sorry for the inconvenience.<br />");
|
||||
define("Class_Quiz_13_Donate5", "5 EUR for postage inside Europe");
|
||||
define("Class_Quiz_14_Donate10", "10 EUR for postage outside Europe");
|
||||
|
|
|
@ -81,6 +81,7 @@ define("Class_Quiz_08","avez r
|
|||
define("Class_Quiz_09","n'avez pas réussi le test.");/*Bsp:You have reached 0 % and so you did not pass */
|
||||
define("Class_Quiz_10_AnonymousCert", "Vous avez fait le test à l'aide d'un certificat anonyme, vous ne pouvez donc pas demander une version imprimée ou en PDF de l'attestation de réussite du test.<br />");
|
||||
define("Class_Quiz_11_RequestCert", "Demander une attestation de réussite");
|
||||
/*
|
||||
define("Class_Quiz_12_ExplainCert", "En raison de problèmes de confidentialité, nous ne recueillons pas vos données personnelles ici.<br /><br />".
|
||||
"Pour demander une attestation papier ou PDF, envoyez un courriel à <a class=\"http\" href=\"mailto:education@cacert.org?subject=Certificat pour AssurerChallenge\">education@cacert.org</a> en précisant si vous souhaitez une version papier ou une version PDF. Si vous désirez une attestation imprimée, veuillez inclure votre adresse postale.<br />".
|
||||
"Le courriel peut être <a class=\"http\" href=\"education.txt\">chiffré</a> et <b>doit être signé par le certificat que vous avez utilisé pour effectuer le test</b> ainsi, nous pouvons vérifier la réussite du test en vérifiant son numéro de série. ".
|
||||
|
@ -88,6 +89,10 @@ define("Class_Quiz_12_ExplainCert", "En raison de probl
|
|||
"<br /><em>Pour un certificat imprimé, nous vous demandons pour un don de 5 euros pour l'envoi en Europe et de 10 euros pour un envoi dans le reste du monde, afin de couvrir les frais d'expédition.<br />".
|
||||
"Cliquez sur le bouton ci-dessous pour faire un don à CAcert via Paypal, la page suivante vous présente les méthodes disponibles pour faire un don <a class=\"http\" href=\"https://www.cacert.org/index.php?id=13\">https://www.cacert.org/index.php?id=13</a>.</em><br />".
|
||||
"<br />Nous sommes désolés pour le désagrément..<br />");
|
||||
*/
|
||||
define("Class_Quiz_12_ExplainCert", "Due to privacy concerns we may not collect your personal data here.<br /><br />".
|
||||
"We currently cannot process requests for Certificates of Achievement. You may nevertheless request on by mailing to <a class=\"http\" href=\"mailto:education@cacert.org?subject=Certificate for AssurerChallenge\">education@cacert.org</a> but please expect that handling the request may need a <b>very</b> long time!<br />".
|
||||
"<br />We are sorry for the inconvenience.<br />");
|
||||
define("Class_Quiz_13_Donate5", "5 euros pour les frais d'expédition en Europe");
|
||||
define("Class_Quiz_14_Donate10", "10 euros pour les frais hors Europe");
|
||||
define("Class_Topic_01","nom");
|
||||
|
|
|
@ -81,12 +81,16 @@ define("Class_Quiz_08","bestanden");
|
|||
define("Class_Quiz_09","nicht bestanden");/*Bsp:You have reached 0 % and so you did not pass */
|
||||
define("Class_Quiz_10_AnonymousCert", "Sie haben ein anonymes Zertifikat zum Anmelden verwendet, deshalb können Sie keine Bestätigung beantragen.<br>");
|
||||
define("Class_Quiz_11_RequestCert", "Bestätigung beantragen");
|
||||
/*
|
||||
define("Class_Quiz_12_ExplainCert", "Aus Datenschutzgründen dürfen wir hier keine persönlichen Daten von Ihnen abfragen.<br /><br />".
|
||||
"Um eine Bestätigung ausgedruckt oder als PDF zu beantragen schicken Sie bitte eine EMail an <a class=\"http\" href=\"mailto:education@cacert.org?subject=Certificate for AssurerChallenge\">education@cacert.org</a> in der Sie uns sagen, ob Sie eine gedrucktes oder eine elektronische (PDF-)Bestätigung beantragen. Falls Sie eine gedruckte Bestätigung wünschen geben Sie bitte auch Ihre Postanschrift an.<br />".
|
||||
"Die Mail kann <a class=\"http\" href=\"education.txt\">verschlüsselt</a> und <b>muss mit dem Zertifikat signiert sein, dass Sie zum Login für diesen Test verwendet haben</b>, damit wir anhand der Seriennummer prüfen können, ob Sie den Test tatsächlich bestanden haben. ".
|
||||
"Ein Blick auf den \"eingelogged als:\" Kasten an der oberen rechten Ecke gibt Ihnen Informationen über das Zertifikat, das Sie gerade benutzen.<br />".
|
||||
"<br /><em>Für eine gedruckte Bestätigung bitten wir Sie um eine Spende in Höhe von etwa 5 EUR für Versand innerhalb Europas und 10 EUR für weltweiten Versand um die Kosten für Herstellung und Versand zu abzudecken.<br />".
|
||||
"Um über PayPal zu spenden können Sie den Button unten verwenden, <a class=\"http\" href=\"https://www.cacert.org/index.php?id=13\">https://www.cacert.org/index.php?id=13</a> zeigt Ihnen alle Möglichkeiten, wie Sie CAcert Spenden zukommen lassen können.</em><br />".
|
||||
"<br />Wir bitten Sie, die Unannehmlichkeiten zu entschuldigen.<br />");*/
|
||||
define("Class_Quiz_12_ExplainCert", "Aus Datenschutzgründen dürfen wir hier keine persönlichen Daten von Ihnen abfragen.<br /><br />".
|
||||
"Wir können momentan keine Anfragen nach Urkunden bearbeiten. Sie können trotzdem eines beantragen indem Sie eine Mail an <a class=\"http\" href=\"mailto:education@cacert.org?subject=Certificate for AssurerChallenge\">education@cacert.org</a> schicken, aber Sie sollten davon ausgehen dass die Bearbeitung <b>sehr</b> lange dauern wird!<br />".
|
||||
"<br />Wir bitten Sie, die Unannehmlichkeiten zu entschuldigen.<br />");
|
||||
define("Class_Quiz_13_Donate5", "5 EUR für Versand innerhalb Europas");
|
||||
define("Class_Quiz_14_Donate10", "10 EUR für Versand außerhalb Europas");
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
<?php
|
||||
//print_r ($_SERVER);
|
||||
//include ("functions/ocsp.php");
|
||||
include ("functions/api.php");
|
||||
include ("functions/acceptLogin.php");
|
||||
|
||||
if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] && ($_SESSION['profile']['id'] == 0 || $_SESSION['profile']['loggedin'] == 0))
|
||||
{
|
||||
if($_SERVER['SSL_CLIENT_VERIFY']=='SUCCESS'){
|
||||
if($_SERVER['SSL_CLIENT_I_DN_CN']=='CA Cert Signing Authority')$root=1;
|
||||
else if ($_SERVER['SSL_CLIENT_I_DN_CN']=='CAcert Class 3 Root')$root=2;
|
||||
|
||||
$data = "serial=".$_SERVER['SSL_CLIENT_M_SERIAL']."&root=$root";
|
||||
$x = PostToHost("www.cacert.org", "/api/edu.php", "No_Referrer", $data);
|
||||
// 2007-10-22 Ted: Looks like the server has changed the number of header lines in its reply.
|
||||
// IMHO hardcoding the number of header lines in a HTTP response is ... adventurous ...
|
||||
// Look for the first empty line, the data line is the next! Put it in a function!
|
||||
$user_id=$x[10];
|
||||
if( $user_id!=0){
|
||||
$sql="SELECT * FROM user where `user_id`='".mysql_real_escape_string($user_id)."'";
|
||||
$query = mysql_query($sql);
|
||||
$nr=mysql_num_rows($query);
|
||||
|
||||
if($nr==0){
|
||||
$_SESSION['profile']['id']=$user_id;
|
||||
acceptLogin();
|
||||
|
||||
} else {
|
||||
$row = mysql_fetch_assoc($query);
|
||||
$_SESSION['profile']['loggedin'] = 1;
|
||||
$_SESSION['profile']['language']= $row['lang'];
|
||||
$_SESSION['profile']['id']=$row['user_id'];
|
||||
$_SESSION['profile']['admin'] =$row['admin'];
|
||||
$_SESSION['profile']['email'] =$row['email'];
|
||||
echo" <meta http-equiv='refresh' content='0; url=?' />";
|
||||
}
|
||||
|
||||
//}
|
||||
// else if($_SESSION['profile']['OCSP']==2 )echo " <h3>".Login_01."</h3>";
|
||||
//else if($_SESSION['profile']['OCSP']==0)echo "<h3>".Login_02."</h3>";
|
||||
} else {
|
||||
echo "Fehler beim Loginvorgang<br />\n";
|
||||
// Debug prints for isolating login problems
|
||||
// echo "Data: $data<br />\n";
|
||||
// echo "<pre>".join("", @$x)."</pre>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<h5 class="centered"><br />'.Global_17.'</h5>';
|
||||
}
|
||||
}
|
||||
/* $query = "select * from `emailcerts` where `serial`='${_SERVER['SSL_CLIENT_M_SERIAL']}' and `revoked`=0 and
|
||||
UNIX_TIMESTAMP(`expire`) - UNIX_TIMESTAMP() > 0";
|
||||
$res = mysql_query($query);
|
||||
if(mysql_num_rows($res) > 0){
|
||||
$row = mysql_fetch_assoc($res);
|
||||
$_SESSION['profile']['loggedin'] = 0;
|
||||
$_SESSION['profile'] = "";
|
||||
foreach($_SESSION as $key){
|
||||
if($key == '_config')
|
||||
continue;
|
||||
if(is_int($key) || is_string($key))
|
||||
unset($_SESSION[$key]);
|
||||
unset($key);
|
||||
session_unregister($key);
|
||||
}
|
||||
$sql=mysql_query("select * from `users` where `id`='".$row['memid']."'");
|
||||
if (mysql_num_rows($sql) ==1){
|
||||
$_SESSION['profile'] = mysql_fetch_assoc($sql);
|
||||
if($_SERVER['SSL_CLIENT_S_DN_Email']!=$_SESSION['profile']['email']){
|
||||
$sql_email=mysql_query("SELECT * FROM email WHERE email='${_SERVER['SSL_CLIENT_S_DN_Email']}'AND memid=".$_SESSION['profile']['id']." AND deleted='0000-00-00 00:00:00'");
|
||||
if (mysql_num_rows($sql_email) ==1)$_SESSION['profile']['loggedin'] = 1;
|
||||
else unset($_SESSION['profile']);
|
||||
}
|
||||
else $_SESSION['profile']['loggedin'] = 1;
|
||||
}
|
||||
else unset($_SESSION['profile']);
|
||||
} else {
|
||||
$_SESSION['profile']['loggedin'] = 0;
|
||||
$_SESSION['profile'] = "";
|
||||
foreach($_SESSION as $key)
|
||||
{
|
||||
if($key == '_config')
|
||||
continue;
|
||||
unset($_SESSION[$key]);
|
||||
unset($key);
|
||||
session_unregister($key);
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($_SERVER['HTTP_HOST'] == $_SESSION['_config']['securehostname'] && $_SESSION['profile']['id'] > 0 && $_SESSION['profile']['loggedin'] > 0)
|
||||
{
|
||||
$_SESSION['_config']['language'] = $_SESSION['profile']['language'];
|
||||
putenv("LANG=".$_SESSION['_config']['language']);
|
||||
setlocale(LC_ALL, $_SESSION['_config']['language']);
|
||||
$domain = 'messages';
|
||||
bindtextdomain("$domain", $_SESSION['_config']['filepath']."/locale");
|
||||
textdomain("$domain");
|
||||
// echo" <META HTTP-EQUIV='refresh' content='0;URL=?'>";
|
||||
}*/
|
||||
|
||||
if($_REQUEST['id'] == "logout")
|
||||
{
|
||||
if(isset($_SESSION['profile']['language'])){
|
||||
$sql="UPDATE user SET lang='".$_SESSION['profile']['language']."' WHERE user_id='".$_SESSION['profile']['id']."'";
|
||||
$query = mysql_query($sql);
|
||||
}
|
||||
$_SESSION['profile']['loggedin'] = 0;
|
||||
$_SESSION['profile'] = "";
|
||||
echo" <meta http-equiv='refresh' content='0; url=?' />";
|
||||
session_destroy();
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
|
@ -81,7 +81,8 @@ if($_SESSION['profile']['loggedin']==1){
|
|||
if ($haspassed) {
|
||||
// A paper/PDF certificate for passing the test has been requested.
|
||||
echo "<br />".Class_Quiz_12_ExplainCert;
|
||||
echo "<br />\n".
|
||||
// PayPal-Buttons. Removed while we cannot process certificate requests
|
||||
/* echo "<br />\n".
|
||||
"<table>\n".
|
||||
"<tr>\n".
|
||||
"<td align=\"center\">\n".
|
||||
|
@ -105,7 +106,7 @@ if($_SESSION['profile']['loggedin']==1){
|
|||
"<td>".Class_Quiz_13_Donate5."</td>\n".
|
||||
"<td>".Class_Quiz_14_Donate10."</td>\n".
|
||||
"</tr>\n".
|
||||
"</table>\n";
|
||||
"</table>\n";*/
|
||||
} else {
|
||||
// Test wurde nie bestanden
|
||||
echo "<br />" . Class_Quiz_09;
|
||||
|
|
Loading…
Reference in a new issue