<!DOCTYPE html>
<html lang="en">
<head>
    <title>My Circle | Login</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <meta name="description" content="..." />
    <meta name="author" content="Admin Panel" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <!--<link rel="shortcut icon" href="<?php echo base_url(); ?>public/admin/assets/img/favicon.png">-->
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <!-- app favicon -->

    <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">
    <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/admin/assets/css/vendors.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/admin/assets/css/style.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/admin/assets/css/custom.css" />
    
</head>

<body class="">
    <!-- begin app -->
    <div class="app">
        <!-- begin app-wrap -->
        <div class="app-wrap">
            <!-- begin pre-loader -->
            <div class="loader">
                <div class="h-100 d-flex justify-content-center">
                    <div class="align-self-center">
                        <img src="<?php echo base_url(); ?>public/admin/assets/img/loader/loader.svg" alt="loader">
                    </div>
                </div>
            </div>
            <!-- end pre-loader -->

            <!--start login contant-->
            <section class="login-sec">
                <div class="container-fluid p-0">
                    <div class="row no-gutters">
                          <div class="col-md-12 text-center"><img src="<?php echo base_url(); ?>public/admin/assets/img/logo.png"></div>
                        <div class="col-md-6 offset-md-3">
                            <div class="form-content">
                              
                                <h3>Sign in Your Account</h3>
                                <?php display_response_messages(); ?>
                                
                                <?php echo form_open ( base_url ( 'admin/auth/login' ), array ( 'id' => 'admin_login_form', 'autocomplete' => 'off' ) ); ?>
                                    <div class="form">
                                        <?php $error = form_error ( 'email' ); ?>
                                        <div class="form-group <?php if ( $error ) { echo 'has-error has-danger'; } ?> mb-4">
                                            <label class="control-label" for="email">Email</label>
                                            <input type="email" name="email" id="email" class="form-control" value="<?php echo (isset($_POST['email'])?$_POST['email']:''); ?>" placeholder="Enter you email address">
                                            <?php
                            				if ( $error ) {
                            					echo '<div class="error">' . $error . '</div>';
                            				}
                            				?>
                                        </div>
                                        
                                        <?php $error = form_error ( 'password' ); ?>
                                        <div class="form-group position-relative <?php if ( $error ) { echo 'has-error has-danger'; } ?>">
                                            <label class="control-label" for="password">Password</label>
                                            <input type="password" name="password" id="password" class="form-control" value="<?php echo (isset($_POST['password'])?$_POST['password']:''); ?>" placeholder="Enter your password">
                                            <span id="togglePassword" class="position-absolute" style="cursor: pointer;">
                                        <svg width="24" height="24" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                                          <path d="M9.99993 13.6083C8.00827 13.6083 6.3916 11.9916 6.3916 9.99993C6.3916 8.00827 8.00827 6.3916 9.99993 6.3916C11.9916 6.3916 13.6083 8.00827 13.6083 9.99993C13.6083 11.9916 11.9916 13.6083 9.99993 13.6083ZM9.99993 7.6416C8.69993 7.6416 7.6416 8.69993 7.6416 9.99993C7.6416 11.2999 8.69993 12.3583 9.99993 12.3583C11.2999 12.3583 12.3583 11.2999 12.3583 9.99993C12.3583 8.69993 11.2999 7.6416 9.99993 7.6416Z" fill="#C5C0C0"></path>
                                          <path d="M10.0001 17.5165C6.86681 17.5165 3.90848 15.6832 1.87515 12.4998C0.991813 11.1248 0.991813 8.88315 1.87515 7.49982C3.91681 4.31649 6.87515 2.48315 10.0001 2.48315C13.1251 2.48315 16.0835 4.31649 18.1168 7.49982C19.0001 8.87482 19.0001 11.1165 18.1168 12.4998C16.0835 15.6832 13.1251 17.5165 10.0001 17.5165ZM10.0001 3.73315C7.30848 3.73315 4.73348 5.34982 2.93348 8.17482C2.30848 9.14982 2.30848 10.8498 2.93348 11.8248C4.73348 14.6498 7.30848 16.2665 10.0001 16.2665C12.6918 16.2665 15.2668 14.6498 17.0668 11.8248C17.6918 10.8498 17.6918 9.14982 17.0668 8.17482C15.2668 5.34982 12.6918 3.73315 10.0001 3.73315Z" fill="#C5C0C0"></path>
                                        </svg>
                                  </span> 
                                            <?php
                            				if ( $error ) {
                            					echo '<div class="error">' . $error . '</div>';
                            				}
                            				?>
                                        </div>
                                        <div class="d-sm-flex justify-content-between">
                                            <div class="field-wrapper forgot-passwd">
                                                <a href="<?php echo base_url ( 'admin/auth/forgot_password' ); ?>" class="forgot-pass-link">
                                                    <i class="ti ti-lock pr-2"></i>
                                                    Forgot Password?
                                                </a>
                                            </div>
                                        </div>

                                        <div class="mt-5">
                                            <div class="field-wrapper">
                                                <input type="submit" name="submit" class="btn btn-block text-white" value="Login"/>
                                            </div>
                                        </div>

                                    </div>
                                <?php echo form_close(); ?>
                            </div>
                        </div>
                    </div>
                </div>
            </section>
          
        </div>
        <!-- end app-wrap -->
    </div>
    <!-- end app -->
 <script>
        document.getElementById('togglePassword').addEventListener('click', function () {
            var passwordField = document.getElementById('password');
            var passwordFieldType = passwordField.getAttribute('type');
            
            if (passwordFieldType === 'password') {
              passwordField.setAttribute('type', 'text');
            } else {
              passwordField.setAttribute('type', 'password');
            }
          });
    </script>
    <!-- plugins -->
    <script src="<?php echo base_url(); ?>public/admin/assets/js/vendors.js"></script>

    <!-- custom app -->
    <script src="<?php echo base_url(); ?>public/admin/assets/js/app.js"></script>
</body>

</html>