<?php include pTemplate("header");?>

<script type="text/javascript">
var S = function( object ) {
return document.getElementById( object );
};
function showMsg( msgId , method,txt) {

var msg, msgTemplate;

msg = {
errorUserName       : "您输入的邮箱帐号不正确，请重新输入。",
emptyUserName       : "帐号为空，请重输。",
emptyPassword       : "请填写您的帐号密码。",
emptyVerifyCode     : "请填写验证码。"
};





if ( method && method == 2)
{
msgTemplate = '<div class=" error" id="%_id_%">%_msg_%</div>';
}
else
{
msgTemplate = '<div class=" error" id="%_id_%">%_msg_%</div>';
}



if ( msgId != undefined && msgId != "" )
{
if(!txt) txt = msg[ msgId ];
S( "msgContainer" ).innerHTML = msgTemplate.replace( /%_msg_%/ig , txt ).replace( /%_id_%/ig , msgId );
S( "msgContainer" ).style.display = "";
return true;
}
else
{
return false;
}

}

function changeimg(){
	S("vfcode").src=S("vfcode").src+'?';
	
}

function checkInput()
{
	var loginname = document.form1.loginname.value.toLowerCase();
	if( loginname == "" )
	{
		showMsg("emptyUserName");
		document.form1.loginname.focus();
		return false;
	}
	if( document.form1.pwd.value == "" )
	{
	showMsg("emptyPassword");
	document.form1.pwd.focus();
	return false;
	}
	<?php if($_SESSION['LoginError']>=$_G['siteinfo']['SiteVerifyCode']) { ?>
	if(document.form1.verifycode.value == "" )
	{
	showMsg("emptyVerifyCode");
	document.form1.verifycode.focus();
	return false;
	}
	<?php } ?>
}
</script>
        <div class="loginContainer">
            <div class="wd loginMain" style="text-align:left; min-height:300px; background:url(<?php echo PUBURL;?>images/login_banner.jpg) no-repeat;">
                <form name="form1" method="post" action="<?php echo SITEURL;?>?mod=login&do=login&c=ac" onSubmit="return checkInput();">
                
                <input name="jumpurl" type="hidden" value="<?php echo $jumpurl;?>">
                   
                    <div style="padding: 40px 20px 30px 400px;">
                    
                    <div class="return_message" style="display:none" id="infobarNoCookie">
                            <div class="re_mes_t txt_alert">
                               用于登录的提示信息。
                            </div>
                        </div>
                        
                        <div class="loginPanel">
                            <div class="loginPanelTop">
                                <div class="loginPanelBottom">
                                    <div class="logintitle bold" style="">
                                        登录<?php echo $SiteInfo['SiteName'];?>
                                    </div>
                                    <div class="loginContent" style="">
                                        <div style="border-bottom:1px solid #e6eaf5;border-top:1px solid #7390bf;overflow:hidden;">
                                        </div>
                                        <div style="height:18px;overlfow:hidden;">
                                            <div id="msgContainer" style="margin:5px 0 10px 0px; *width:100%; padding:1px 0 0 2px;">
                                            </div>
                                        </div>
                                        <div style="height:25px;">
                                        <label for="uin" class="column">
                                            帐　号：
                                        </label>
                                        <input class="txt text" type="text" id="loginname" name="loginname" value="" tabindex="1" style="ime-mode: disabled;" />
                                        </div>
                                        <div style="padding:3px 0 0 63px;color:#6076a0; zoom:1;">
                                          <?php echo $SiteInfo['Logintips'];?>
                                        </div>
                                        
                                        
                                        <div style="height:25px;margin:8px 0 0 0;clear:left">
                                            <label for="pp" class="column">
                                                密　码：
                                            </label>
                                            <input type="password" id="pwd" name="pwd" value="" tabindex="2" class="txt text"/>
                                        </div>
                                        <script>
                                            document.form1.loginname.focus();
                                        </script>
                                        <div style="margin:8px 0 0 0;display:block" id="VerifyArea">
                                        <?php if($_SESSION['LoginError']>=$_G['siteinfo']['SiteVerifyCode']) { ?>
                                            <div style="height:25px">
                                                <label for="vc" class="column">
                                                    验证码：
                                                </label>
                                                <input type="text" id="vc" name="verifycode" value="" tabindex="4" style="ime-mode: disabled;"autocomplete="off" maxlength=4 class="txt text" />
                                            </div>
                                            <div style="clear:both;margin:6px 0 0 62px;color:#6076A0;">
                                                按下图字符填写，不区分大小写
                                            </div>
                                            <div style="margin:6px 0 6px 62px;color:#d2e2e6;">
                                            <img id='vfcode' src="<?php echo SITEURL;?>include/chkcode.php?t=<?php echo rand(10000,99999);?>" alt="看不清，请点击刷新" width="110" height="35" style="cursor:pointer;" onClick="this.src=this.src+'?'"/>
                                                <br />
                                                <a href="javascript:changeimg()">
                                                    看不清楚？&nbsp;换一个
                                                </a>
                                            </div>
                                            <?php } ?>
                                        </div>
                                        <div style="padding:16px 0 0 60px;clear:both; overflow:hidden;">
             						    <a style="float:right; margin:0 28px 0 0;" tabindex="4" href="<?php echo SITEURL;?>?mod=login&do=forgetpwd">
                                                忘记密码？
                                            </a>
                                            <input type="submit" class="btn bold wd2" value="登 录" style="cursor:pointer;" id="btlogin" name="btlogin" tabindex="3" />
                                        </div>
                                        <div style="margin:10px 0 10px 60px;color:#6076a0;clear:left;">
                                        </div>
                                        <ul class="reg_ann">
                                            
                                            <li>
                                                家校通手机版，随时随地接收信息。
                                                <a target="_blank" href="#">
                                                    查看详情
                                                </a>
                                            </li>
                                            
                                            <li>
                                                使用IM学校内部通信软件，更方便，更简单。
                                                <a target="_blank" href="#">
                                                    立即下载
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
     
        <div style="clear:both;">
        </div>
         <?php include pTemplate("footer");?>  
</body>
</html>