Advertisement
karlokokkak

Untitled

Apr 20th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.60 KB | None | 0 0
  1. <?php
  2.         session_start();
  3.                    
  4.         $con = mysqli_connect("localhost", "softwebs_softweb", "V~&[#ArZW)B4", "softwebs_registration") or die(mysqli_error());
  5.  
  6.         if(isset($_POST['submit'])){
  7.             $Mobile = $_POST['Mobile'];
  8.             $Password = $_POST['Password'];
  9.              
  10.             if(empty($Mobile) OR empty($Password)){
  11.            
  12.              
  13.            $message1= '
  14.             <h3>All fields are required for  login.</h3>';
  15.  
  16.             exit($message1);
  17.             }
  18.  
  19.             //check remeber me button is set or not
  20.             if(isset($_POST['re'])){
  21.                 $re = "on";
  22.             }else{
  23.                 $re = "";
  24.             }
  25.  
  26.             //check username and pass
  27.             $query = mysqli_query($con,"SELECT * FROM `UserRegLogs` WHERE Mobile='$Mobile' AND Password='$Password'");
  28.  
  29.             if(mysqli_num_rows($query) == 1){
  30.                 $_SESSION['Mobile'] = $Mobile;
  31.                 //login the user in
  32.                 if($remember == "active"){ //remember me checked
  33.                     setcookie("Mobile",$Mobile,time() + (86400  * 10));
  34.                 }else{ //remember me not checked
  35.                    
  36.                 //echo "user logedin";
  37.                 header("Location: mypage.php");
  38.                 exit();
  39.             }
  40.                
  41.            $message2= '
  42.              <h3>Invalid Credentials.</h3>
  43.              ';
  44.              
  45.             exit($message2);
  46.             }
  47.         }
  48.     ?>
  49. <!DOCTYPE html>
  50. <html lang="en-US">
  51. <head>
  52. <title>Send Free SMS | SHIVKR</title>
  53. <meta charset="utf-8"/>
  54. <META http-equiv="Content-Type" content="text/html; charset="utf-8">
  55. <META http-equiv="Content-Style-Type" content="text/css">
  56. <META Http-Equiv="Cache-Control" Content="no-cache">
  57. <META Http-Equiv="Pragma" Content="no-cache">
  58. <META Http-Equiv="Expires: Thu, 01 Dec 2018 16:00:00 GMT" Content="0">
  59. <meta name="viewport" content="user-scalable = 0, width=device-width, initial-scale=1.0" />
  60.  
  61. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
  62. <link type="text/css" rel="stylesheet" href="/copyright/assets/css/version-018.12.281.9197-style_v2_optimized.css"/>
  63. <style>body {
  64.   overscroll-behavior-y: contain;
  65. }</style>
  66. </head>
  67. <body>
  68.  
  69. <!--<div class="loader"></div>-->    
  70. <!-- BEGIN: Sticky Header -->
  71.  
  72. <!-- END: Sticky Header -->
  73.  
  74. <!-- START: Page Content -->
  75.  
  76.  
  77. <!-- START: Form -->
  78. <div class="box">
  79.      
  80.       <div class="row">
  81.       <div class="logo-row">
  82.       <img src="https://softweb2sms.thats.im/copyright/assets/images/login-icon.png" title="Send Free SMS | SHIVKR" alt="Send Free SMS | SHIVKR" class="logo"/>
  83.      </div>
  84.      </div>
  85.  
  86.       <?php echo $message1; ?>
  87.       <?php echo $message2; ?>
  88.    
  89.            
  90.  
  91. <form method="POST" action='<?php echo $_SERVER['PHP_SELF']; ?>' enctype="multipart/form-data">
  92.            
  93.            
  94. <p class="inp-wrap">
  95.  
  96. <div class="ico icobg">
  97. <input type="tel" class="inp clearable" name="Mobile" placeholder="Enter your mobile number." Value="9661697474" maxlength="10" minlength="10" onfocus="disableautocompletion(this.id);getFocus(this.id);"
  98.                             autocomplete="off" onblur="disableautocompletion(this.id);"
  99.                             onCopy="return false" onPaste="return false"
  100.                             onKeyPress="return disableCtrlKeyCombination(event);"
  101.                             onKeyDown="return disableCtrlKeyCombination(event);"  />
  102. <i class="fa fa-user fa-lg fa-fw" aria-hidden="true"></i>
  103. </div>
  104.  
  105. </p>
  106.  
  107. <p class="inp-wrap">
  108. <div class="ico icobg">
  109. <input class="inp clearable" type="password" name="Password"  placeholder="Enter your passcode" minlength="06"  onfocus="disableautocompletion(this.id);getFocus(this.id);"
  110.                             autocomplete="off" onblur="disableautocompletion(this.id);"
  111.                             onCopy="return false" onPaste="return false"
  112.                             onKeyPress="return disableCtrlKeyCombination(event);"
  113.                             onKeyDown="return disableCtrlKeyCombination(event);"  />
  114. <i class="fa fa-lock fa-lg fa-fw" aria-hidden="true"></i>
  115. </div>
  116. </p>
  117.  
  118. <div>
  119.      <label for="re" style="font-weight: normal; font-size:13px;">
  120.         <input id="re"  type="checkbox" value="on" name="re"/>Remember me
  121.      </label>
  122. </div>      
  123.        
  124. <p class="inp-wrap">
  125. <input class="encryptedSend" type="submit" value="Log-in securely" name="submit"/>
  126. </p>
  127.  
  128. </form>
  129.  
  130. </div>    
  131. <!-- END: Form -->  
  132.  
  133.    
  134. <!-- END: Page Content -->
  135.  
  136.    
  137. <!-- BEGIN: Sticky Footer -->
  138.  
  139.       <!--<img src="https://softweb2sms.thats.im/copyright/assets/images/copyright-ftr.png" title="Send Free SMS | SHIVKR" alt="Send Free SMS | SHIVKR" class="ftrlogo"/>-->
  140.  
  141.       <p class="ftr">Copyright &copy; <?php echo date("Y");?> | FreeSMS </p>
  142.       <p class="ftr"><a href="#" class="encryptClick" style="text-decoration:none;">T&S (Read me)</a></p>
  143.  
  144. <!-- END: Sticky Footer -->
  145. <script src='https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js'></script>
  146. <Script>jQuery(function($) {
  147.   // /////
  148.   // CLEARABLE INPUT
  149.   function tog(v){return v?'addClass':'removeClass';}
  150.   $(document).on('input', '.clearable', function(){
  151.     $(this)[tog(this.value)]('x');
  152.   }).on('mousemove', '.x', function( e ){
  153.     $(this)[tog(this.offsetWidth-18 < e.clientX-this.getBoundingClientRect().left)]('onX');  
  154.   }).on('touchstart click', '.onX', function( ev ){
  155.     ev.preventDefault();
  156.     $(this).removeClass('x onX').val('').change();
  157.   });
  158. });</script>
  159. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
  160. <script type="text/javascript">
  161.   $(window).load(function() {
  162.     $(".loader").fadeOut("slow");
  163.   })
  164. </script>
  165.      
  166. </body>
  167. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement