<?php $this->load->view('common_front/header');?>
	
	<!-- Banners -->
<div class="page-banner about-us">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <h4>Login</h4>
                <p><a href="<?= base_url()?>">Home</a> &nbsp; | &nbsp; <span>Login</span></p>
            </div>
           
        </div>
    </div>
</div>


<!-- section 1 -->
    <div class="section" >
    <div class="container">
            <div class="row">
                <div class="col-sm-6 col-sm-offset-3">
                    <div class="login_box">
                        <?php 
                    if($this->session->flashdata('msg')!=''){
                        echo '<div class="alert alert-success alert-dismissible">
                              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                              <strong>'.$this->session->flashdata('msg').'</strong> 
                            </div>';
                    }
                    if($this->session->flashdata('err')!=''){
                        echo '<div class="alert alert-danger alert-dismissible">
                              <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a>
                              <strong>'.$this->session->flashdata('err').'</strong> 
                            </div>';
                    }
                ?>
                          <p>
                                <a href="<?= base_url()?>">
                                        <img src="<?= base_url('public/front/')?>images/logo.png" alt="" class="img-responsive center-block">
                                    </a>
                          </p>
                          <p class="para text-center">Login with</p>
                          <div id="gSignIn" style="float: right;"></div>
<!-- <div id="status"></div> -->

<!-- Facebook login or logout button -->

<!-- Display user profile data -->
<!-- <div id="userData"></div> -->
<!-- Show the user profile details -->
<!-- <div class="userContent" style="display: none;"></div> -->
                            <p class="text-center"><a href="javascript:void(0);" onclick="fbLogin()" id="fbLink" class="facebok-link"><i class="fa fa-facebook-f"></i> &nbsp; FACEBOOK</a> </p>
                            <P class="or-line"><span>OR</span></P>
                        <form action="<?= base_url('signin')?>" method="post">
                            <div class="form-group">
                                <label for="">Email</label>
                                <input type="text" placeholder="Email Id" name="email" class="form-control">
                            </div>
                            <div class="form-group">
                                    <label for="">Password</label>
                                    <input type="password" placeholder="Password" name="password" class="form-control">
                            </div>
                            <div class="form-group">
                                    <p class="para">Forget password ? <a href="<?= base_url('forget-password')?>" class="text-danger"><small>Reset Password</small></a></p>
                            </div>
                           <div class="row">
                                <div class="col-sm-12 text-center"> 
                                    <button type="submit" class="btn btn-success">Login</button> OR
                                 <a href="<?= base_url('signup')?>" class="btn btn-md btn-primary">Register Now</a>
                            </div>
                        </div>
                            
                        </form>
                    </div>
                </div>
            </div>
    </div>
    </div>


<?php $this->load->view('common_front/footer');?>
<script src="https://apis.google.com/js/client:platform.js?onload=renderButton" async defer></script>
<script>
// Render Google Sign-in button
function renderButton() {
    gapi.signin2.render('gSignIn', {
        'scope': 'profile email',
        'width': 240,
        'height': 50,
        'longtitle': true,
        'theme': 'dark',
        'onsuccess': onSuccess,
        'onfailure': onFailure
    });
}

// Sign-in success callback


// Sign out the user
/*function signOut() {
    var auth2 = gapi.auth2.getAuthInstance();
    auth2.signOut().then(function () {
        document.getElementsByClassName("userContent")[0].innerHTML = '';
        document.getElementsByClassName("userContent")[0].style.display = "none";
        document.getElementById("gSignIn").style.display = "block";
    });
    
    auth2.disconnect();
}*/
</script>
