<?php 
ob_start(); 
error_reporting(0);
include("connect.php");
session_start(); 
if(!isset($_SESSION["distributor_user_id"])){
   header('location:https://tarkashcorp.appexperts.net/index.php');
}
?>
<!DOCTYPE html>
<html lang="en">

    <head>
        <meta charset="utf-8" />
        <title>Tarkashcorp | Admin Dashboard</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="width=device-width, initial-scale=1" name="viewport" />
        <meta content="Preview page of Metronic Admin Theme #6 for " name="description" />
        <meta content="" name="author" />
        <!-- BEGIN GLOBAL MANDATORY STYLES -->
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />
        <link href="assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <link href="assets/global/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css" />
        <link href="assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="assets/global/plugins/bootstrap-switch/css/bootstrap-switch.min.css" rel="stylesheet" type="text/css" />
        <!-- END GLOBAL MANDATORY STYLES -->
        <!-- BEGIN PAGE LEVEL PLUGINS -->
        <link href="assets/global/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />
        <link href="assets/global/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- END PAGE LEVEL PLUGINS -->
        <!-- BEGIN THEME GLOBAL STYLES -->
        <link href="assets/global/css/components.min.css" rel="stylesheet" id="style_components" type="text/css" />
        <link href="assets/global/css/plugins.min.css" rel="stylesheet" type="text/css" />
        <!-- END THEME GLOBAL STYLES -->
        <!-- BEGIN PAGE LEVEL STYLES -->
        <link href="assets/pages/css/login.min.css" rel="stylesheet" type="text/css" />
        <!-- END PAGE LEVEL STYLES -->
        <!-- BEGIN THEME LAYOUT STYLES -->
        <!-- END THEME LAYOUT STYLES -->
        <link rel="shortcut icon" href="favicon.ico" />
		
		<style>
		::-webkit-scrollbar {
		display: none;
		overflow: hidden;
		}
		</style>
		<script>
		window.onscroll = function () {
		window.scrollTo(0,0);
		}
		</script>	
		</head>
    <!-- END HEAD -->
			<script>
    function validation(){
    var u=document.forms["myform"]["email"].value;
    var p=document.forms["myform"]["password"].value;
    if(u==null || u==""){
	 alert("Please enter email");
	 document.forms["myform"]["email"].focus();
	 return false;
    }else if(p==null || p==""){
	alert("Please enter password");
	document.forms["myform"]["password"].focus();
	return false;
	}
	return true;
	}
    </script>	
		</head>
    <!-- END HEAD -->

    <body class=" login">
        <!-- BEGIN : LOGIN PAGE 5-2 -->
        <div class="user-login-5">
            <div class="row bs-reset">
                <div class="col-md-6 login-container bs-reset">
                    <img class="login-logo login-6" src="http://bthawk.belltechnology.in/img/header/BTHAWK.png"  />
                    <div class="login-content" style="margin-top:29%;">
					<?php
					$ver=base64_decode($_GET['logid']);
					?>
                        <h1>Admin Login Confirmation</h1>
                        <p style="color:#F44336; font-size:16px;">You were already logged in. Please confirm to continue with this login. Your previous session will be destroyed!!</p>
                        <form id="signup" name="myform" method="post" onsubmit="return validation()" style="margin-top:20px;" class="login-form" >
								<br clear="all">
                            <div class="row">
								<div class="col-sm-7" style="padding-left:5px;padding-right:5px;">
                                   
									<input id="submit" type="submit" name="subContinue" class="btn blue"  value="Continue"/>
									<input id="submit" type="submit" name="subCancel" class="btn red"  value="Cancel"/>
                                </div>
								<div class="col-sm-5 text-right" style="margin-top:3%;">
                                   
									<a href="forgetpassword.php">Forgot Password ?</a>
                            </div>
								<br clear="all"><br><br><br>
                            <div class="col-sm-5 text-left">
                                    <label class="terms"><b><br>Download Sales Executive App</b>
				<a href='https://play.google.com/store/apps/details?id=belltechnology.in.bthawk&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1' target="_blank"><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' style='width:180px; height:60px;'/></a>
                                </div>
								
								 <div class="col-sm-5 text-left">
                                    <label class="terms"><b><br>Download Distributor App</b>
				<a href='https://play.google.com/store/apps/details?id=belltechnology.in.bthawkadmin&hl=en' target="_blank"><img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' style='width:180px; height:60px;'/></a>
                                </div>
                               
                            </div>
                        </form>
                        <!-- BEGIN FORGOT PASSWORD FORM -->
                        <form class="forget-form" action="javascript:;" method="post">
                            <h3>Forgot Password ?</h3>
                            <p> Enter your e-mail address below to reset your password. </p>
                            <div class="form-group">
                                <input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Email" name="email" /> </div>
                            <div class="form-actions">
                                <button type="button" id="back-btn" class="btn blue btn-outline">Back</button>
                                <button type="submit" class="btn blue uppercase pull-right">Submit</button>
                            </div>
                        </form>
                        <!-- END FORGOT PASSWORD FORM -->
                    </div>
					<?php
					#Get value from  login form
					if(isset($_POST['subCancel'])){
						header("location:https://testbthawk.appsmarche.com/");
					}
					
					if(isset($_POST['subContinue']))
					{
						
						 $r_temp=session_id();
						$temp_time=time();
						$res_search = mysqli_query($con,"select * from tbl_distributor_users where distributor_user_id='$ver'");
						$a21=mysqli_fetch_array($res_search);
						
						$uq1=mysqli_query($con,"UPDATE tbl_distributor_users SET login_datetime='$temp_time',session_id='$r_temp',activity_time='$temp_time' where distributor_user_id='$ver'");
						#store all fetch data in session.
						$_SESSION['user_id']=$a21['distributor_id'];
						$_SESSION['dis_user_id']=$ver;
						
						$check_dis_id=$a21['distributor_id'];
						$res11 = mysqli_query($con,"Select * from tbl_distributor where distributor_id='$check_dis_id'");
						while($row11=mysqli_fetch_assoc($res11))
						{
							$_SESSION['serialno_sale']=$row11['serialno_sale'];
							$flag_temp=1;
						}
						$_SESSION['user_role']=$a21['user_role'];
						$_SESSION['user_session']=$r_temp;
						if($flag_temp==1)
							header("location:dashboard.php");
					}
					?>          
                    <div class="login-footer">
                        <div class="row bs-reset">
                            <div class="col-xs-4 bs-reset">
                                <ul class="login-social">
                                    <li>
                                        <a href="https://www.facebook.com/Bell.BTHawk/" target="_blank">
                                            <i class="icon-social-facebook"></i>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="https://twitter.com/Bell_BTHawk" target="_blank">
                                            <i class="icon-social-twitter"></i>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="https://www.youtube.com/channel/UCDNdYQlZ1A3SYItyfGKtCgA/videos" target="_blank">
                                            <i class="icon-social-youtube"></i>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <div class="col-xs-5 bs-reset">
                                <div class="login-copyright text-right">
                                    <p>Copyright &copy; Bell Technology 2017</p>
                                </div>
                            </div>
							<div class="col-xs-3 bs-reset">
									<img style="width:75px; height:75px; margin-top:-19%" src="https://testbthawk.appsmarche.com/assets/comodo_secure_seal_100x85_transp.png"  />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 bs-reset">
                    <div class="login-bg"> </div>
                </div>
            </div>
        </div>
        <!-- END : LOGIN PAGE 5-2 -->
        <!--[if lt IE 9]>
