 <?php /** @var $l \OCP\IL10N */ ?>
<?php
vendor_script('jsTimezoneDetect/jstz');
script('core', 'merged-login');
/*先锋授权登陆js 加入判断
if($_['registration_app']['auth_login']==1){
    script('registration', 'xfsdk');
    script('registration', 'config');
}*/
use OC\Core\Controller\LoginController;
?>
<header id="header">
		<div class="header-left">
			<span id="nextcloud">
				<div class="logo logo-icon svg"></div>
				<h1 class="header-appname">
					<?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?>
				</h1>
				<div class="header-shared-by">
					<?php if (isset($template)) { p($template->getHeaderDetails()); } ?>
				</div>
			</span>
		</div>
 
		<div class="header-right">
			<span id="header-primary-action" class="topbtn">
				<a href="" class=" ">
					<span>  <?php p($l->t('登录')); ?> </span>
				</a>
			</span>
                        <span  class="topbtn"> | </span>
			<span id="header-primary-register" class="topbtn">
				<a href="" class=" ">
					<span>  <?php p($l->t('注册')); ?> </span>
				</a>
			</span>  
		</div>
		 
	</header>
 <div class="loginContent">
    <div class="welcome"><div class="slidepic"></div></div>
    <div class="welcome-form">

        <div class="authBox cloudLogin">
            <div class="allow">
                 <?php if (isset($_['apacheauthfailed']) && $_['apacheauthfailed']): ?>
                            <div class="warning">
                                    <?php p($l->t('Server side authentication failed!')); ?><br>
                                    <small><?php p($l->t('Please contact your administrator.')); ?></small>
                            </div>
                    <?php endif; ?>
                    <?php foreach($_['messages'] as $message): ?>
                            <div class="warning">
                                    <?php p($message); ?><br>
                            </div>
                    <?php endforeach; ?>
                    <?php if (isset($_['internalexception']) && $_['internalexception']): ?>
                            <div class="warning">
                                    <?php p($l->t('An internal error occurred.')); ?><br>
                                    <small><?php p($l->t('Please try again or contact your administrator.')); ?></small>
                            </div>
                    <?php endif; ?>
                    <div id="message" class="hidden">
                            <img class="float-spinner" alt=""
                                    src="<?php p(image_path('core', 'loading-dark.gif'));?>">
                            <span id="messageText"></span>
                            <!-- the following div ensures that the spinner is always inside the #message div -->
                            <div style="clear: both;"></div>
                    </div>
            </div>
            <h3><?php p($l->t('欢迎使用先锋云盘')); ?></h3>
            <p><?php p($l->t('影音先锋账号可直接登录')); ?></p>

            <form class="authForm" method="post" name="login" >
                <?php if (!empty($_['redirect_url'])) {
                    print_unescaped('<input type="hidden" name="redirect_url" value="' . \OCP\Util::sanitizeHTML($_['redirect_url']) . '">');
            } ?>
                <div class="line">
                    <span class="icon"><img src="/core/css/images/nich.png"/></span>
                   <input type="text" name="user" id="user"
                                    placeholder="<?php p($l->t('手机号或昵称')); ?>"
                                    aria-label="<?php p($l->t('手机号或昵称')); ?>"
                                    value="<?php p($_['loginName']); ?>"
                                    <?php p($_['user_autofocus'] ? 'autofocus' : ''); ?>
                                    autocomplete="<?php p($_['login_form_autocomplete']); ?>" autocapitalize="none" autocorrect="off" required>
                </div>
                 <div class="line">
                    <span class="icon"><img src="/core/css/images/mima.png"/></span>
                    <input type="password" name="password" id="password" value=""
                                    placeholder="<?php p($l->t('请输入您的密码')); ?>"
                                    aria-label="<?php p($l->t('请输入您的密码')); ?>"
                                    <?php p($_['user_autofocus'] ? '' : 'autofocus'); ?>
                                    autocomplete="<?php p($_['login_form_autocomplete']); ?>" autocapitalize="none" autocorrect="off" required>
                </div>

                <div class="btdiv">
                   <input type="submit" id="submit" class="button primary" title="" value="<?php p($l->t('Log in')); ?>" />    
                </div>


                <div class="showlink">
                    <span><a href="/xfpassport?redirect_url=<?php p($_['loginurl']); ?>" target="_blank" title="<?php p($l->t('找回先锋号密码')); ?>"><?php p($l->t('忘记密码')); ?></a></span>

                    <span><?php p($l->t('还没有账号？')); ?><a href="/xfreg?redirect_url=<?php p($_['loginurl']); ?>" target="_blank" title="<?php p($l->t('点击注册先锋号')); ?>"><?php p($l->t('点击注册')); ?></a></span>
                </div>
                <div class="other">
                    <fieldset>
                        <legend><?php p($l->t('第三方账号授权登陆')); ?></legend>
                        <div class="otherways">
                           <!-- <span><img src="/core/css/images/wechat.png"/></span>-->
                            <span><a href="http://test1.xfplay.com:20081/xfoauth/weixin?redirect_url=<?php p($_['selfurl']); ?>" title="<?php p($l->t('微信网页扫码登录')); ?>"><img src="/core/css/images/wechat.png"/></a></span>
                            <span><a href="http://test1.xfplay.com:20081/xfoauth/qq?redirect_url=<?php p($_['selfurl']); ?>" title="<?php p($l->t('QQ网页授权登录')); ?>"><img src="/core/css/images/qq.png"/></a></span>
                             <span><a href="http://test1.xfplay.com:20081/xfoauth/weibo?redirect_url=<?php p($_['selfurl']); ?>" title="<?php p($l->t('新浪微博网页授权登录')); ?>"><img src="/core/css/images/weibo.png"/></a></span>
                              
                            <!--    <span><img src="/core/css/images/weibo.png"/></span>-->
                           <!-- <span><a href="/erweima?redirect_url=<?php p($_['selfurl']); ?>"><img width="36" height="36" src="/core/css/xficon/login-logo.png"/></a></span>-->
                        </div>  
                    </fieldset>
                </div>
                    <input type="hidden" name="xfnickname" id="xfnickname"/><!--先锋号手机号转换-->
                    <input type="hidden" name="timezone_offset" id="timezone_offset"/>
                    <input type="hidden" name="timezone" id="timezone"/>
                    <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">    

                    <?php if (!empty($_[LoginController::LOGIN_MSG_INVALIDPASSWORD])) { ?>
                            <p class="warning wrongPasswordMsg">
                                    <?php p($l->t('Wrong password.')); ?>
                            </p>
                    <?php } else if (!empty($_[LoginController::LOGIN_MSG_USERDISABLED])) { ?>
                            <p class="warning userDisabledMsg">
                                    <?php p(\OC::$server->getL10N('lib')->t('User disabled')); ?>
                            </p>
                    <?php } ?>


            </form>

        </div>
    </div>
   
 </div>

<footer role="contentinfo">
			<p class="info">
				<?php print_unescaped($theme->getLongFooter()); ?>
			</p>
		</footer>