From 9641afae8b4fe1c5193f966f3d82e0c28fbcf40e Mon Sep 17 00:00:00 2001 From: root Date: Thu, 18 Nov 2004 23:21:15 +0000 Subject: [PATCH] update --- includes/account.php | 139 ++- includes/account_stuff.php | 4 +- locale/da.po | 393 +++---- locale/de.po | 395 +++---- locale/es.po | 394 +++---- locale/fr.po | 393 +++---- locale/hu.po | 393 +++---- locale/it.po | 394 +++---- locale/nl.po | 1336 +++++++++++++---------- locale/pt.po | 393 +++---- locale/pt_BR.po | 393 +++---- locale/zh.po | 393 +++---- messages.po | 391 +++---- pages/account/12.php | 4 +- pages/account/18.php | 4 +- pages/account/2.php | 2 +- pages/account/22.php | 4 +- pages/account/45.php | 20 + pages/account/5.php | 4 +- pages/gpg/0.php | 29 + pages/gpg/2.php | 75 ++ pages/gpg/3.php | 31 + pages/help/0.php | 3 +- scripts/gpgcerts.php | 66 ++ www/account.php | 2 +- www/docs/CAP.pdf | Bin 0 -> 109030 bytes www/docs/CAcert Assurance Programme.sxw | Bin 0 -> 20103 bytes www/docs/TTP.pdf | Bin 0 -> 91904 bytes www/docs/keys.pdf | Bin 0 -> 1481 bytes www/docs/keys.ps | 94 ++ www/gpg.php | 80 +- www/iistutorial/image001.jpg | Bin 0 -> 77459 bytes www/iistutorial/image002.jpg | Bin 0 -> 39843 bytes www/iistutorial/image003.gif | Bin 0 -> 10386 bytes www/iistutorial/image004.gif | Bin 0 -> 6162 bytes www/iistutorial/image005.gif | Bin 0 -> 7320 bytes www/iistutorial/image006.gif | Bin 0 -> 8188 bytes www/iistutorial/image007.gif | Bin 0 -> 7698 bytes www/iistutorial/image008.gif | Bin 0 -> 6983 bytes www/iistutorial/image009.gif | Bin 0 -> 6935 bytes www/iistutorial/image010.gif | Bin 0 -> 5900 bytes www/iistutorial/image011.jpg | Bin 0 -> 124389 bytes www/iistutorial/image011b.png | Bin 0 -> 14595 bytes www/iistutorial/image012.gif | Bin 0 -> 18325 bytes www/iistutorial/image013.gif | Bin 0 -> 9150 bytes www/iistutorial/image014.jpg | Bin 0 -> 26775 bytes www/iistutorial/image015.gif | Bin 0 -> 12285 bytes www/index.php | 8 +- www/logos.php | 32 + www/styles/default.css | 5 + www/wot.php | 4 +- 51 files changed, 3286 insertions(+), 2592 deletions(-) create mode 100644 pages/account/45.php create mode 100644 pages/gpg/0.php create mode 100644 pages/gpg/2.php create mode 100644 pages/gpg/3.php create mode 100755 scripts/gpgcerts.php create mode 100644 www/docs/CAP.pdf create mode 100644 www/docs/CAcert Assurance Programme.sxw create mode 100644 www/docs/TTP.pdf create mode 100644 www/docs/keys.pdf create mode 100644 www/docs/keys.ps create mode 100644 www/iistutorial/image001.jpg create mode 100644 www/iistutorial/image002.jpg create mode 100644 www/iistutorial/image003.gif create mode 100644 www/iistutorial/image004.gif create mode 100644 www/iistutorial/image005.gif create mode 100644 www/iistutorial/image006.gif create mode 100644 www/iistutorial/image007.gif create mode 100644 www/iistutorial/image008.gif create mode 100644 www/iistutorial/image009.gif create mode 100644 www/iistutorial/image010.gif create mode 100644 www/iistutorial/image011.jpg create mode 100644 www/iistutorial/image011b.png create mode 100644 www/iistutorial/image012.gif create mode 100644 www/iistutorial/image013.gif create mode 100644 www/iistutorial/image014.jpg create mode 100644 www/iistutorial/image015.gif create mode 100644 www/logos.php diff --git a/includes/account.php b/includes/account.php index 2ebb2a1..8d8e34b 100644 --- a/includes/account.php +++ b/includes/account.php @@ -16,7 +16,7 @@ loadem("account"); - if($process == _("Add") && $oldid == 1) + if($process != "" && $oldid == 1) { $id = 1; if(trim(mysql_escape_string(stripslashes($newemail))) == "") @@ -48,7 +48,7 @@ $body .= "http://$hostname/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; $body .= _("Best regards")."\n"._("CAcert.org Support!"); - mail($email, "[CAcert.org] "._("Email Probe"), $body, "From: CAcacert-Support "); + mail($email, "[CAcert.org] "._("Email Probe"), $body, "From: CAcacert-Support "); showheader(_("My CAcert.org Account!")); printf(_("The email address '%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."), $email); @@ -56,7 +56,7 @@ exit; } - if($process == _("Make Default") && $oldid == 2) + if($makedefault != "" && $oldid == 2) { $id = 2; $emailid = intval($emailid); @@ -79,7 +79,7 @@ exit; } - if($process == _("Delete") && $oldid == 2) + if($process != "" && $oldid == 2) { $id = 2; showheader(_("My CAcert.org Account!")); @@ -112,7 +112,7 @@ exit; } - if($process == _("Next") && $oldid == 3) + if($process != "" && $oldid == 3) { if(!is_array($addid)) { @@ -335,7 +335,7 @@ $_SESSION['_config']['domain'] = $newdomain; } - if($process == _("Probe") && $oldid == 8) + if($process != "" && $oldid == 8) { unset($oldid); $id = 8; @@ -373,7 +373,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: CAcert-Support "); + mail($authaddy, "[CAcert.org] "._("Email Probe"), $body, "From: CAcert-Support "); 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']); @@ -381,7 +381,7 @@ exit; } - if($process == _("Delete") && $oldid == 9) + if($process != "" && $oldid == 9) { $id = 9; showheader(_("My CAcert.org Account!")); @@ -412,7 +412,7 @@ exit; } - if($process == _("Submit") && $oldid == 10) + if($process != "" && $oldid == 10) { $CSR = trim($CSR); $_SESSION['_config']['CSR'] = $CSR; @@ -432,7 +432,7 @@ } } - if($process == _("Submit") && $oldid == 11) + if($process != "" && $oldid == 11) { $CSR = $_SESSION['_config']['CSR']; $_SESSION['_config']['subject'] = trim(`echo "$CSR"|/usr/bin/openssl req -text|grep Subject:`); @@ -482,7 +482,7 @@ } } - if($oldid == 12 && $process == _("Renew")) + if($oldid == 12 && $renew != "") { $id = 12; showheader(_("My CAcert.org Account!")); @@ -534,7 +534,7 @@ exit; } - if($oldid == 12 && $process == _("Revoke/Delete")) + if($oldid == 12 && $revoke != "") { $id = 12; showheader(_("My CAcert.org Account!")); @@ -598,7 +598,7 @@ exit; } - if($oldid == 5 && $process == _("Renew")) + if($oldid == 5 && $renew != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -652,7 +652,7 @@ exit; } - if($oldid == 5 && $process == _("Revoke/Delete")) + if($oldid == 5 && $revoke != "") { $id = 5; showheader(_("My CAcert.org Account!")); @@ -718,7 +718,7 @@ $_SESSION['_config']['user']['set'] = 1; } - if($oldid == 13 && $process == _("Update")) + if($oldid == 13 && $process != "") { $_SESSION['_config']['user']['fname'] = trim(mysql_escape_string(stripslashes($fname))); $_SESSION['_config']['user']['mname'] = trim(mysql_escape_string(stripslashes($mname))); @@ -756,7 +756,7 @@ } } - if($oldid == 13 && $process == _("Update")) + if($oldid == 13 && $process != "") { if($_SESSION['profile']['points'] < 100) { @@ -792,7 +792,7 @@ exit; } - if($oldid == 14 && $process == _("Update Pass Phrase")) + if($oldid == 14 && $process != "") { $_SESSION['_config']['user']['oldpass'] = trim(mysql_escape_string(stripslashes($oldpassword))); $_SESSION['_config']['user']['pword1'] = trim(mysql_escape_string(stripslashes($pword1))); @@ -862,7 +862,7 @@ exit; } - if($oldid == 16 && $process == _("Next")) + if($oldid == 16 && $process != "") { if(@count($_SESSION['_config']['emails']) > 0) $id = 17; @@ -999,7 +999,7 @@ } } - if($oldid == 18 && $process == _("Renew")) + if($oldid == 18 && $renew != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -1049,7 +1049,7 @@ exit; } - if($oldid == 18 && $process == _("Revoke/Delete")) + if($oldid == 18 && $revoke != "") { $id = 18; showheader(_("My CAcert.org Account!")); @@ -1111,7 +1111,7 @@ exit; } - if($process == _("Submit") && $oldid == 20) + if($process != "" && $oldid == 20) { $CSR = trim($CSR); $_SESSION['_config']['CSR'] = $CSR; @@ -1139,7 +1139,7 @@ } } - if($process == _("Submit") && $oldid == 21) + if($process != "" && $oldid == 21) { $CSR = $_SESSION['_config']['CSR']; $_SESSION['_config']['subject'] = trim(`echo "$CSR"|/usr/bin/openssl req -text|grep Subject:`); @@ -1212,7 +1212,7 @@ } } - if($oldid == 22 && $process == _("Renew")) + if($oldid == 22 && $renew != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -1267,7 +1267,7 @@ exit; } - if($oldid == 22 && $process == _("Revoke/Delete")) + if($oldid == 22 && $revoke != "") { showheader(_("My CAcert.org Account!")); if(is_array($revokeid)) @@ -1343,7 +1343,7 @@ exit; } - if($oldid == 24 && $process == _("Next")) + if($oldid == 24 && $process != "") { $id = intval($oldid); $_SESSION['_config']['O'] = trim(mysql_escape_string(stripslashes($O))); @@ -1370,7 +1370,7 @@ } } - if($oldid == 27 && $process == _("Update")) + if($oldid == 27 && $process != "") { $id = intval($oldid); $_SESSION['_config']['O'] = trim(mysql_escape_string(stripslashes($O))); @@ -1398,12 +1398,11 @@ } } - if($oldid == 28 && $process == _("Add")) + if($oldid == 28 && $process != "") { $domain = $_SESSION['_config']['domain'] = trim(mysql_escape_string(stripslashes($domainname))); $res1 = mysql_query("select * from `orgdomains` where `domain`='$domain'"); - $res2 = mysql_query("select * from `domains` where `domain`='$domain' and `deleted`=0"); - if(mysql_num_rows($res1) > 0 || mysql_num_rows($res2) > 0) + if(mysql_num_rows($res1) > 0) { $_SESSION['_config']['errmsg'] = sprintf(_("The domain '%s' is already in the system and is listed as valid. Can't continue."), $domain); $id = $oldid; @@ -1417,7 +1416,7 @@ $id = 25; } - if($oldid == 28 && $process == _("Add")) + if($oldid == 28 && $process != "") { mysql_query("insert into `orgdomains` set `orgid`='".$_SESSION['_config']['orgid']."', `domain`='$domain'"); showheader(_("My CAcert.org Account!")); @@ -1427,7 +1426,7 @@ exit; } - if($oldid == 29 && $process == _("Update")) + if($oldid == 29 && $process != "") { $domain = mysql_escape_string(stripslashes(trim($domainname))); @@ -1463,7 +1462,7 @@ $do = `../scripts/runclient`; } - if($oldid == 29 && $process == _("Update")) + if($oldid == 29 && $process != "") { $row = mysql_fetch_assoc(mysql_query("select * from `orgdomains` where `id`='".$_SESSION['_config']['domid']."'")); mysql_query("update `orgdomains` set `domain`='$domain' where `id`='".$_SESSION['_config']['domid']."'"); @@ -1474,7 +1473,7 @@ exit; } - if($oldid == 30 && $process == _("Delete")) + if($oldid == 30 && $process != "") { $row = mysql_fetch_assoc(mysql_query("select * from `orgdomains` where `id`='".$_SESSION['_config']['domid']."'")); $domain = $row['domain']; @@ -1572,7 +1571,7 @@ } } - if($oldid == 33 && $process == _("Add")) + if($oldid == 33 && $process != "") { if($_SESSION['profile']['admin'] == 1) $masteracc = $_SESSION['_config'][masteracc] = intval($masteracc); @@ -1594,7 +1593,7 @@ } } - if($oldid == 34 && $process == _("Delete")) + if($oldid == 34 && $process != "") { mysql_query("delete from `org` where `memid`='".$_SESSION['_config']['memid']."'"); } @@ -1704,6 +1703,76 @@ exit; } + if($process != "" && $oldid == 45) + { + $CSR = trim($CSR); + $_SESSION['_config']['CSR'] = $CSR; + $_SESSION['_config']['subject'] = trim(`echo "$CSR"|/usr/bin/openssl req -text|grep Subject:`); + $id = 46; + + extractit(); + getcn(); + getalt(); + + if($_SESSION['_config']["0.CN"] == "") + { + showheader(_("My CAcert.org Account!")); + echo _("CommonName field was blank. Can't continue."); + showfooter(); + exit; + } + } + + if($process != "" && $oldid == 46) + { + $CSR = $_SESSION['_config']['CSR']; + $_SESSION['_config']['subject'] = trim(`echo "$CSR"|/usr/bin/openssl req -text|grep Subject:`); + $id = 11; + + extractit(); + getcn(); + getalt(); + + if($_SESSION['_config']["0.CN"] == "") + { + showheader(_("My CAcert.org Account!")); + echo _("CommonName field was blank. Can't continue."); + showfooter(); + exit; + } + + $query = "insert into `domaincerts` set `CN`='".$_SESSION['_config']["0.CN"]."', + `domid`='".$_SESSION['_config']['row']['id']."', + `created`=NOW()"; + mysql_query($query); + $CSRid = mysql_insert_id(); + + foreach($_SESSION['_config']['rowid'] as $dom) + mysql_query("insert into `domlink` set `certid`='$CSRid', `domid`='$dom'"); + if(is_array($_SESSION['_config']['altid'])) + foreach($_SESSION['_config']['altid'] as $dom) + mysql_query("insert into `domlink` set `certid`='$CSRid', `domid`='$dom'"); + + $CSRname = $_SESSION['_config']['filepath']."/csr/server-$CSRid.csr"; + $fp = fopen($CSRname, "w"); + fputs($fp, $_SESSION['_config']['CSR']); + fclose($fp); + mysql_query("update `domaincerts` set `CSR_name`='$CSRname' where `id`='$CSRid'"); + $do = `../scripts/runserver`; + $query = "select * from `domaincerts` where `id`='$CSRid' and `crt_name` != ''"; + $res = mysql_query($query); + if(mysql_num_rows($res) <= 0) + { + showheader(_("My CAcert.org Account!")); + echo _("Your certificate request has failed to be processed correctly, please try submitting it again."); + showfooter(); + exit; + } else { + $id = 47; + $cert = $CSRid; + } + } + if(intval($cert) > 0) $_SESSION['_config']['cert'] = intval($cert); if(intval($orgid) > 0) diff --git a/includes/account_stuff.php b/includes/account_stuff.php index 914a3d9..e7e2c7d 100644 --- a/includes/account_stuff.php +++ b/includes/account_stuff.php @@ -175,12 +175,10 @@ function hideall() {

+

- -