JezK
Edit File: registration.php
<?php session_start(); include('adm_operations.php'); $operations = new adm_operations(); $appdetails = $operations->gettingAppDetails(); // unset($_SESSION['child']['log_school_id']); // echo $_SESSION['child']['auth_id'];exit; if (isset($_SESSION['child']['log_school_id']) && $_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.replace="letmelogin.php?authid=' . $_GET['authid'] . '®on=' . $_GET['regon'] . '"; } else{ window.location.href="academicyear_management.php"; } </script>'; } if (isset($_POST['check'])) { // print_r($_POST);exit; $result = $operations->getlicenseverify($_POST['licensekey'], $_POST['regon']); // print_r($result);exit; 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]; // print_r($_SESSION); echo "<script>location.replace('schoolsignup.php?school_name=" . $result[1] . "');</script>"; } } /***********************checking email entry*****************/ $decrypted = $_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 ); // } ?> <html> <head> <title>Signup</title> <link rel="shortcut icon" href="uploads/skoolonline.png" width="16px" height="auto"> <!-- <link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-aFq/bzH65dt+w6FI2ooMVUpc+21e0SRygnTpmBvdBgSdnuTN7QbdgL+OapgHtvPp" crossorigin="anonymous"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha2/dist/js/bootstrap.min.js" integrity="sha384-heAjqF+bCxXpCWLa6Zhcp4fu20XoNIA98ecBC1YkdXhszjoejr5y9Q77hIrv8R9i" crossorigin="anonymous"></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 form-control" name="licensekey" id="licensekey" /> <input type="hidden" name="regon" value="<?= $_GET['regon']; ?>" /> <input type="submit" value=" Register" name="check" id="button" class="btn btn-primary" onclick="return checklicensefield();" /> </form> </div> </div> </div> </body> <style> body { background-color: #335ddc; 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; } .btn { height: 38px !important; width: 100% !important; } /* #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> </html>