function sendConfirmationEmail() { error_log("sendConfirmationEmail"); // Store params $instance = base64_encode($_REQUEST['instance']); $name = base64_encode($_REQUEST['name']); $email = base64_encode($_REQUEST['email']); $password = base64_encode('{crypt}' . Functions::encryptPassword($_REQUEST['password'])); $source = base64_encode($_REQUEST['source']); $adword = base64_encode($_REQUEST['adword']); $to = $_REQUEST['email']; $subject = 'Confirm account creation on SendLove'; // Create a hard verification $salt = "aB1cD2eF3G_&\$^%+"; $proof = md5($email . $instance . $salt); $link = getServer() . getAppLocation() . 'confirm.php?action=confirm&is=' . $instance . '&n=' . $name . '&e=' . $email . '&w=' . $password . '&p=' . $proof . '&s=' . $source . "&a=" . $adword; $msg = '<html><body>' . '<p>Thank you for trying SendLove</p>' . '<p>Before you can continue, please confirm your account by clicking the link below.<p>' . '<p><a href="' . $link . '" >Activate Account</a></p>' . '</body></html>'; send_email($to, $subject, $msg); }
var interval; $(document).ready(function() { // Every 4s check if the instance is ready interval = setInterval('isInstanceReady()', 4000); }); // Checks that the instance passed as argument to the // page is ready function isInstanceReady() { var server_name = '<?php echo getServer(); ?> '; var app_location = '<?php echo getAppLocation(); ?> '; var inst = '<?php echo getInstanceName(); ?> '; $.getJSON('validate.php?action=isready&data='+inst, function(json) { if (json.ready == true) { // Show Redirect to instance link var link = $('<a href="' + server_name + '" id="readyIndicator">Go to your Instance</a>'); $('#status-update').empty().append(link); clearInterval(interval); } else {