Advertisement
karlokokkak

Untitled

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