diff options
-rw-r--r-- | includes/notary.inc.php | 2 | ||||
-rw-r--r-- | pages/wot/5.php | 47 | ||||
-rw-r--r-- | pages/wot/6.php | 3 | ||||
-rw-r--r-- | www/wot.php | 43 |
4 files changed, 61 insertions, 34 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php index b568ccb..f15e09e 100644 --- a/includes/notary.inc.php +++ b/includes/notary.inc.php @@ -1055,7 +1055,7 @@ function get_user_agreements($memid, $type=null, $active=null){ <? } else { ?> - <input type="hidden" name="<?=$val?>" value="<?=$methods[0]?>" /> + <input type="hidden" name="method" value="<?=$methods[0]?>" /> <? } } diff --git a/pages/wot/5.php b/pages/wot/5.php index c1a6438..565dd6a 100644 --- a/pages/wot/5.php +++ b/pages/wot/5.php @@ -18,14 +18,24 @@ include_once("../includes/shutdown.php"); require_once("../includes/lib/l10n.php"); ?> -<? - if(array_key_exists('error',$_SESSION['_config']) && $_SESSION['_config']['error'] != "") +<? + if(array_key_exists('error',$_SESSION['_config']) && $_SESSION['_config']['error'] != "") { ?><font color="orange" size="+1"> <? echo _("ERROR").": ".$_SESSION['_config']['error'] ?> </font> <?unset($_SESSION['_config']['error']); - } + } + + if (!isset($_SESSION['assuresomeone']['year'])) { + $_SESSION['assuresomeone']['year'] = 0; + } + if (!isset($_SESSION['assuresomeone']['month'])) { + $_SESSION['assuresomeone']['month'] = 0; + } + if (!isset($_SESSION['assuresomeone']['day'])) { + $_SESSION['assuresomeone']['day'] = 0; + } ?> <? if(array_key_exists('noemailfound',$_SESSION['_config']) && $_SESSION['_config']['noemailfound'] == 1) { ?> <form method="post" action="wot.php"> @@ -60,6 +70,37 @@ <td class="DataTD"><input type="text" name="email" id="email" value="<?=array_key_exists('email',$_POST)?sanitizeHTML($_POST['email']):""?>"></td> <? } ?> </tr> + <tr> + <td class="DataTD"> + <?=_("Date of Birth")?><br/> + (<?=_("yyyy/mm/dd")?>)</td> + <td class="DataTD"> + <input type="text" name="year" value="<?=array_key_exists('year',$_SESSION['assuresomeone']) && intval($_SESSION['assuresomeone']['year']) >= 1900 ? intval($_SESSION['assuresomeone']['year']):''?>" size="4" autocomplete="off"></nobr> + <select name="month"> +<? +for($i = 1; $i <= 12; $i++) +{ + echo "<option value='$i'"; + if(array_key_exists('month',$_SESSION['assuresomeone']) && intval($_SESSION['assuresomeone']['month']) === $i) + echo " selected=\"selected\""; + echo ">".ucwords(strftime("%B", mktime(0,0,0,$i,1,date("Y"))))." ($i)</option>\n"; +} +?> + </select> + <select name="day"> +<? +for($i = 1; $i <= 31; $i++) +{ + echo "<option"; + if(array_key_exists('day',$_SESSION['assuresomeone']) && intval($_SESSION['assuresomeone']['day']) === $i) + echo " selected=\"selected\""; + echo ">$i</option>"; +} +?> + </select> + </td> + </tr> + <tr> <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td> </tr> diff --git a/pages/wot/6.php b/pages/wot/6.php index a565aa7..200a526 100644 --- a/pages/wot/6.php +++ b/pages/wot/6.php @@ -24,6 +24,9 @@ } $row = $_SESSION['_config']['notarise']; + $_SESSION['assuresomeone']['year'] = 0; + $_SESSION['assuresomeone']['month'] = 0; + $_SESSION['assuresomeone']['day'] = 0; if($_SESSION['profile']['ttpadmin'] == 1) // $methods = array("Face to Face Meeting", "Trusted 3rd Parties", "TopUP"); diff --git a/www/wot.php b/www/wot.php index faa8339..89b0aac 100644 --- a/www/wot.php +++ b/www/wot.php @@ -198,6 +198,17 @@ function send_reminder() show_page("EnterEmail","",_("User is not yet verified. Please try again in 24 hours!")); exit; } + if ($_SESSION['profile']['ttpadmin'] != 1) { + $_SESSION['assuresomeone']['year'] = intval($_POST['year']); + $_SESSION['assuresomeone']['month'] = intval($_POST['month']); + $_SESSION['assuresomeone']['day'] = intval($_POST['day']); + $dob = sprintf('%04d-%02d-%02d', $_SESSION['assuresomeone']['year'], $_SESSION['assuresomeone']['month'], $_SESSION['assuresomeone']['day']); + + if ( $_SESSION['_config']['notarise']['dob'] != $dob) { + show_page("EnterEmail","",_("The data entered is not matching with an account.")); + exit; + } + } } $query = "select * from `users` where `email`='".mysql_escape_string(stripslashes($_POST['email']))."' and `locked`=1"; $res = mysql_query($query); @@ -236,7 +247,7 @@ function send_reminder() if($oldid == 6) { -$iecho= "c"; + $iecho= "c"; //date checks if(trim($_REQUEST['date']) == '') { @@ -443,35 +454,7 @@ $iecho= "c"; sendmail($_SESSION['profile']['email'], "[CAcert.org] "._("You've Assured Another Member."), $body, "support@cacert.org", "", "", "CAcert Support"); - showheader(_("My CAcert.org Account!")); - echo "<p>"._("Shortly you and the person you were assuring will receive an email confirmation. There is no action on your behalf required to complete this.")."</p>"; -?><form method="post" action="wot.php"> -<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper"> - <tr> - <td colspan="2" class="title"><?=_("Assure Someone")?></td> - </tr> - <tr> - <td class="DataTD"><?=_("Email")?>:</td> - <td class="DataTD"><input type="text" name="email" id="email" value=""></td> - </tr> - <tr> - <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>"></td> - </tr> -</table> -<input type="hidden" name="oldid" value="5"> -</form> -<SCRIPT LANGUAGE="JavaScript"> -//<![CDATA[ - function my_init() - { - document.getElementById("email").focus(); - } - - window.onload = my_init(); -//]]> -</script> -<? - showfooter(); + show_page('EnterEmail', _("Shortly you and the person you were assuring will receive an email confirmation. There is no action on your behalf required to complete this.")); exit; } |