[guadec-web] File added for viewing the registrations
- From: Saumya Dwivedi <saumyad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [guadec-web] File added for viewing the registrations
- Date: Sun, 6 Jul 2014 17:28:53 +0000 (UTC)
commit 4784062c4328c6489130def9822a0a794c7c7aea
Author: Saumya Dwivedi <saumya zero gmail com>
Date: Sun Jul 6 22:58:41 2014 +0530
File added for viewing the registrations
guadec/access-register.php | 7 ++++---
guadec/confirm-payment.php | 10 +++++++++-
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/guadec/access-register.php b/guadec/access-register.php
index 9fcc519..5c9b3f2 100644
--- a/guadec/access-register.php
+++ b/guadec/access-register.php
@@ -49,14 +49,15 @@ else{
if(isset($_POST['viewtype']) && !empty($_POST['viewtype'])) {
$action = $_POST['viewtype'];
+
switch($action) {
case 'showall' :
- $result = $wpdb->get_results('SELECT * FROM registered', ARRAY_A);
- echo display_result($result);
+ $result = $wpdb->get_results('SELECT * FROM wp_guadec2014_registration', ARRAY_A);
+ echo display_result($result);
break;
case 'showcomplete' :
- $result = $wpdb->get_results("SELECT * FROM registered WHERE payment_status =
'Completed' OR payment_status ='NoPayment-0'", ARRAY_A);
+ $result = $wpdb->get_results("SELECT * FROM wp_guadec2014_registration WHERE payment
= 'Completed' OR payment ='NoPayment'", ARRAY_A);
echo display_result($result);
break;
diff --git a/guadec/confirm-payment.php b/guadec/confirm-payment.php
index 6a7de38..6191149 100644
--- a/guadec/confirm-payment.php
+++ b/guadec/confirm-payment.php
@@ -95,6 +95,9 @@ if (!empty($_POST)) {
"Total Fee: ".$tamount."\n"
;
$mailContent .= $registerInfo;
+ $subject = "From GUADEC 2014 Registration";
+ $headers = "From: GUADEC 2014 Registration Script <some-address gnome org>";
+
$wpdb->insert($table_name, array('timeofregistration' => date("Y-m-d H:i:s"),
'name' => $name,
'email' => $email,
@@ -206,7 +209,12 @@ if (!empty($_POST)) {
<?php else: ?>
<div>Your details have been stored. An email confirming your registration will be
sent to you shortly. Thank you.</div>
<!-- Send a confirm registration mail to the registered -->
- <?php mail($email, $mailContent); ?>
+ <?php $mail = mail($email, $subject, $mailContent, $headers); ?>
+ <?php if($mail): ?>
+ <div>"Mail sent"</div>
+ <?php else: ?>
+ <div>"Mail sending failed."</div>
+ <?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]