<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>Imran Hussain pushed to branch master at <a href="https://projects.sucs.org/sucssite/sucs-site">sucssite / sucs-site</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://projects.sucs.org/sucssite/sucs-site/commit/47ca4f1b40fd4f37a6fe59272b79a02144236633">47ca4f1b</a></strong>
<div>
<span>by Imran Hussain</span>
<i>at 2015-10-06T23:35:11Z</i>
</div>
<pre class='commit-message'>Make improvements based on feedback from tswsl1989</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
components/susignup.php
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://projects.sucs.org/sucssite/sucs-site/commit/47ca4f1b40fd4f37a6fe59272b79a02144236633#diff-0'>
<strong>
components/susignup.php
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/components/susignup.php
</span><span style="color: #000000;background-color: #ddffdd">+++ b/components/susignup.php
</span><span style="color: #aaaaaa">@@ -32,8 +32,11 @@ if(!empty($_REQUEST['sid'])&&!empty($_REQUEST['transactionID'])){
</span>   // check if the data posted is valid
        if(check_su_sid_and_trans($sid,$transactionID)){
 
-               // check to see if they are already a valid and paid member
<span style="color: #000000;background-color: #ddffdd">+                // probe the db for some info thatwe want to use in the if statements below
</span>           $tmpresult = $sucsDB->Execute("SELECT * FROM members WHERE sid=?", array($sid));
<span style="color: #000000;background-color: #ddffdd">+                $singuptmpresult = $sucsDB->Execute("SELECT * FROM signup WHERE sid=?", array($sid));
+
+               // check to see if they are already a valid and paid member
</span>           if($tmpresult->fields["sid"] == $sid && $tmpresult->fields["paid"] == paidUntil(time())){
                        // let them know they are already signed up and renewed
                        message_flash("You are a numpty and have already signed up and paid for this year.");
<span style="color: #aaaaaa">@@ -44,7 +47,7 @@ if(!empty($_REQUEST['sid'])&&!empty($_REQUEST['transactionID'])){
</span>                   // let them know that their account has been renewed
                        message_flash("Your SUCS account has been renewed.");
                // else if they aren't in the SUCS DB but have a signup slip, take them back to that part of signup
-               $singuptmpresult = $sucsDB->Execute("SELECT * FROM signup WHERE sid=?", array($sid));
<span style="color: #000000;background-color: #ddffdd">+                // I don't know how you would end up in a state like this but the old code dealt with it so I will as well
</span>           } else if ($tmpresult->fields == false && $signuptmpresult->fields["sid"] == $sid) {
                        $mode = "form";
                        $smarty->assign("id",$signuptmpresult->fields["id"]);
<span style="color: #aaaaaa">@@ -59,7 +62,7 @@ if(!empty($_REQUEST['sid'])&&!empty($_REQUEST['transactionID'])){
</span>                   $smarty->assign("pass", $pass);
                } else {
                        // they should never get here
-                       echo("fuck you");
<span style="color: #000000;background-color: #ddffdd">+                        die("You'll see this if there has been a database error. Someone probably knows and is trying to fix it. Sorry.");
</span>           }
        } else {
                trigger_error("That Student Number and Transaction ID combo are invalid.", E_USER_ERROR);
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://projects.sucs.org/sucssite/sucs-site/commit/47ca4f1b40fd4f37a6fe59272b79a02144236633">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://projects.sucs.org/sucssite/sucs-site/commit/47ca4f1b40fd4f37a6fe59272b79a02144236633"}}</script>
</p>
</div>
</body>
</html>