Email Logs: Token integration.
This commit is contained in:
parent
8ee37051e1
commit
9c0d32dfd0
|
|
@ -157,6 +157,10 @@
|
|||
$row_style["0"] = "row_style0";
|
||||
$row_style["1"] = "row_style1";
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
$token = $object->create('/app/email_logs/email_logs.php');
|
||||
|
||||
//additional includes
|
||||
$document['title'] = $text['title-emails'];
|
||||
require_once "resources/header.php";
|
||||
|
|
@ -229,6 +233,7 @@
|
|||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo "</table>\n";
|
||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||
echo "</form>\n";
|
||||
echo "<br />\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,19 @@
|
|||
//send email
|
||||
if (valid_email($_POST['to'])) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate('/app/email_logs/email_logs.php')) {
|
||||
//message::add($text['message-invalid_token'],'negative');
|
||||
echo "<script>display_message('".$text['message-invalid_token']."', 'negative');</script>";
|
||||
echo "<center>\n";
|
||||
echo $text['message-invalid_token'];
|
||||
echo " <br><br>\n";
|
||||
echo " <input type='button' class='btn' style='margin-top: 15px;' value='".$text['button-close']."' onclick=\"$('#test_result_layer').fadeOut(200);\">\n";
|
||||
echo "</center>\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$recipient = check_str($_POST['to']);
|
||||
|
||||
echo "<b>".$text['header-settings']."</b>\n";
|
||||
|
|
@ -85,4 +98,4 @@
|
|||
echo " <input type='button' class='btn' style='margin-top: 15px;' value='".$text['button-close']."' onclick=\"$('#test_result_layer').fadeOut(200);\">\n";
|
||||
echo "</center>\n";
|
||||
|
||||
?>
|
||||
?>
|
||||
Loading…
Reference in New Issue