function isRegForEvent($username, $event_id) { $acc = getAccountbyname($username); $user_id = $acc[0]['id']; $sql = "SELECT * FROM registrations WHERE user_id = :user_id AND event_id = :event_id AND isdeleted = 0"; $params = array(':user_id' => $user_id, ':event_id' => $event_id); $result = DatabaseHandler::GetAll($sql, $params); if (count($result) > 0) { return 1; } return 0; }
function sendAccountConfMail($username) { $account = getAccountbyname($username); $email = $account[0]['email']; $code = $account[0]['code']; $url = URL . "?page=confirm&code=" . $code; $url .= "&token=sadb153nfalopadityatuie7nxcvgRTyhjdfbnUjatinInmakloso90"; $subject = "Effe Account Activation"; $username = $account[0]['username']; $body = "Howdy {$username}, <br> Your email verification for Effe2013 is still pending. <br>In order to activate your account click on the link below. <br><br> <a href='{$url}' >Click to Confirm.</a><br><br><br> <p>Contact: adc@iiita.ac.in for any assistance."; // $body = "Hi {$username}, <br> This is an account confirmation mail for Effe2013. <br>To be able to participate in various events during this Effervescence please click the following and activate your account. <br><br> <a href='{$url}' >Click to Confirm.</a>" ; sendMail($email, $subject, $body); return 1; }
function sendAccountConfMail($username) { $account = getAccountbyname($username); $email = $account[0]['email']; $code = $account[0]['code']; $url = URL . "?page=confirm&code=" . $code; $url .= "&token=sadb153nfalopadityatuie7nxcvgRTyhjdfbnUjatinInmakloso90"; $subject = SUBSCRIBE_SUBJECT; $username = $account[0]['username']; $body = "<html>\n\t<head>\n\n\t</head>\n\t<body>\n\t\tHi {$username},<br> \n\t\tThis is a confirmation mail for IIIT-Allahabad Effervescence user account. <br>\n\t\tPlease click the following link to validate your account. <br><br> \n\t\t<a href='{$url}' >Click to Confirm.</a><br><br>\n\n\t\tThank You for connecting with Effervescence MMXIV in association with eBay Inc., Line App and <span style='size:4'><span style='color:#ff9900;'>MOBI</span><span style='color:#0b5394'>KWIK</span></span><br><br><br>\n\t\t<img src='cid:qrcode' /><br>\n\n\t\t<h3>Feel like buying exciting stuff from eBay for free?</h3>\n\t\tHere are three easy steps for you:\n\t\t<ol>\n\t\t\t<li>Download the LINE messenger Android application by simply scanning the given QR code or from the link - <a href='http://bit.ly/XRuJSL' target='_blank'>http://bit.ly/XRuJSL</a></li>\n\t\t\t<li>Just text 'EFFE14' over the LINE app to the <b>Phone Number</b> - +91 9559039231. <b>USER ID</b> - effemm14</li>\n\t\t\t<li>As soon as you complete the above two steps, your eBay vouchers are on their way to your homes.</li>\n\t\t\t* The eBay voucher will be of ₹ 100/- and can be redeemed online on the website <a href='http://ebay.in' target='_blank'>http://ebay.in</a> . The minimum purchase one has to make is of ₹ 110/-.\n\t\t</ol>\n\n\t\tFor any queries please mail to <a href='mailto:effervescence@iiita.ac.in'>effervescence@iiita.ac.in</a><br><br>\n\n\t\t--<br>\n\n\t\t<i>This email has been generated automatically. Please do not reply.</i>\n\t</body>\n</html>"; if (sendMail($email, $subject, $body)) { return 1; } else { return 0; } }