<script src="assets/global/plugins/respond.min.js"></script>
<script src="assets/global/plugins/excanvas.min.js"></script> 
<script src="assets/global/plugins/ie8.fix.min.js"></script> 
<![endif]-->
        <!-- BEGIN CORE PLUGINS -->
        <script src="assets/global/plugins/jquery.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/js.cookie.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/jquery.blockui.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/bootstrap-switch/js/bootstrap-switch.min.js" type="text/javascript"></script>
        <!-- END CORE PLUGINS -->
        <!-- BEGIN PAGE LEVEL PLUGINS -->
        <script src="assets/global/plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/jquery-validation/js/additional-methods.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/select2/js/select2.full.min.js" type="text/javascript"></script>
        <script src="assets/global/plugins/backstretch/jquery.backstretch.min.js" type="text/javascript"></script>
        <!-- END PAGE LEVEL PLUGINS -->
        <!-- BEGIN THEME GLOBAL SCRIPTS -->
        <script src="assets/global/scripts/app.min.js" type="text/javascript"></script>
        <!-- END THEME GLOBAL SCRIPTS -->
        <!-- BEGIN PAGE LEVEL SCRIPTS -->
        <script src="assets/pages/scripts/login-5.min.js" type="text/javascript"></script>
        <!-- END PAGE LEVEL SCRIPTS -->
        <!-- BEGIN THEME LAYOUT SCRIPTS -->
        <!-- END THEME LAYOUT SCRIPTS -->
        <script>
            $(document).ready(function()
            {
                $('#clickmewow').click(function()
                {
                    $('#radio1003').attr('checked', 'checked');
                });
            })
        </script>
    </body>

</html>