]]jkjjgdjffksdkdxdsghfghdfghfgdfsdsdfsdfsfdsbcxvxcbccwewqeqwewqskfgj
במ12[cxvbcxvbxcvbcxvcxvbcvxcvbsdfsdfsdfsdfsdfsdfxcvbxcvxbbxqwqewqewv;'
/
home
/
u506006416
/
domains
/
crystalmiracle.co.in
/
public_html
/
Upload FileeE
HOME
<?php include_once("header.php"); ?> <?php $redirect_url = $_SERVER['HTTP_REFERER']; function sendOTP($otp,$phone){ $url = str_replace("+","%20","http://bulksms.inboxtele.com/api/mt/SendSMS?user=crystal&password=crystal@123&senderid=CRYSTM&channel=Trans&DCS=0&flashsms=0&number=$phone&route=30&text=Dear+Customer,+Thank+you+for+choosing+Crystal+Miracle.+To+complete+your+authentication+and+ensure+the+security+of+your+account,+please+use+the+following+One-Time+Password+(OTP):+OTP:+$otp"); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'GET', )); curl_exec($curl); } if(isset($_POST['user_forgot_email']) and !empty($_POST['user_forgot_email'])){ $email = $_POST['user_forgot_email']; $check = $sel_obj->all_count_row('tblusers',"UserEmail='$email'"); $where_con="`UserEmail`="."'$email'"; $query=$sel_obj->display_rcd('tblusers',$where_con); if(is_array($query) || !empty($query)){ foreach ($query as $get_user ){ } } $user_id = $get_user['id']; if ($get_user['FullName']!="") { $full_name = $get_user['FullName']; }else{ $full_name = ""; } if($check>=1){ include_once('forgot-password-mail.php'); }else{ echo "<script>alert('Email id is Invalid.');window.location.href='login.php?show_forgot_form=1'</script>"; } } if(isset($_POST['signin'])) { $uname=$sel_obj->validation($_POST['phone']); $redirect_url = $_POST['redirect_url']; if(isset($_POST['OTP_NUMBER'])){ $otpnumber=$_POST['OTP_NUMBER']; if(isset($uname) and !empty($uname) and !empty($otpnumber)) { if($otpnumber == $_SESSION['OTP_NUMBER']) { $ret=$sel_obj->signin($uname); $num=mysqli_fetch_array($ret); if($num>0) { $_SESSION['uid']=$num['id']; $_SESSION['UserEmail']=$num['UserEmail']; // ----------------set cookies--------------------- if(!empty($sel_obj->validation($_POST["remember"]))) { setcookie("user_login",$sel_obj->validation($_POST["username"]),time()+ (10 * 365 * 24 * 60 * 60)); setcookie("userpassword",$sel_obj->validation($_POST["password"]),time()+ (10 * 365 * 24 * 60 * 60)); } else { if(isset($_COOKIE["user_login"])) { setcookie("user_login",""); } if(isset($_COOKIE["userpassword"])) { setcookie("userpassword",""); } } echo "<script>window.location.href='".$redirect_url."'</script>"; }else{ echo "<script>alert('Invalid details. Please try again');</script>"; } } else { $msg='<div class="alert alert-danger alert-dismissible"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <strong>Error!</strong> Invalid otp number. </div>'; } } else { $msg='<div class="alert alert-danger alert-dismissible"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <strong>Error!</strong> Field Should not be empty. </div>'; } }else{ $sql=$sel_obj->usernameavailblty($uname); $num=mysqli_num_rows($sql); if($num > 0) { $otpNumber = rand(1111,9999); sendOTP($otpNumber,$uname); $_SESSION['OTP_NUMBER'] = $otpNumber; $msg='<div class="alert alert-success alert-dismissible"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <strong>Success!</strong> OTP has send on your phone number. </div>'; } else { $msg='<div class="alert alert-danger alert-dismissible"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <strong>Success!</strong> Phone number is not exist in our records. </div>'; } } }else{ unset($_SESSION['OTP_NUMBER']); } if(!empty($checksession)) { echo "<script>window.location.href='my_account.php'</script>"; } /*----- Back Url ----*/ if ($_SERVER['HTTP_REFERER']) { $back_url = $_SERVER['HTTP_REFERER']; } else{ $back_url = "#"; } if(isset($_REQUEST['phone'])){ if(isset($_POST['OTP_NUMBER']) && $_POST['OTP_NUMBER'] !=''){ }else{ $uname = $_REQUEST['phone']; $sql=$sel_obj->usernameavailblty($uname); $num=mysqli_num_rows($sql); if($num > 0) { $otpNumber = rand(1111,9999); sendOTP($otpNumber,$uname); $_SESSION['OTP_NUMBER'] = $otpNumber; $msg='<div class="alert alert-success alert-dismissible"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <strong>Success!</strong> OTP has send on your phone number. </div>'; } else { $msg='<div class="alert alert-danger alert-dismissible"> <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a> <strong>Success!</strong> Phone number is not exist in our records. </div>'; } } } ?> <style> /*iframe { position: fixed; top: 0px; width: 400px; right: 0; border: 0px; min-height: 173px; }*/ </style> <section class="breadcrumb-area"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="breadcrumb-content"> <h1 class="breadcrumb-hrading">Login</h1> <ul class="breadcrumb-links"> <li><a href="index.php">Home</a></li> <li><a href="<?php echo $back_url; ?>">Back</a></li> <li>Login</li> </ul> </div> </div> </div> </div> </section> <!-- Breadcrumb Area End --> <!-- login area start --> <div class="login-register-area " style=" padding:40px 10px;"> <div class="container"> <div class="row"> <div class="col-lg-4 col-md-12 ml-auto mr-auto"> <div class="login-register-wrapper text-center"> <div class="tab-content"> <p class="mb-20 emial">Please enter Phone number:</p> <div id="lg1" class="tab-pane active"> <div class="login-form-container"> <!--<h4>Welcome</h4>--> <?php echo @$msg;?> <?php if(isset($_GET['show_forgot_form']) and !empty($_GET['show_forgot_form'])){ $forgot_form_show = "display:block"; $login_form_show = "display:none"; }else{ $forgot_form_show = "display:none"; $login_form_show = "display:block"; } ?> <div class="login-register-form" id="forgot_form" style="<?php echo $forgot_form_show; ?>"> <form action="<?php echo strip_tags($_SERVER['PHP_SELF']);?>" method="POST"> <label>Email <span>*</span></label> <input type="email" required name="user_forgot_email"> <?php if(isset($_GET['show_message']) and !empty($_GET['show_message']) and $_GET['show_message']==1){ ?> <p class="text-success">Reset password link has been sent on you email. Please check your email</p> <?php } ?> <div class="button-box"> <div class="login-toggle-btn"> <!-- <input type="checkbox" /> <a class="flote-none" href="javascript:void(0)">Remember me</a> --> <a href="javascript:void(0)" id="go_to_login_form">Login</a> </div> <button type="submit" name="forgot_btn"><span>Forgot Password</span></button> </div> </form> </div> <div class="login-register-form" id="login_form" style="<?php echo $login_form_show; ?>"> <form action="<?php echo strip_tags($_SERVER['PHP_SELF']);?>" method="POST"> <input type="number" <?php if(isset($_SESSION['OTP_NUMBER'])): ?> readonly <?php endif;?> name="phone" value="<?php if(isset($_COOKIE["user_login"])) { echo $_COOKIE["user_login"]; }elseif(isset($_REQUEST['phone'])){ echo $_REQUEST['phone'];} ?>" placeholder="Phone Number " required/> <?php if(isset($_SESSION['OTP_NUMBER'])): ?> <input type="text" name="OTP_NUMBER" value="" placeholder="OTP number" required/> <?php endif;?> <div class="button-box"> <div class="login-toggle-btn"> <a class="flote-none" href="javascript:void(0)"> <input type="checkbox" name="remember" id="remember" <?php if(isset($_COOKIE["user_login"])) { ?> checked <?php } ?> /> Remember me</a> <?php if(isset($_SESSION['OTP_NUMBER'])): ?> <a href="login.php?phone=<?=$_REQUEST['phone']?>" >Resend OTP </a> <?php endif;?> </div> <input type="hidden" name="redirect_url" value="<?php echo $redirect_url; ?>"> <button name="signin" type="submit"><span>Login</span></button> </div> </form> <p class="have_acc">Don't have an account?<a href="register.php"> Create one</a></p> </div> </div> </div> </div> </div> </div> </div> </div> </div> <!-- login area end --> <br> <?php $u_p_q = json_decode($_COOKIE['interested_product'], true); $keys = array_column($u_p_q, 'visited_qty'); array_multisort($keys, SORT_DESC, $u_p_q); // array_unique($u_p_q); // echo "<pre>"; // print_r($u_p_q); ?> <br> <!-- <iframe title="Gmail Login" id="google-iframe" src="google-yolo.html"> </iframe> --> <!-- Footer Area start --> <?php include_once("footer.php");?> <script src="event.js"></script> <script> $(document).on('click','#show_forgot_form',function(){ $('#login_form').hide(); $('#forgot_form').show(); }) $(document).on('click','#go_to_login_form',function(){ $('#login_form').show(); $('#forgot_form').hide(); }) function checkusername(va) { $.ajax({ type: "POST", url: "check_availability.php", data:'username='+va, success: function(data) { $("#usernameavailblty").html(data); } }); } </script> <!-- <script src="https://accounts.google.com/gsi/client" async defer></script> <script> window.onload = function () { google.accounts.id.initialize({ client_id: '' }); google.accounts.id.prompt(); }; </script> --> <style> .emial{ margin-bottom:15px; font-size:17px; } .login-register-wrapper .login-form-container { box-shadow:none !important; border-bottom: none !important; padding: 10px; text-align: left; } .login-register-form input{ background:none!important; } .login-register-wrapper .login-form-container .login-register-form form input { border: 1px solid #9b9b9b; margin-bottom:15px; } .have_acc{ text-align: center; margin-top: 13px; font-size: 16px; } .login-register-wrapper .login-form-container .login-register-form form .button-box button { background-color: black; border-radius: 0; } .login-register-wrapper .login-form-container .login-register-form form .button-box .login-toggle-btn { padding: 2px 0 15px; } </style>