language updates

This commit is contained in:
root 2004-10-16 15:32:35 +00:00
parent 72c5621083
commit 7186f44320
4 changed files with 62 additions and 6 deletions

View file

@ -446,7 +446,7 @@
$body .= "http://$hostname/verify.php?type=domain&domainid=$domainid&hash=$hash\n\n";
$body .= _("Best regards")."\n"._("CAcert.org Support!");
mail($authaddy, "[CAcert.org] Email Probe", $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
mail($authaddy, "[CAcert.org] "._("Email Probe"), $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
showheader(_("My CAcert.org Account!"));
printf(_("The domain '%s' has been added to the system, however before any certificates for this can be issued you need to open the link in a browser that has been sent to your email address."), $_SESSION['_config']['domain']);

View file

@ -24,7 +24,8 @@
<li><?=_("To provide a trust mechanism to go with the security aspects of encryption.")?></li>
</ul>
</p>
<br><br>
<br>
<h3><?=_("Latest News")?></h3>
<?

View file

@ -28,6 +28,15 @@
$do = `/usr/bin/openssl ca -config /etc/ssl/openssl-client.cnf -spkac $row[csr_name] -out $row[crt_name].der -days $days -key test -batch > /dev/null 2>&1`;
$do = `/usr/bin/openssl x509 -inform DER -in $row[crt_name].der -outform PEM -out $row[crt_name] -text > /dev/null 2>&1`;
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$row[memid]'"));
if($user['language'] != "")
{
$userlang = $user['language'];
putenv("LANG=".$_SESSION['_config']['translations'][$userlang]);
setlocale(LC_ALL, $_SESSION['_config']['translations'][$userlang]);
} else {
putenv("LANG=en_AU");
setlocale(LC_ALL, "en_AU");
}
if(filesize($row[crt_name]) > 0)
{
$end = trim(`/usr/bin/openssl x509 -in $row[crt_name] -noout -enddate`);
@ -56,7 +65,7 @@
$body .= sprintf(_("You can collect your certificate for %s by going to the following location:")."\n\n", $row[CN]);
$body .= "https://www.cacert.org/account.php?id=6&cert=$row[id]\n\n";
$body .= _("Best regards")."\n"._("CAcert.org Support!");
mail($user[email], "[CAcert.org] Client Certificate", $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
mail($user[email], "[CAcert.org] "._("Client Certificate"), $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
}
}
@ -68,6 +77,15 @@
$days = 365;
$do = `/usr/bin/openssl ca -config /etc/ssl/openssl-client.cnf -in $row[csr_name] -out $row[crt_name] -days $days -key test -batch -subj '$row[subject]' > /dev/null 2>&1`;
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$row[memid]'"));
if($user['language'] != "")
{
$userlang = $user['language'];
putenv("LANG=".$_SESSION['_config']['translations'][$userlang]);
setlocale(LC_ALL, $_SESSION['_config']['translations'][$userlang]);
} else {
putenv("LANG=en_AU");
setlocale(LC_ALL, "en_AU");
}
if(filesize($row[crt_name]) > 0)
{
$end = trim(`/usr/bin/openssl x509 -in $row[crt_name] -noout -enddate`);
@ -96,7 +114,7 @@
$body .= sprintf(_("You can collect your certificate for %s by going to the following location:")."\n\n", $row[CN]);
$body .= "https://www.cacert.org/account.php?id=6&cert=$row[id]\n\n";
$body .= _("Best regards")."\n"._("CAcert.org Support!");
mail($user[email], "[CAcert.org] Client Certificate", $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
mail($user[email], "[CAcert.org] "._("Client Certificate"), $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
}
}
@ -108,11 +126,20 @@
$do = `/usr/bin/openssl ca -config /etc/ssl/openssl-client.cnf -key test -batch -gencrl -crldays 7 -crlexts crl_ext -out /tmp/cacert-revoke.crl > /dev/null 2>&1`;
$do = `/usr/bin/openssl crl -in /tmp/cacert-revoke.crl -outform DER -out ../www/revoke.crl > /dev/null 2>&1`;
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$row[memid]'"));
if($user['language'] != "")
{
$userlang = $user['language'];
putenv("LANG=".$_SESSION['_config']['translations'][$userlang]);
setlocale(LC_ALL, $_SESSION['_config']['translations'][$userlang]);
} else {
putenv("LANG=en_AU");
setlocale(LC_ALL, "en_AU");
}
mysql_query("update `emailcerts` set `revoked`=FROM_UNIXTIME(UNIX_TIMESTAMP()) where `id`='$row[id]'");
$body = _("Hi")." $user[fname],\n\n";
$body .= sprintf(_("Your certificate for %s has been revoked, as per request.")."\n\n", $row[CN]);
$body .= _("Best regards")."\n"._("CAcert.org Support!");
mail($user[email], "[CAcert.org] Certificate for $row[CN] has been revoked", $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
mail($user[email], "[CAcert.org] ".sprintf(_("Certificate for %s has been revoked"), $row['CN']), $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
}
$query = "select * from `orgemailcerts` where `crt_name`='' and `keytype`='NS'";
@ -192,10 +219,19 @@
$do = `/usr/bin/openssl ca -config /etc/ssl/openssl-client.cnf -key test -batch -gencrl -crldays 7 -crlexts crl_ext -out /tmp/cacert-revoke.crl > /dev/null 2>&1`;
$do = `/usr/bin/openssl crl -in /tmp/cacert-revoke.crl -outform DER -out ../www/revoke.crl > /dev/null 2>&1`;
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$row[memid]'"));
if($user['language'] != "")
{
$userlang = $user['language'];
putenv("LANG=".$_SESSION['_config']['translations'][$userlang]);
setlocale(LC_ALL, $_SESSION['_config']['translations'][$userlang]);
} else {
putenv("LANG=en_AU");
setlocale(LC_ALL, "en_AU");
}
mysql_query("update `orgemailcerts` set `revoked`=FROM_UNIXTIME(UNIX_TIMESTAMP()) where `id`='$row[id]'");
$body = _("Hi")." $user[fname],\n\n";
$body .= sprintf(_("Your certificate for %s has been revoked, as per request.")."\n\n", $row[CN]);
$body .= _("Best regards")."\n"._("CAcert.org Support!");
mail($user[email], "[CAcert.org] Certificate for $row[CN] has been revoked", $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
mail($user[email], "[CAcert.org] ".sprintf(_("Certificate for %s has been revoked"), $row['CN']), $body, "From: Support <duane@cacert.org>\nErrors-To: returns@cacert.org");
}
?>

View file

@ -27,6 +27,16 @@
`users`.`id`=`domains`.`memid`";
$user = mysql_fetch_assoc(mysql_query($query));
if($user['language'] != "")
{
$userlang = $user['language'];
putenv("LANG=".$_SESSION['_config']['translations'][$userlang]);
setlocale(LC_ALL, $_SESSION['_config']['translations'][$userlang]);
} else {
putenv("LANG=en_AU");
setlocale(LC_ALL, "en_AU");
}
$days = 180;
if(intval($user['memid']) > 0)
@ -83,6 +93,15 @@
$do = `/usr/bin/openssl crl -in /tmp/cacert-revoke.crl -outform DER -out ../www/revoke.crl > /dev/null 2>&1`;
$dom = mysql_fetch_assoc(mysql_query("select * from `domains` where `id`='".$row['domid']."'"));
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$dom['memid']."'"));
if($user['language'] != "")
{
$userlang = $user['language'];
putenv("LANG=".$_SESSION['_config']['translations'][$userlang]);
setlocale(LC_ALL, $_SESSION['_config']['translations'][$userlang]);
} else {
putenv("LANG=en_AU");
setlocale(LC_ALL, "en_AU");
}
mysql_query("update `domaincerts` set `revoked`=FROM_UNIXTIME(UNIX_TIMESTAMP()) where `id`='".$row['id']."'");
$body = _("Hi")." ".$user['fname'].",\n\n";
$body .= sprintf(_("Your certificate for %s has been revoked, as per request.")."\n\n", $row['CN']);