<?php

use home\assets\LoginAsset;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\captcha\Captcha;

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \home\models\LoginForm */

$asset = LoginAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=<?= Yii::$app->charset ?>" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">

                <title>用户登录<?= (isset($configs['web_name'])) ? ' - ' . $configs['web_name'] : '' ?></title>
<?php $this->head() ?>
                </head>
                <body>
<?php $this->beginBody() ?>
                    <!--nav-->
                    <div class="navbar navbar-default navtop" role="navigation">
                        <div class="container">
                            <!-- Brand and toggle get grouped for better mobile display -->
                            <div class="navbar-header">
                                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
                                <a class="navbar-brand logo logo-login" href="<? $_SERVER['PHP_SELF'] ?>"><?= (isset($configs['web_name'])) ? $configs['web_name'] : '' ?></a> <span class="user-login">|&nbsp;&nbsp;用户登录</span>  </div>
                        </div>
                        <!-- /.container-fluid -->
                    </div>


                    <style>
                        body{
                            background:url(<?= $asset->baseUrl . '/images/login_bg.gif' ?>) center 0 repeat-y #f1f1f1;
                        }
                        .container-project{
                            border:none;
                            margin-top:30px;
                            background:none
                        }
                        .copyright{
                            position: fixed;
                            width: 100%;
                            bottom: 0px;
                            left: 0px;
                        }

                    </style>
                    <!--container-->
                    <div class="container container-project" style="width:1170px">
                        <div class="left-login">
                            <p class="welcome-login">欢迎登录</p>
                            <?php
                            $form = ActiveForm::begin([
                                    'id' => '',
                                    'action' => "",
                                    'fieldConfig' => [
                                        'options' => [ 'tag' => 'tr'],
                                        'template' => '<td align="right" width="100">{label}</td><td>{input}{hint}{error}</td>',
                                    ]
                            ]);
                            ?>
                            <!-- <form id="#" class="informationform f14 loginform" method="post" action="#"> -->
                            <table cellpadding="0" cellspacing="0" width="70%" align="center">
                                <tbody>
                                    <?= $form->field($model, 'username')->textInput(['class' => 'form-control login-control'])->label('用户名：') ?>

                                    <?= $form->field($model, 'password')->passwordInput(['class' => 'form-control login-control'])->label('密&nbsp;&nbsp;&nbsp;码：') ?>

                                    <?=
                                    $form->field($model, 'verifyCode')->widget(
                                        Captcha::className(),
                                        [
                                        'captchaAction' => 'public/captcha',
                                        'template' => '{input} {image}',
                                        'options' => ['class' => 'form-control login-control login-control2', 'tag' => 'tr'],
                                        'imageOptions' => ['class' => 'validation', 'height' => 35],
                                        ]
                                    )->label('验证码：')
                                    ?>

                                            <?= $form->field($model, 'rememberMe')->checkbox(['class' => 'checkbox1']) ?>

                                    <tr>
                                        <td></td>
                                        <td>
<?= Html::submitButton('登&nbsp;&nbsp;录', ['class' => 'btn btn-primary btn-general save ']) ?>
                                    </tr>
                                </tbody>
                            </table>
                            <?php ActiveForm::end(); ?>
                        </div>
                        <!--left-login  -->

                        <div class="right-login">
<?php if (!empty($configs['web_logo'])): ?><img class="nlkj-logo" width="160" height="50" src= <?= $configs['web_logo'] ?>><?php endif; ?>
                        </div>
                        <!--right-login-->

                    </div>
                    <!--container-->

                    <p class="copyright"><?= (isset($configs['web_info'])) ? $configs['web_info'] : '' ?>&nbsp; 版权所有©<a href="http://www.u-bo.com" target="_blank">友博网络</a></p>
                <?php $this->endBody() ?>
                </body>
                </html>
<?php $this->endPage() ?>
