summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashantsinalkar2016-01-18 17:53:57 +0530
committerprashantsinalkar2016-01-18 17:53:57 +0530
commitc6374c16218ff8e57b215f2def41c71194d1c3f1 (patch)
treed6c065be36bd26e770e4432078f919e34547d022
parent55db3481d2d9b17e8db4fd5b0d8436fd098ee4bb (diff)
downloadHTML-Email-Invitations-c6374c16218ff8e57b215f2def41c71194d1c3f1.tar.gz
HTML-Email-Invitations-c6374c16218ff8e57b215f2def41c71194d1c3f1.tar.bz2
HTML-Email-Invitations-c6374c16218ff8e57b215f2def41c71194d1c3f1.zip
done minoer changes
-rwxr-xr-xunsubscribe.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/unsubscribe.php b/unsubscribe.php
index 7cb961c..292747d 100755
--- a/unsubscribe.php
+++ b/unsubscribe.php
@@ -1,3 +1,4 @@
+
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
@@ -16,7 +17,7 @@ ini_set('display_errors', 1);
{
global $conn;
// try to update user with specified information
- $email_id_hash = urldecode($email_id_hash);
+ $email_id_hash = $email_id_hash;
// var_dump($email_id_hash);die;
$sql = "SELECT email, unsubscribe, email_hash FROM sent_email WHERE email_hash = :email_id_hash AND event= :event";
$q = $conn->prepare($sql);
@@ -28,12 +29,9 @@ ini_set('display_errors', 1);
{
foreach ($data as $row)
{
- if ($data != NULL)
- {
- switch ($event)
- {
-
- case 'scipy 2015':
+
+ if($event=='scipy 2015')
+ {
if ($row['unsubscribe'] == 0 && $row['email_hash'] == $email_id_hash)
{
$sql_up = "UPDATE sent_email SET unsubscribe = 1 WHERE email_hash =:email_id_hash ";
@@ -57,8 +55,7 @@ ini_set('display_errors', 1);
echo '<br><br>If you are not automatically redirected, click here: <a href="http://scipy.in">SciPy India 2015</a>.';
header('Refresh: 3; URL=http://scipy.in');
}
- break;
- case 'cfd-openfoam-symposium 2016':
+ }elseif($event=='cfd-openfoam-symposium-2016'){
if ($row['unsubscribe'] == 0 && $row['email_hash'] == $email_id_hash)
{
$sql_up = "UPDATE sent_email SET unsubscribe = 1 WHERE email_hash =:email_id_hash";
@@ -82,14 +79,14 @@ ini_set('display_errors', 1);
echo '<br><br>If you are not automatically redirected, click here: <a href="http://scipy.in">OpenFOAM Symposium 2016</a>.';
header('Refresh: 3; URL=http://fossee.in/conference/cfd-symposium/');
}
- break;
- }
- }
- else
+ }else
{
echo "Wrong Link please try again";
header('Refresh: 3; URL=http://fossee.in');
}
+
+
+
}
}
}