<?php defined('BASEPATH') or exit('No direct script access allowed');
$this->load->view('themes/crmconnect/views/head-auth');
?>
<body <?php if(is_rtl()){ echo ' dir="rtl"'; } ?>>

  <?php /*<div class="d-flex align-items-center justify-content-center bg-gray-200 ht-100v">*/ ?>
  <div class="d-flex align-items-center justify-content-center bg-br-primary ht-100v" style="background-image: url('<?= base_url('assets/images/background.jpg'); ?>');background-repeat: no-repeat;background-position: center; background-size: cover; ">


    <div class="login-wrapper wd-300 wd-xs-400 pd-25 pd-xs-40 bg-white rounded-8 shadow-base">
      <div class="signin-logo tx-center tx-28 tx-bold tx-inverse mb-4"><?php get_crm_logo(); ?></div>
      <?php
      $f_contents = file(FCPATH.'/assets/crm/quotes-ro.txt');
      $quote = $f_contents[rand(0, count($f_contents) - 1)];
      ?>
      <div class="tx-center mg-b-40"><?= htmlentities($quote); ?></div>
      <?php echo form_open($this->uri->uri_string(),array('class' => 'login-form')); ?>
      <?php echo validation_errors('<div class="alert alert-danger text-center">', '</div>'); ?>
      <?php hooks()->do_action('clients_login_form_start'); ?>

          <?php /*if (!is_language_disabled()) { ?>
             <div class="form-group select-placeholder">
                <label for="language" class="control-label"><?php echo _l('language'); ?>
                </label>
                <select name="language" id="language" class="form-control selectpicker" onchange="change_contact_language(this)" data-none-selected-text="<?php echo _l('dropdown_non_selected_tex'); ?>" data-live-search="true">
                   <?php $selected = (get_contact_language() != '' ) ? get_contact_language() : get_option('active_language'); ?>
                   <?php foreach ($this->app->get_available_languages() as $availableLanguage) {
                   ?>
                      <option value="<?php echo $availableLanguage; ?>" <?php echo ($availableLanguage == $selected) ? 'selected' : '' ?>>
                         <?php echo ucfirst($availableLanguage); ?>
                      </option>
                   <?php } ?>
                </select>
             </div>
          <?php }*/ ?>


          <div class="form-group">
            <input type="text"class="form-control" name="email" id="email" placeholder="<?php echo _l('clients_login_email'); ?>" autofocus="1">
            <?php echo form_error('email'); ?>
          </div>

          <div class="form-group">
            <input type="password" name="password" id="password" class="form-control" placeholder="<?php echo _l('clients_login_password'); ?>">
            <?php echo form_error('password'); ?>
          </div>

          <?php if (show_recaptcha_in_customers_area()) { ?>
             <div class="g-recaptcha mbot15" data-sitekey="<?php echo get_option('recaptcha_site_key'); ?>"></div>
             <?php echo form_error('g-recaptcha-response'); ?>
          <?php } ?>
          <div class="checkbox">
             <input type="checkbox" name="remember" id="remember">
             <label for="remember">
                <?php echo _l('clients_login_remember'); ?>
             </label>
          </div>

          <button type="submit" class="btn btn-info btn-block"><?php echo _l('clients_login_login_string'); ?></button>
      <?php hooks()->do_action('clients_login_form_end'); ?>
      <?php echo form_close(); ?>
      <div class="tx-left mg-t-20">
        <a href="<?php echo site_url('authentication/forgot_password'); ?>"  class="tx-info"><?php echo _l('customer_forgot_password'); ?></a>
      </div>



      <div class="mg-t-20 tx-right"><a href="<?= base_url('admin'); ?>" class="tx-info"><?= _l('go_to_admin_area'); ?></a></div>

      <?php if (get_option('allow_registration') == 1) { ?>
         <a href="<?php echo site_url('authentication/register'); ?>" class="tx-info"><?php echo _l('clients_register_string'); ?>
         </a>
      <?php } ?>



    </div>
  </div>
</body>
</html>
