<?php
$CI = &get_instance();

$CI->load->model('dashboard/Themes');
$CI->load->model('dashboard/Companies');
$theme = $CI->Themes->get_theme();
$company_info = $CI->Companies->company_list();
?>
<section class="section-about py-4">
    <div class="container">

        <div class="row">
            <div class="col-md-10 offset-md-1 col-lg-6 offset-lg-3">
                <!-- Alert Message -->
                <?php
$message = $this->session->userdata('message');
if (isset($message)) {
	?>
                    <div class="alert alert-success alert-dismissible" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <?php echo $message ?>
                    </div>
                    <?php
$this->session->unset_userdata('message');
}
$error_message = $this->session->userdata('error_message');
if (isset($error_message)) {
	?>
                    <div class="alert alert-danger alert-dismissible" role="alert">
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                        <?php echo $error_message ?>
                    </div>
                    <?php
$this->session->unset_userdata('error_message');
}
?>

                <div class="section-title text-center mb-0 mt-5">
                    <!-- <h2 class="fs-28 font-weight-normal"><?php echo display('welcome_back_to_login') ?></h2> -->
                    <h2 class="fs-28 font-weight-normal pink"><?php echo display('welcome_to_login') ?></h2>
                </div>


            </div>
        </div>
        <hr class="customgrey mt-0">
        <div class="row justify-content-center">
            <div class="col-md-6 col-12">
                <div class=" border-0">
                    <div class="">
                        <div class="accordion" id="accordionExample">
                            <div id="collapseOne" class="collapse show" data-parent="#accordionExample">
                                <div class="form-title_wrap mt-5 mb-4 text-center">
                                    <h4 class="form-title mb-0"><?php echo display('login') ?></h4>
                                </div>
                                <!--Login Form-->
                                <?php echo form_open(base_url() . 'do_login'); ?>
                                    <div class="form-group">
                                        <input type="email" class="form-control" name="email" id="user_login_email" value="<?php echo set_value('email') ?>" placeholder="<?php echo display('email') ?>">
                                    </div>
                                    <div class="form-group">
                                        <input type="password" class="form-control" name="password" id="user_login_password" placeholder="<?php echo display('password') ?>">
                                    </div>
                                    <!-- <div class="d-flex justify-content-between mb-3"> -->
                                    <!-- <div class="d-flex justify-content-start mb-3">
                                        <div class="custom-control custom-checkbox">
                                            <input type="checkbox" class="custom-control-input" id="remember_me" name="remember_me" style="z-index: 1;">
                                            <label class="custom-control-label" for="remember"><?php echo display('remember_me') ?></label>
                                        </div>
                                         <a href="<?php echo base_url('forget_password_form') ?>" class="forgot d-block text-left"><?php echo display('i_have_forgotten_my_password') ?></a>
                                    </div> -->

                                     <input type="hidden" name="recaptcha_response" id="recaptchaResponse">

                                    <!-- <button type="submit" class="btn btn-primary btn-block color4"><?php echo display('login') ?></button> -->
                                    <button type="submit" class="btn  btn-block pinkbutton    "><?php echo display('login_now') ?></button>
                                <?php echo form_close(); ?>
                            </div>
                        </div>
                    </div>
                    <!-- added register row -->
                    <div class="d-flex justify-content-center my-4">
                         <div class="signup-section mx-2 col-4 text-right"> <a href="<?php echo base_url('signup') ?>" class="greylinkbutton"><?php echo display('sign_up'); ?></a></div>
                         <div class="" style="
    border-right: 1px #bdbdbd solid;">
                         </div>

                         <a href="<?php echo base_url('forget_password_form') ?>" class="greylinkbutton mx-2 col-4"><?php echo display('i_have_forgotten_my_password') ?></a>
                    </div>
                    <!-- end added register row -->

                 <!--    <div class="d-flex justify-content-center">
                        <div class="signup-section"><?php echo display('dont_have_an_account'); ?> <a href="<?php echo base_url('signup') ?>" class="text-primary color42"><?php echo display('sign_up'); ?></a></div>
                    </div> -->
                </div>
                <div class="row mt-5 d-none">
                    <div class="col-md-6 form-group">
                         <?php if (check_module_status('googlelogin') == 1) {
	?>
                            <a class="btn btn-google btn-sm btn-block  search text-white" href="<?php echo base_url('googlelogin/googlelogin/login') ?>"><i class="fab fa-google mr-5"></i> <?php echo display('google_login') ?></a>
                        <?php }?>
                    </div>
                    <div class="col-md-6 form-group">
                        <?php if ((check_module_status('facebooklogin') == 1)) {
	?>
                            <a class="btn btn-facebook btn-sm btn-block  search text-white" href="<?php echo base_url('facebooklogin/facebooklogin/index/1') ?>"><i class="fab fa-facebook mr-5"></i> <?php echo display('facebook_login') ?></a>
                        <?php }?>
                    </div>
                    <div class="col-md-6 form-group">
                        <?php if ((check_module_status('linkedinlogin') == 1)) {?>
                            <a class="btn btn-linkedin btn-sm btn-block  search text-white" href="<?php echo base_url('linkedinlogin/linkedinlogin/login/1') ?>"><i class="fab fa-linkedin mr-5"></i> <?php echo display('linkedin_login') ?></a>
                        <?php }?>
                    </div>
                </div>

            </div>
        </div>

    </div>
</section>
<!-- google recaptcha -->
      <script src='https://www.google.com/recaptcha/api.js?render=<?php echo $this->config->item('google_captcha_public_key') ?>'></script>

    <script>
        grecaptcha.ready(function () {
            grecaptcha.execute('<?php echo $this->config->item('google_captcha_public_key') ?>', { action: 'contact' }).then(function (token) {
                var recaptchaResponse = document.getElementById('recaptchaResponse');
                recaptchaResponse.value = token;
            });
        });
    </script>

    <!-- end google recaptcha -->