"Exchange the text on the TTP page according to the new TTP program"
pull/1/head
Wytze van der Raay 11 years ago
parent a5c21831f9
commit 8c6630a282

@ -64,7 +64,8 @@
fputs($smtp, "DATA\r\n");
$InputBuffer = fgets($smtp, 1024);
fputs($smtp, "X-Mailer: CAcert.org Website\r\n");
fputs($smtp, "X-OriginatingIP: ".$_SERVER["REMOTE_ADDR"]."\r\n");
if (array_key_exists("REMOTE_ADDR", $_SERVER))
fputs($smtp, "X-OriginatingIP: ".$_SERVER["REMOTE_ADDR"]."\r\n");
fputs($smtp, "Sender: $errorsto\r\n");
fputs($smtp, "Errors-To: $errorsto\r\n");
if($replyto != "")

@ -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' or `method`='TTP-Assisted') AND `to`='".intval($userid)."' ");
$row = query_getnextrow($res);
return intval($row['list']);
}
function get_number_of_assurees ($userid)
{

@ -14,7 +14,9 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ ?>
*/
require_once(dirname(__FILE__).'/../../includes/wot.inc.php');
?>
<h3><?=_("Trusted Third Parties")?></h3>
@ -32,4 +34,49 @@
<p><?=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='//wiki.cacert.org/TTP/TTPuser'>https://wiki.cacert.org/TTP/TTPuser</a>","<a href='//wiki.cacert.org/TTP/TTPAL'>https://wiki.cacert.org/TTP/TTPAL</a>")?> </p>
<p><?=sprintf(_("If you want to take part in the TTP programme, send an email to %s with your name, the main email address of your CAcert account and the country that you want to see the TTP. CAcert will then send you the needed forms and guide you through the process."),"<a href='mailto:support@cacert.org'>support@cacert.org</a>")?></p>
<?
// test for points <100
if ($_SESSION['profile']['points']<100){
// test for TTP assurances
if (get_number_of_ttpassurances(intval($_SESSION['profile']['id']))<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 then inform you 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 where you want to visit the TTP")?></td>
<td class="DataTD"><select size="1" name="country">
<option>Australia</option>
<option>Puerto Rico</option>
<option>USA</option>
</select></td>
</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="<?=intval($id)?>">
<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 have already got 2 TTP assurances you can only take part in the TTP TOPUP programme. If you want to ask for the TTP TOPUP programme use the submit button to send the request to support@cacert.org to start the process. CAcert will then inform you about the next steps.")?></p>
<form method="post" action="wot.php">
<input type="hidden" name="oldid" value="<?=intval($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. Meanwhile you have to close this gap with face to face assurances from 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 take part in the TTP programme any more.")?></p>
<?
}

@ -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,40 @@ function send_reminder()
if($oldid == 12)
$id = $oldid;
if($oldid == 4)
{
if ($_POST['ttp']!='') {
//This mail does not need to be translated
$body = "Hi TTP adminstrators,\n\n";
$body .= "User ".$_SESSION['profile']['fname']." ".
$_SESSION['profile']['lname']." with email address '".
$_SESSION['profile']['email']."' is requesting a TTP assurances for ".
mysql_escape_string(stripslashes($_POST['country'])).".\n\n";
if ($_POST['ttptopup']=='1') {
$body .= "The user is also requesting TTP TOPUP.\n\n";
}else{
$body .= "The user is NOT requesting TTP TOPUP.\n\n";
}
$body .= "The user received ".intval($_SESSION['profile']['points'])." assurance points up to 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
$body =_("You are receiving this email because you asked for TTP assurance.")."\n\n";
if ($_POST['ttptopup']=='1') {
$body .=_("You are requesting TTP TOPUP.")."\n\n";
}else{
$body .=_("You are NOT requesting 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(($id == 5 || $oldid == 5 || $id == 6 || $oldid == 6))
if (!is_assurer($_SESSION['profile']['id']))
@ -341,14 +376,8 @@ $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 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 .= "https://www.cacert.org/wot.php?id=8\n\n";
$body .= _("You can list your location by going to:")."\n";
$body .= "https://www.cacert.org/wot.php?id=13\n\n";

Loading…
Cancel
Save