 <?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\XfplayLoginController;
?>
<header id="header">
		<div class="header-left">
			<span id="xfhead">
                            <h1 class="xflogo"><?php p($l->t('先锋号')); ?></h1>
			</span>
                    <?php if($_['step']=='showErweima'){?>
                    <span class="xftitle"> |  </span>
                    <span class="xftitle"><?php p($l->t('扫码登陆')); ?></span>
                    <?php } ?>
                    
		</div>
 
		<div class="header-right xfhead-right">
			<span id="header-primary-action" class="topbtn">
				<a href="/xflogin" class=" ">
					<span>   <?php p($l->t('登录')); ?></span>
				</a>
			</span>
                        <span  class="topbtn"> | </span>
			<span id="header-primary-register" class="topbtn">
				<a href="/xfreg" class=" ">
					<span>   <?php p($l->t('注册')); ?></span>
				</a>
			</span>  
		</div>
		 
	</header>

 <div class=" showLoginForm">
    <div class="welcome"><div class="xfloginslide"></div></div>
    <div class="xflogin-form">
            <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>
        <div class="authBox">

            <h3><?php p($l->t('登陆先锋号')); ?></h3>
           

            <form class="authForm" method="post" name="erweimaLogin" >
                <?php if (!empty($_['redirect_url'])) {
                    print_unescaped('<input type="hidden" name="redirect_url" value="' . \OCP\Util::sanitizeHTML($_['redirect_url']) . '">');
            } ?>
                <div class="login-title"> 
                    <p class="saoma"><i class="icon-saomass"></i> 扫一扫登录</p>
                    <p style="text-align:center;">打开<span style="color:#3c89e9">影音先锋APP</span> ，扫码登录</p> 
                </div>
                
                <div id="erweima-box" class="erweima-form">
                    
                     <div class="erweima-warn erweimab hidden ">
                    <div class="icon"><i class="soc"></i></div>
                        <div class="notice">
                            <p><?php p($l->t('登陆失败，刷新重试')); ?></p>
                        </div>
                    </div>
                    <div class="erweima-show erweimab">
                            <canvas class="avatar align-self-center" height="142" width="142"></canvas> 

                       </div>
                    <div class="erweima-refresh erweimab hidden">
                    <div class="icon"><i class="soc"></i></div>
                    <div class="notice">
                        <p> <?php p($l->t('已过期，刷新重试…')); ?></p>
                    </div>
                </div>
                
                <div class="erweima-confirm erweimab hidden">
                    <div class="icon"><i class="soc"></i></div>
                    <div class="notice">
                        <p><?php p($l->t('扫码成功')); ?></p>
                        <p><?php p($l->t('请在手机上确认登录')); ?></p>
                    </div>
                </div>
                <div class="erweima-loading erweimab hidden">
                    <div class="icon"><i class="soc"></i></div>                    
                </div>
                <div class="erweima-success erweimab hidden">
                    <div class="icon"><i class="soc"></i></div>
                    <div class="notice">
                        <p><?php p($l->t('已确认')); ?> </p>
                        <p><?php p($l->t('正在登录，请等待…')); ?></p>
                    </div>
                </div>
                </div>
                 <fieldset id="fieldesPanel" class="buttons">
                            
                        <a class="button primary refresh-qrcode "> <?php p($l->t('二维码生成中…')); ?></a>                     
             
                   
                     </fieldset>
                
            </form>

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

<footer role="contentinfo">
		  <p class="info">
              <?php p($l->t('版权所有')); ?> @copy 2005-<?php p(date('Y'));?> <?php p($l->t('零与壹软件.保留所有权利')); ?>
        </p>
		</footer>