JezK
Edit File: registration.php
<?php session_start(); include('adm_operations.php'); $operations=new adm_operations(); $appdetails=$operations->gettingAppDetails(); if($_SESSION['child']['log_school_id']!="" && $_SESSION['child']['auth_id']!="") { echo '<script> if(confirm("You are already logged in. Do you want to log out from the existing login?")) window.location.href="letmelogin.php?authid='.$_GET[authid].'®on='.$_GET['regon'].'"; else window.location.href="academicyear_management.php"; </script>'; } if(isset($_POST['check'])) { $result=$operations->getlicenseverify($_POST['licensekey'],$_POST['regon']); if($result=='noentry') echo "<script>alert('Please enter a valid License key');</script>"; else if($result=='exist') { echo "<script>location.replace('redirector.php');</script>"; } else { $_SESSION['child']['school_ok']=$result[0]; echo "<script>location.replace('schoolsignup.php?school_name=".$result[1]."');</script>"; } } /***********************checking email entry*****************/ $decrypted=decryptIt($_GET['authid']); $regon=$_GET['regon']; $result1=$operations->getlicenseverify($decrypted,$regon); if($result1=='exist') { echo "<script>location.replace('redirector.php');</script>"; } function decryptIt($q) { $cryptKey = 'qJB0rGtIn5UB1xG03efyCp'; $qDecoded = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), base64_decode( $q ), MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ), "\0"); return( $qDecoded ); } ?> <!DOCTYPE html> <html> <head> <title>Signup</title> <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> <style> body{ background-color: #17b88c; font-family:Arial, Helvetica, sans-serif; } #bg{ position:relative; top:20px; height:250px; width:450px; background-color:#335ddc; background-size:cover; margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; } .module { background:#FFFFFF; height:250px; width:450px; border-radius: 12px; -webkit-border-radius: 12px; -moz-border-radius: 12px; -o-border-radius: 12px; } .form{ float:left; height:86%; width:100%; box-sizing:border-box; padding:40px; margin-top:-30px; } .textbox{ height:38px; width:100%; border-radius:1px; border:rgba(0,0,0,.3) 1px solid; box-sizing:border-box; padding:7px; margin-bottom:30px; margin-top:-5px; font-family:Arial, Helvetica, sans-serif; font-style:normal; font-size:13px; } .textbox:focus{ outline:none; border:rgba(24,149,215,1) 1px solid; color:#666666; } #button { height:38px; width:100%;background:#17b88c; color:#FFFFFF; } #button:hover { background:#14775c; } </style> <script> function checklicensefield() { var l=document.getElementById('licensekey').value; if(l=='') { alert("Please enter License key"); return false; } } </script> </head> <body> <div id="bg"> <div class="module"> <div class="log" align="center"> <img class="img" src="<?php echo $appdetails['app_logo'];?>" height="60" width="" style=" margin-top:20px; margin-bottom:20px;"> <form class="form" method="post"> <input type="text" placeholder="License key" class="textbox" name="licensekey" id="licensekey" /> <input type="hidden" name="regon" value="<?=$_GET['regon'];?>" /> <input type="submit" value=" Register" name="check" id="button" class="btn btn-default" onclick="return checklicensefield();"/> </form> </div> </div> </div> </body> </html>