<%@ page contentType="text/html; charset=utf-8" language="java" errorPage="" %>
<%@ page import="java.util.*"%>
<%@ page import="tot.filter.IpFilter" %>
<%@ include file="../inc/common.jsp"%>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragrma","no-cache");
response.setDateHeader("Expires",0); 
if(!IpFilter.filter(request.getRemoteAddr())){
	response.sendRedirect("404.jsp");
	//out.print(Sysconfig.getBlockedIPs()+":"+request.getRemoteAddr());
}
String act=RequestUtil.getString(request,"act");
if(act!=null && act.equals("login")){
	Boolean isResponseCorrect =Boolean.TRUE;
	boolean bl;
	if(isResponseCorrect){
		String UserName=RequestUtil.getString(request,"UserName");	
		String PassWord=RequestUtil.getString(request,"PassWord");	
		if(UserName.equals(Sysconfig.getUserName()) && PassWord.equals(Sysconfig.getPassword())){					
			session.setAttribute("totsearch_admin",UserName);				
			response.sendRedirect("index.jsp");
		}
		else{
			out.print("登录失败!");	
		}
	}
}
%> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<fmt:bundle basename="resources.totcms_i18n">
<HEAD><TITLE>淘特站内搜索引擎(java版4.0)</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type=text/css>BODY {
	FONT-SIZE: 12px; COLOR: #000000
}
TD {
	FONT-SIZE: 12px; COLOR: #000000
}
TH {
	FONT-SIZE: 12px; COLOR: #000000
}
A {
	FONT-SIZE: 12px; COLOR: #000000
}
A:link {
	TEXT-DECORATION: none
}
A:visited {
	COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
	COLOR: #ff0000; TEXT-DECORATION: underline
}
A:active {
	TEXT-DECORATION: none
}
.bor {
	BORDER-RIGHT: #73aae7 1px solid; BORDER-TOP: #73aae7 1px solid; BORDER-LEFT: #73aae7 1px solid; BORDER-BOTTOM: #73aae7 1px solid
}
</STYLE>
<script>
function check(obj){
	with(obj){
		if(UserName.value==""){
			alert('<fmt:message key="totcms.admin.login.js.usernametxt" />');
			UserName.focus();
			UserName.select();
			return false;
		}
		else if(PassWord.value==""){
			alert('<fmt:message key="totcms.admin.login.js.passwordtxt" />');
			PassWord.focus();
			PassWord.select();
			return false;
		}
		else if(CertCode.value==""){
			alert('<fmt:message key="totcms.admin.login.js.certcodetxt" />');
			CertCode.focus();
			CertCode.select();
			return false;
		}
		else{
			return true;
		}
	}
}
</script>
<META content="MSHTML 6.00.3790.4134" name=GENERATOR></HEAD>
<BODY onLoad="document.form1.UserName.focus()">
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<FORM id=form1 name=form1 action="?act=login" method=post onSubmit="return check(this);">
<TABLE class=bor cellSpacing=4 cellPadding=0 width=420 align=center 
bgColor=#e7efff border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=386 bgColor=#ffffff height=188>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD align=left colSpan=2 height=59><IMG height=58 
            src="images/login.gif" width=366></TD></TR>
        <TR>
          <TD align=right width="31%" height=129><IMG height=106 
            src="images/2.png" width=106></TD>
          <TD align=middle width="69%">
            <TABLE height=110 cellSpacing=0 cellPadding=0 width="100%" 
              border=0>
              <TBODY>
              <TR>
                <TD align=right width="32%">用户名：</TD>
                <TD align=left width="68%"><input name="UserName" type="text" id="UserName" maxlength="50" style="BORDER-RIGHT: #73aae7 1px solid; BORDER-TOP: #73aae7 1px solid; BORDER-LEFT: #73aae7 1px solid; WIDTH: 150px; BORDER-BOTTOM: #73aae7 1px solid; HEIGHT: 18px" /></TD></TR>
              <TR>
                <TD align=right>密&nbsp; 码：</TD>
                <TD align=left><INPUT id=PassWord 
                  style="BORDER-RIGHT: #73aae7 1px solid; BORDER-TOP: #73aae7 1px solid; BORDER-LEFT: #73aae7 1px solid; WIDTH: 150px; BORDER-BOTTOM: #73aae7 1px solid; HEIGHT: 18px" 
                  type=password name=PassWord></TD></TR>
              <TR>
  <TD align=middle colSpan=2 height=21><INPUT type=submit value=提交 name=Submit> &nbsp; <INPUT type=reset value=重置 name=Submit2></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<p align="center">技术支持：<A href="http://www.totcms.com/products/totsearch/" target="_blank" style="color:#03F;">淘特搜索引擎4.0</A></p>
</FORM>
<P>&nbsp;</P>
<script type="text/javascript" src="http://ncs.totcms.com/stat.js"></script>
</fmt:bundle>
</BODY>
</HTML>
