EVOLUTION-NINJA
Edit File: login.php
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="user-scalable=no,width=device-width, initial-scale=1,maximum-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <title></title> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/main.css'); ?>"> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/bootstrap.min.css'); ?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/font-awesome.min.css'); ?>" /> <!------------------------------JS--------------------------------------> <script type="text/javascript" src="<?php echo base_url('public/assets/js/jquery-3.6.0.min.js'); ?>"></script> <script type="text/javascript" src="<?php echo base_url('public/assets/js/bootstrap.min.js'); ?>"></script> </head> <body> <div class="container"> <div class="row"> <div class="col-sm-12 admin_port" style="text-align: center;"> <h1 style="color: #003470; font-weight: 700;">MEMBERS PORTAL</h1> </div> </div> </div> <section class="login-flow"> <div class="container"> <div class="row"> <div class="col-sm-2"></div> <div class="col-sm-8"> <div class="login-box"> <div class="row"> <div class="col-sm-5"> <div class="login-left"> <img src="<?php echo base_url('public/assets/images/login_design_2.png'); ?>" class="img-fluid"> </div> </div> <div class="col-sm-7"> <div class="login-right"> <img src="<?php echo base_url('public/assets/images/logo-new.jpg'); ?>" class="img-fluid d-block mx-auto" style="width: 60%;"> <img src="<?php echo base_url('public/assets/images/icon.png'); ?>" class="img-fluid d-block mx-auto"> <h4 class="txt-center"><b>Login</b></h4> <form id="loginform"> <label>Email</label> <div class="form-group mb-3"> <!-- <input type="text" class="form-control" name=""> --> <input type="text" class="form-control mail" name="username" id="username" onfocusout="check_email()" required> <input type="hidden" class="form-control" id="permission"> </div> <label>Password</label> <div class="form-group"> <!-- <input type="password" class="form-control" name=""> --> <input type="password" class="form-control" id="password" name="password" placeholder="Password"> <div class="input-group-append" id="eye-login" style="margin-top: -25px;margin-left: 345px;"> <span onclick="password_show_hide();"> <i class="fa fa-eye d-none" id="hide_eye"></i> <i class="fa fa-eye-slash" id="show_eye"></i> </span> </div> </div> <div class="form-check mt-4" id="forgot"> <!-- <label class="form-check-label"> <input type="checkbox" class="form-check-input" id = "remember" name = "remember" value="">Remember Me </label> --> <label><input type="checkbox" id="tandc"><a href="https://docs.google.com/viewer?url=https://medusys.in/public/Medusys_Terms_Conditions_Policy.pdf" > I Agree with Terms & Conditions</a></label><br/> <a onclick="Forgot()" class="login-forgot" style="/*margin-left: 40%;*/cursor: pointer;" >Forgot Password?</a> </div> <button type="submit" class="btn submit">Login</button> <div class="new-user"> <a href="<?php echo base_url('Registration'); ?>">New User ? Create Account</a> </div> <div class="row links"> <?php $googleDocs = "https://docs.google.com/viewer?url="; ?> <div class="col-sm-4"> <!-- <a href="<?php echo $googleDocs.base_url('public/Medusys_Privacy_Policy.pdf');?>" target="_blank"><img src="<?php echo base_url('public/assets/images/icon-1.png'); ?>"></a> --> <a href="https://medusys.in/privacy-policy.html" target="_blank"><img src="<?php echo base_url('public/assets/images/icon-1.png'); ?>"><p>Privacy Policy </p></a> </div> <div class="col-sm-4"> <a href="<?php echo $googleDocs.base_url('public/Medusys_Terms_Conditions_Policy.pdf');?>" ><img src="<?php echo base_url('public/assets/images/icon-2.png'); ?>"><p>T&C</p></a> </div> <div class="col-sm-4"> <a href="help-center.html" target="_blank"><img src="<?php echo base_url('public/assets/images/icon-3.png'); ?>"><p>Info & Help</p></a> </div> </div> </form> </div> </div> </div> </div> </div> <div class="col-sm-2"></div> </div> </div> </section> <!-----------model------------------> <div class="modal fade mt-5" id="confirmationModal" tabindex="-1" role="dialog" aria-labelledby="confirmationModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header" style="background-color: #00AEFF; color: white;"> <h5 class="modal-title" id="confirmationModalLabel"> Renewal</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <!-- <div class="modal-body"> Dear Doctor, <br><br> your subscription to GAS membership has <span style="color:red;">expired.</span><br> Please click on the below link to renew.<br><br><a href="<?php echo base_url('Renewal-Subscription');?>" class="card-link " style="color: red;" ><u><i><b>Click here to Renew</b></i></u> </a><br><br> <p>If You have any doubts .Please contact Prashanth Magadi <br><a href='tel:9686200393'>+91 9686200393</a></p> </div> --> <div class="modal-body"> Dear Doctor, <br><br> Your annual subscription to GAS Medusys membership has <span style="color:red;">expired.</span><br> Please click on the link below to renew.<br><br> <a href="<?php echo base_url('Renewal-Subscription');?>" class="card-link " style="color: red;" ><u><i><b>Click here to Renew</b></i></u> </a><br><br> <p>For any further queries, please contact us at <a href='tel:9686200393'>+91 9686200393</a></p> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal" id="confirmCancelBtn">Cancel</button> <!-- <button type="button" class="btn btn-renewblue" id="confirmOkBtn"><a href="<?php echo base_url('Renewal-Subscription');?>" class="card-link " style="color: white;" > Renew </a></button> --> </div> </div> </div> </div> <script type="text/javascript"> function password_show_hide() { var x = document.getElementById("password"); var show_eye = document.getElementById("show_eye"); var hide_eye = document.getElementById("hide_eye"); hide_eye.classList.remove("d-none"); if (x.type === "password") { x.type = "text"; show_eye.style.display = "none"; hide_eye.style.display = "block"; } else { x.type = "password"; show_eye.style.display = "block"; hide_eye.style.display = "none"; } } </script> <script src="<?php echo base_url('public/assets/toastr/toastr.min.js');?>"></script> <link rel="stylesheet" href="<?php echo base_url('public/assets/toastr/toastr.min.css');?>"> <script type="text/javascript"> $(document).ready(function(){ // $('#remember').click(function() { // if ($('#remember').is(':checked')) { // localStorage.username = $('#username').val(); // localStorage.password = $('#password').val(); // localStorage.chkbx = $('#remember').val(); // } else { // alert('hello'); // localStorage.usrname = ''; // localStorage.password = ''; // localStorage.chkbx = ''; // } // }); // if (localStorage.username && localStorage.username != '') { // $('#remember').attr('checked', 'checked'); // $('#username').val(localStorage.username); // $('#password').val(localStorage.password); // } else { // $('#remember').removeAttr('checked'); // $('#username').val(''); // $('#password').val(''); // } $('#loginform').submit(function(e){ e.preventDefault(); formdata = new FormData($(this)[0]); const tandc=document.getElementById('tandc'); if (!tandc.checked) { toastr["error"]('Please Agree the Terms and Conditions to Login'); return; } $(".submit").text("Loading..."); $(".submit").attr('disabled','disabled'); $.ajax({ type : 'post', url : '<?php echo base_url("Login")?>', data : formdata, contentType: false, processData: false, success:function(response){ console.log(response); response = jQuery.parseJSON(response); if(response.result==1){ toastr.success('Welcome to MEDUSYS','Log in Successfully', {timeOut: 1000}); console.log(response.login_count); if(response.login_count == 0){ window.setTimeout(function() { window.location = '<?php echo base_url("dashboard")?>'; }, 2000); }else{ window.setTimeout(function() { window.location = '<?php echo base_url("Gas")?>'; }, 2000); } } else if(response.result==2){ $(".submit").removeAttr('disabled'); $(".submit").text("Sign-in"); toastr["error"](response.message); } else if(response.result==3){ $(".submit").removeAttr('disabled'); $(".submit").text("Sign-in"); toastr["error"](response.message); } else if(response.result==0) { $(".submit").removeAttr('disabled'); $(".submit").text("Sign-in"); toastr["error"](response.message); } else if(response.result==4) { $(".submit").removeAttr('disabled'); $(".submit").text("Sign-in"); toastr["error"](response.message); } // else if(response.result == 5) // { // $(".submit").removeAttr('disabled'); // $(".submit").text("Sign-in"); // toastr["error"](response.message); // window.setTimeout(function() { // window.location = '<?php echo base_url("Renewal-Subscription")?>'; // }, 2000); // } else if (response.result == 5) { $(".submit").removeAttr('disabled'); $(".submit").text("Sign-in"); // toastr["error"](response.message);/ $('#confirmationModal').modal('show'); $('#confirmOkBtn').on('click', function() { window.location = '<?php echo base_url("Renewal-Subscription")?>'; }); $('#confirmCancelBtn').on('click', function() { $('#confirmationModal').modal('hide'); }); $('#confirmationModal').on('hidden.bs.modal', function () { }); } } }); }); }); </script> <script> function check_email(){ var email = $('.mail').val(); // alert(email); $.ajax({ type : 'POST', url : '<?php echo base_url("check-email-login")?>', data : {email:email}, success:function(response){ response = jQuery.parseJSON(response); if(response.result==1){ // toastr["error"](response.message); $('#permission').val(0); } else{ // toastr["error"](response.msg); $('#permission').val(1); } } }); } function Forgot(){ var email = $('.mail').val(); var permission = $('#permission').val(); // alert(permission); // if(email == ''){ // toastr.error('Enter Email'); // } if(permission == 1){ toastr.error('Register to login'); }else if(email == ''){ toastr.error('Enter Email'); }else{ $.ajax({ type : 'POST', url : '<?php echo base_url("Forgot-Password")?>', data : {email:email}, success:function(response){ response = jQuery.parseJSON(response); if(response.result==1){ toastr["success"](response.message); window.location = '<?php echo base_url("Forgot-Password-Page")?>'; // document.querySelector(".patient_id").style.borderColor = "red"; // document.querySelector(".patient_id").style.backgroundColor = "#ffe6e6"; } else{ toastr["error"](response.message); // document.querySelector(".patient_id").style.borderColor = "green"; // document.querySelector(".patient_id").style.backgroundColor = "#e6ffe6"; } } }); } } </script> <style> .modal-content { background-color: #f4f8fb; } </style> <style> .admin_port{ position: relative; top: 50px; } @media only screen and (max-width: 600px){ .admin_port{ position: relative; top: 15px; } } </style> </body> </html>