[guadec-web] Implement Send Reminder
- From: Patrick Uiterwijk <puiterwijk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [guadec-web] Implement Send Reminder
- Date: Mon, 21 Jul 2014 23:59:25 +0000 (UTC)
commit 4819fa0ffc463b62431ab0252542273dbd99ab70
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date: Mon Jul 21 19:59:20 2014 -0400
Implement Send Reminder
guadec/access-register.php | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/guadec/access-register.php b/guadec/access-register.php
index 1f26ccf..a5265fa 100644
--- a/guadec/access-register.php
+++ b/guadec/access-register.php
@@ -70,6 +70,7 @@ function display_result($result){
print('<form method="post" action="">
<input type="hidden" name="regid" value="' . $results['id'] . '">
<input type="hidden" name="action" value="sendreminder">
+ <input type="hidden" name="viewtype" value="' . $_POST['viewtype'] . '">
<input type="submit" value="Send payment reminder">
</form>');
}
@@ -165,7 +166,34 @@ require_once("header.php");
}
else{
- if(isset($_POST['newstatus'])) {
+ if(isset($_POST['action'])) {
+ $action = $_POST['action'];
+ $regid = $_POST['regid'];
+ if($action == 'sendreminder')
+ {
+ // Get the email address of the registrant
+ $results = $wpdb->get_row($wpdb->prepare("SELECT * FROM wp_guadec2014_registrations WHERE id=%d",
+ $regid),
+ ARRAY_A);
+
+ $name = $results['name'];
+ $email = $results['email'];
+
+ $headers = "From: GUADEC 2014 Registration Script <contact guadec org>\n";
+ $body = "Hi " . $name . "\n";
+ $body .= "\n";
+ $body .= "It seems you haven't completed the registation process. To finish it, please either
pay online with Paypal or select the on-site payment option on the following page:
https://www.guadec.org/confirm-payment/?payfor="; . $regied . "\n";
+ $body .= "\n";
+ $body .= "Thanks for registering! We hope you have a nice GUADEC.\n";
+ $body .= "\n";
+ $body .= "--\n";
+ $body .= "The GUADEC organization team";
+ mail($email, 'GUADEC-2014 Registration Payment: Reminder', $body, $headers);
+
+ print('<div>Reminder email sent to ' . $name . '<' . $email . '></div><br />');
+ }
+ }
+ else if(isset($_POST['newstatus'])) {
$newstatus = $_POST['newstatus'];
$regid = $_POST['regid'];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]