<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<tpl> $NCharset </tpl>" />
<title><tpl> $langCShopNCSystem </tpl>-<tpl> $SystemVersion </tpl></title>
<link href="<tpl> $site_url </tpl><tpl> $templates_subpath </tpl>/css/default.css" rel="stylesheet" type="text/css" />
<link href="<tpl> $site_url </tpl><tpl> $templates_subpath </tpl>/css/login.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/javascript" src="<tpl> $site_url </tpl>/js/jquery/index.js"></script>
<script language="JavaScript" type="text/javascript" src="<tpl> $site_url </tpl>/js/jquery/jquery.js"></script>
<script language="JavaScript" type="text/javascript" src="<tpl> $site_url </tpl>/js/jquery/jquery.form.js"></script>
<script language="JavaScript" type="text/javascript" src="<tpl> $site_url </tpl>/js/jquery/jquery.cookie.js"></script>
<script language="JavaScript" type="text/javascript" src="<tpl> $site_url </tpl>/js/common.inc.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	showLoad();
	var options = {
		target:        '#loading_tag',
		beforeSubmit:  showRequest,
		success:       showResponse,
		url:       'index.php?action=check_login',
		type:      'post'
	};
	$('#form1').ajaxForm(options);
	$('#sys_login_name').focus();
	checkIE();
});

function showRequest(formData, jqForm, options) {
	var queryString = $.param(formData);
	return validate(formData, jqForm, options);
}

function showResponse(responseText, statusText)  {
	if (responseText!=''){
		hideLoading();
	}
	if (statusText=='success' && responseText==''){
	    $('#loading_tag').text("<tpl> $langSysIndexLogin </tpl>...");
		$('#loading_tag').show();
		location.href='index.php?action=main';
	}
}

function validate(formData, jqForm, options) {
	var usernameValue = $('input[@name=sys_login_name]').fieldValue();
	var passwordValue = $('input[@name=sys_password]').fieldValue();

	if (!usernameValue[0] || !passwordValue[0]) {
		alertmsg = '<tpl> $langSysIndexPleaseFillInUsernamePass </tpl>';
		$('#loading_tag').html(alertmsg);
		return false;
	}
	return true;
}

function checkMozilla(){
	var firefox = document.getElementById && !document.all;
	if(firefox == false){
		window.external.AddFavorite('<tpl> $url </tpl>/system/index.php','shopnc');
	}else{
		window.sidebar.addPanel('shopnc','<tpl> $url </tpl>/system/index.php','');
	}
}
//检测浏览器版本，IE6则提示错误
function checkIE(){
	var ua = navigator.userAgent;
	var msieOffset = ua.indexOf("MSIE ");
	if(msieOffset > 0)
	{
		//IE6以下
		if(parseFloat(ua.substring(msieOffset + 5, ua.indexOf(";", msieOffset))) <=6 ){
			$('#checkIE_msg').slideDown();
			$('#form_submit').attr('disabled',true);
			alert('<tpl> $langSysCheckIEMsg </tpl>');
		}
	}
}
</script>
</head>
<body>
<div id="checkIE_msg"><!-- <a href="javascript:void(null);" onclick="$('#checkIE_msg').slideUp();">X</a> --><tpl> $langSysCheckIEMsg </tpl></div>
<div id="wrap">
	<div id="head">
  <div class="top">
    <h1 id="logo">ShopNC Multishop Administrator's Control Panel</h1>
    <ul id="topmenu">
      <li><a href="http://www.shopnc.net/forum/" target="_blank"><tpl> $langSysIFamiliarQuestion </tpl></a></li>
      <li><a href="../COPYRIGHT.php" target="_blank"><tpl> $langSysIUseAgreement </tpl></a></li>
      <li><a href="http://www.shopnc.net/company/contact.php" target="_blank"><tpl> $langSysIContactWe </tpl></a></li>
      <li><a href="http://www.shopnc.net/product/multishop.php" target="_blank"><tpl> $langSysIAboutWebShopEdition </tpl></a></li>
    </ul>
  </div>
  <div class="clear">&nbsp;</div>
  <div class="content">
    <div class="left">
      <div class="intro">
        <div class="pic"></div>
        <div class="txt">　<tpl> $langSysIndexMessageOne </tpl></div>
      </div>
      <div class="info"><tpl> $langSysIndexMessageTwo </tpl></div>
    </div>
    <div class="login">
<form id="form1" name="form1" method="post" action="">
  	<input type="hidden" name="state" value="1" />
        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><span class="text"><tpl> $langSysIndexUserName </tpl></span></td>
          </tr>
          <tr>
            <td><label><input name="sys_login_name" id="sys_login_name" type="text" size="30" /></label></td>
          </tr>
          <tr>
            <td><span class="text"><tpl> $langSysIndexPassword </tpl>:</span></td>
          </tr>
          <tr>
            <td><label><input name="sys_password" type="password" size="30"/></label></td>
          </tr>
          <tr>
            <td><span class="text"><tpl> $langSysIndexCode </tpl>:</span></td>
          </tr>
          <tr>
            <td><label><input name="code" type="text" id="code" size="8" maxlength="4"  style="width:80px"/>
              </label>
              <span class="codeimg"><img src="../classes/libraries/code.php" onclick="this.src='../classes/libraries/code.php?' + Math.random()" title="<tpl> $langSysIndexOnClickReplaceCode </tpl>" id="codeimage" name="codeimage"  style="cursor:hand; vertical-align:middle" /></span> </td>
          </tr>
          <tr>
            <td><span class="text"><tpl> $langSysLang </tpl>:</span>
            <select name="langSelect" id="langSelect">
				<option value="zh-cn"><tpl> $langSysLangZhcn </tpl></option>
				<option value="zh"><tpl> $langSysLangZh </tpl></option>
			</select>
            </td>
          </tr>
          <tr>
            <td align="center"><input name="form_submit" id="form_submit" type="submit" value="" class="btn" /></td>
          </tr>
        </table>
</form>
		<div class="tag" id="loading_tag" align="center"></div>		
    </div>
  </div><div class="clear">&nbsp;</div>
  <div id="copyright">
	Powered by <a href="http://www.shopnc.net" target="_blank">ShopNC</a> &copy; 2001-2009 <tpl> $langSysIWebShopCreateWant </tpl> Inc</div>
</div>	
</div>
</body>
</html>