<?php
defined('_JEXEC') or die;
JHtml::_('bootstrap.framework');
$twofactormethods = JAuthenticationHelper::getTwoFactorMethods();
$app = JFactory::getApplication();

?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <?php require 'lib/index_inc.php'; ?>
    <link rel="stylesheet" href="<?php echo $template; ?>css/offline.css?<?php echo $rand_query; ?>" type="text/css" />
    <script src="<?php echo $template; ?>js/offline.js?<?php echo $rand_query; ?>" type="text/javascript"></script>
</head>
<?php $offline = new ml_template_helper();?>
<body id='ml_offline'>
    <div class="container-fluid">
        
        <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12 offline-logo">
            <img src="<?php echo $logo ?>" height="<?php echo $params->get('logo-height', 45) ?>" width="<?php echo $params->get('logo-width', 216) ?>" alt="<?php echo $params->get('sitetitle') ?>"/>
        </div>
        <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">

<?php echo $offline->offline_text($params,$app); ?>
        </div>
        <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
<?php echo $offline->inizializze_counter($params); ?> 
        </div>
         <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
             <div class="offline-login"><i class="fa fa-user" aria-hidden="true"></i> &nbsp;<?php echo JText::_("TPL_OFFLINE_ADMIN_LOGIN")?></div> 
        </div>
      
        <div class="col-md-4 col-lg-4 col-md-offset-4 col-lg-offset-4 col-sm-12 col-xs-12 login-box">
            
            <jdoc:include type="message" />
                <form action="<?php echo JRoute::_('index.php', true); ?>" method="post" id="form-login">
                    <fieldset>
                        <label for="username"><?php echo JText::_('JGLOBAL_USERNAME'); ?></label>
                        <input name="username" id="username" type="text" title="<?php echo JText::_('JGLOBAL_USERNAME'); ?>" />

                        <label for="password"><?php echo JText::_('JGLOBAL_PASSWORD'); ?></label>
                        <input type="password" name="password" id="password" title="<?php echo JText::_('JGLOBAL_PASSWORD'); ?>" />

<?php if (count($twofactormethods) > 1) : ?>
                            <label for="secretkey"><?php echo JText::_('JGLOBAL_SECRETKEY'); ?></label>
                            <input type="text" name="secretkey" id="secretkey" title="<?php echo JText::_('JGLOBAL_SECRETKEY'); ?>" />
                        <?php endif; ?>
<div class="offline-login-button">
                        <input type="submit" name="Submit" class="btn btn-primary" value="<?php echo JText::_('JLOGIN'); ?>" />
</div>
                        <input type="hidden" name="option" value="com_users" />
                        <input type="hidden" name="task" value="user.login" />
                        <input type="hidden" name="return" value="<?php echo base64_encode(JUri::base()); ?>" />
<?php echo JHtml::_('form.token'); ?>
                    </fieldset>
                </form>
            <div class="clearfix"></div>
            </div>
        <div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
            <?php echo $offline->offline_copyright($params);?>
        </div>
    </div>
     <div class="clearfix"></div>
</body>
</html>