summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2012-11-11 19:30:33 +0100
committerINOPIAE <inopiae@cacert.org>2012-11-11 20:27:00 +0100
commit5464cbce1a9843f46d47867e3d0ee9804c37a077 (patch)
treee38b98ec8bc0a8f9ded9ec1a00153176f3086083
parent7baaa9a0ac611329539a43031ca3d0e81bba2b5f (diff)
downloadcacert-devel-5464cbce1a9843f46d47867e3d0ee9804c37a077.tar.gz
cacert-devel-5464cbce1a9843f46d47867e3d0ee9804c37a077.tar.xz
cacert-devel-5464cbce1a9843f46d47867e3d0ee9804c37a077.zip
bug 1112: Changed the wot/4.php to entering a TTP request, the other file are needed for the process
-rw-r--r--includes/wot.inc.php9
-rw-r--r--pages/wot/4.php56
-rw-r--r--www/wot.php68
3 files changed, 120 insertions, 13 deletions
diff --git a/includes/wot.inc.php b/includes/wot.inc.php
index edc442a..9068722 100644
--- a/includes/wot.inc.php
+++ b/includes/wot.inc.php
@@ -40,6 +40,15 @@
return intval($row['list']);
}
+
+ function get_number_of_ttpassurances ($userid)
+ {
+ $res = query_init ("SELECT count(*) AS `list` FROM `notary`
+ WHERE `method`='Trusted Third Parties' AND `from`='".intval($userid)."' ");
+ $row = query_getnextrow($res);
+
+ return intval($row['list']);
+ }
function get_number_of_assurees ($userid)
{
diff --git a/pages/wot/4.php b/pages/wot/4.php
index 0da72da..0401d4f 100644
--- a/pages/wot/4.php
+++ b/pages/wot/4.php
@@ -26,7 +26,55 @@ Until a subsidiary policy under AP is written, it is against AP rules.<br>
<p><?=_("You can become a CAcert Assurer by seeking out trusted 3rd parties. You will also need to download and print out a copy of the TTP Form (found under 'CAP/TTP Forms') and fill in your sections. You will need to produce a photo copy of your ID, which the person assuring you will inspect against the originals. Once they are satisfied the documents appear to be genuine they need to sign the back of the photo copies, and fill in their sections of the TTP document. Once you have had your ID verified by 2 different people, pop the copies + forms in an envelope and post them to:")?></p>
-<p>CAcert Inc.<br>
-P.O. Box 4107<br>
-Denistone East NSW 2112<br>
-Australia</p>
+<? _("A Trusted Third Party (TTP) is simply someone in your country that is responsible for witnessing signatures and ID documents. This role is covered by many different titles such as public notary, justice of the peace and so on..")."\n\n" ?>
+
+<? _("With the TTP programme you can potentially gain assurance up to a maximum of 100 assurance points.")."\n\n" ?>
+
+<? _("Currently CAcert has only developed the TTP programme to the level that you can gain 70 assurance points by TTP assurances.")."\n\n" ?>.
+
+<? _("We are working to develop a process that will fill the gap of the missing 30 assurance points to allow you to get the maximum 100 assurance points.")."\n\n" ?>
+
+<? _("In the meanwhile you would need to close this gap with face to face assurances with CAcert Assurers. Think not only traveling to populated countries, but also remember that assurers may occasionally visit your country or area.")."\n\n" ?>
+
+<? sprintf(_("If you are interested in the TTP programme, read the pages %s for the basic way how the TTP programme works for you, and %s whether the TTP programme affects the country where you are located."),"<a href='http://wiki.cacert.org/TTP/TTPuser'>http://wiki.cacert.org/TTP/TTPuser</a>","<a href='http://wiki.cacert.org/TTP/TTPAL'>http://wiki.cacert.org/TTP/TTPAL</a>")."\n\n" ?>
+
+
+// test for points <100
+if ($_SESSION['profile']['points']<100){
+ // test for TTP assurances
+ if (get_number_of_ttpassurances($userid)<2){
+ <p><?=_("If you want to ask for TTP assurances fill out the missing data and send the request to support@cacert.org to start the process. CAcert will inform you then about the next steps.)?></p>
+ <form method="post" action="wot.php">
+ <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
+ <tr>
+ <td class="DataTD"><?=_("Country you whant to visit the TTP")?></td>
+ <td class="DataTD"><input type="text" name="country" size="30"></td>
+ //shall the input be replaced by a select, where should the country information be maintained
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_("I want to take part in the TTP Topup Programme")?></td>
+ <td class="DataTD"><input type="checkbox" name="ttptopup" value="1"></td>
+ </tr>
+ <tr>
+ <td colspan="2" >
+ <input type="hidden" name="oldid" value="4">
+ <input type="submit" name="ttp" value="<?=_("I need a TTP assurance")?>">
+ </td>
+ </tr>
+ </table>
+ </form>
+ }else{
+ /* As soon as the TPP TOPUP Programme is established this routine should be used
+ <p><?=_("As you got already 2 TTP assurances you only can take part in the TTP TOPUP programme.\n\n If you want you ask for the TTP TOPUP programme use the submit button to send the request to support@cacert.org to start the process. CAcert will inform you then about the next steps.")?></p>
+ <form method="post" action="wot.php">
+ <input type="hidden" name="oldid" value="<?=$id?>">
+ <input type="submit" name="ttptopup" value="<?=_("I need a TTP TOPUP")?>">
+ </form>
+ */
+ <p><?=_("We are working to develop the TTP TOPUP process to be able to fill the gap of the missing 30 assurance points to 100 assurance points. In the meanwhile you have to close this gap with face to face assurances with CAcert Assurers. Think not only travelling to populated countries, but as well to assurers visiting your country or area.")?></p>
+ }
+
+}
+Else{
+<p><?=_("You reached the maximum points that can be granted by the TTP programme and therefore you cannot takte part in the TTP programme any more.")?></p>
+}
diff --git a/www/wot.php b/www/wot.php
index c6c0568..147b983 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -115,6 +115,7 @@ function send_reminder()
+
loadem("account");
if(array_key_exists('date',$_POST) && $_POST['date'] != "")
$_SESSION['_config']['date'] = $_POST['date'];
@@ -126,6 +127,59 @@ function send_reminder()
if($oldid == 12)
$id = $oldid;
+
+ if($oldid == 4)
+ {
+ $my_translation = L10n::get_translation();
+ L10n::set_translation($_SESSION['_config']['notarise']['language']);
+ if ($_POST['ttp']!='') {
+ //This mail does not need to be transalted
+ $body = "Hi TTP adminstrators \n\n ";
+ $body .= $_SESSION['profile']['fname']." ". $_SESSION['profile']['lname'].", ".$_SESSION['profile']['email']." is requesting a TTP assurances for ".mysql_escape_string(stripslashes($_POST['country'])).".";
+ if ($_POST['ttptopup']=='1') {
+ $body .= "The user is requesting also the TTP TOPUP.\n\n";
+ }else{
+ $body .= "The user is NOT requesting the TTP TOPUP.\n\n";
+ }
+ $body .= "The user received ".$_SESSION['profile']['points']." assurance points up today.\n\n";
+ $body .= "Please start the TTP assurance process.";
+ sendmail("support@cacert.org", "[CAcert.org] "._("TTP request."), $body, "support@cacert.org", "", "", "CAcert Website");
+
+ //This mail needs to be translated
+ L10n::set_translation($my_translation);
+
+ $body =_("You are receiving this email because you asked for TTP assurance.")."\n\n";
+ if ($_POST['ttptopup']=='1') {
+ $body .=_("You are requesting the TTP TOPUP.")."\n\n";
+ }else{
+ $body .=_("You are NOT requesting the TTP TOPUP.")."\n\n";
+ }
+ $body .= _("Best regards")."\n";
+ $body .= _("CAcert Support Team");
+
+ sendmail($_SESSION['profile']['email'], "[CAcert.org] "._("You requested TTP assurances"), $body, "support@cacert.org", "", "", "CAcert Support");
+
+ }
+
+ if ($_POST['ttptopup']!='') {
+ //This mail does not need to be transalted
+ $body = "Hi TTP adminstrators \n\n ";
+ $body .= $_SESSION['profile']['fname']." ". $_SESSION['profile']['lname'].", ".$_SESSION['profile']['email']." is requesting a TTP TOPUP assurance.";
+ $body .="The user received ".$_SESSION['profile']['points']." assurance points up today.\n\n";
+ $body .="Please start the TTP TOPUP assurance process.";
+ sendmail("support@cacert.org", "[CAcert.org] "._("TTP TOPUP request."), $body, "support@cacert.org", "", "", "CAcert Website");
+
+ //This mail needs to be translated
+ L10n::set_translation($my_translation);
+
+ $body = _("You are receiving this email because you asked for TTP TOPUP assurance")."\n\n";
+ $body .= _("Best regards")."\n";
+ $body .= _("CAcert Support Team");
+
+ sendmail($_SESSION['profile']['email'], "[CAcert.org] "._("You requested a TTP TOPUP assurance"), $body, "support@cacert.org", "", "", "CAcert Support");
+
+ }
+ }
if(($id == 5 || $oldid == 5 || $id == 6 || $oldid == 6))
if (!is_assurer($_SESSION['profile']['id']))
@@ -333,16 +387,12 @@ $iecho= "c";
if(($drow['total'] + $newpoints) >= 100 && $newpoints > 0)
{
- $body .= _("You have at least 100 Assurance Points. If you want ".
- "to become an assurer try the Assurer Challenge").
- " ( https://cats.cacert.org ).\n\n";
- $body .= _("To make it easier for others in your area to find ".
- "you, it's helpful to list yourself as an assurer (this ".
- "is voluntary), as well as a physical location where you ".
- "live or work the most. You can flag your account to be ".
- "listed, and add a comment to the display by going to:")."\n";
+// $body .= _("You now have over 100 points and can start assuring others.")."\n\n";
+ $body .= _("You have at least 100 Assurance Points, if you want to become an assurer try the")." ";
+ $body .= _("Assurer Challenge")." ( https://cats.cacert.org )\n\n";
+ $body .= _("To make it easier for others in your area to find you, it's helpful to list yourself as an assurer (this is voluntary), as well as a physical location where you live or work the most. You can flag your account to be listed, and add a comment to the display by going to:")."\n\n";
$body .= "https://www.cacert.org/wot.php?id=8\n\n";
- $body .= _("You can list your location by going to:")."\n";
+ $body .= _("You can list your location by going to:")."\n\n";
$body .= "https://www.cacert.org/wot.php?id=13\n\n";
}