<!DOCTYPE html>
<%@ language="vbscript" codepage="936" %>
<%
'========================================================================================
' 文 件 名: admin_login.asp
' 版    本: 岭峰网行业专用留言系统3.10.0 (LFMessS 2020 - 3.10.0.F Build 200604)
' 说    明: 管理员登陆页面 | 请小心修改为自己的风格
' 文件日期: 2020-06-04
' 设 计 者: 疾风之狼
'========================================================================================
' 郑州文达岭峰网络科技有限公司.
'========================================================================================
' Copyright (C) 2001-2020 岭峰网. All rights reserved.
' 网    站: http://www.lfmesss.com
' 电子邮件: support@lfmesss.com
' 联系ＱＱ: 85112407
'========================================================================================
%>
<%flg = "manok"%>
<!-- #include file="../common/sub_inc.asp" -->
<!-- #include file="../common/commfun.asp" -->
<!-- #include file="../common/ip_purview.asp" -->
<!-- #include file="../common/checkru.asp" -->
<!-- #include file="../common/md5_32.asp" -->
<%
IF Session("LingFengNet_MS_admin") = "ok" and Session("LingFengNet_MS_admin_flg") = "3" Then Response.Redirect "admin"&Get_Suffix() 
IF Session("LingFengNet_MS_admin") = "ok" and ( Session("LingFengNet_MS_admin_flg") = "2" or Session("LingFengNet_MS_admin_flg") = "1" ) Then Response.Redirect "admin_stlist"&Get_Suffix()
IF Session("DatabaseErr") <> "ok_now" Then
%>
<!-- #include file="../common/connect.asp" -->
<%
End IF
IF Request("set") = "ok" Then
	adminname = Trim(Request.Form("LingFengNet_MS_adminname"))
	adminpass = Trim(Request.Form("LingFengNet_MS_adminpass"))
	IF Len(adminpass) <> 32 Then
		adminpass = LFW_md5_32_pass(adminpass)
	End IF
	reg = Fix(Trim(Request.Form("reg")))
	
	IF adminname = "" or adminpass = "" Then
		Response.Write "<meta http-equiv=Content-Type content=text/html;charset="& LingFengNet_MS_language_meta_mes_1 &"><script>" 
		Response.Write "alert('"& LingFengNet_MS_language_Warning_login_1 &"');" 
		Response.Write "history.go(-1);" 
		Response.Write "</script>" 
		Response.End
	End IF
	
	IF Not IsNumeric(reg) Then
		Response.Write "<meta http-equiv=Content-Type content=text/html;charset="& LingFengNet_MS_language_meta_mes_1 &"><script>" 
		Response.Write "alert('"& LingFengNet_MS_language_Warning_login_2 &"');" 
		Response.Write "history.go(-1);" 
		Response.Write "</script>" 
		Response.End
	End IF
	
	IF CLng(reg) <> Clng(Session("LFW_Safecode")) Then
		Response.Write "<meta http-equiv=Content-Type content=text/html;charset="& LingFengNet_MS_language_meta_mes_1 &"><script>" 
		Response.Write "alert('"& LingFengNet_MS_language_Warning_login_2 &"');" 
		Response.Write "history.go(-1);" 
		Response.Write "</script>" 
		Response.End
	End IF
	
	IF Instr(LingFengNet_MS_adminname,adminname) = 0 or Instr(LingFengNet_MS_adminpass,adminpass) = 0 Then
		Response.Write "<meta http-equiv=Content-Type content=text/html;charset="& LingFengNet_MS_language_meta_mes_1 &"><script>" 
		Response.Write "alert('"& LingFengNet_MS_language_Warning_login_2 &"');" 
		Response.Write "history.go(-1);" 
		Response.Write "</script>" 
		Response.End
	End IF
	
	IF Instr(LingFengNet_MS_adminname, "|") = 0 or Instr(LingFengNet_MS_adminpass, "|") = 0 Then
		IF LingFengNet_MS_adminname = adminname and LingFengNet_MS_adminpass = adminpass Then
			Session("LingFengNet_MS_admin") = "ok"
			Session("LingFengNet_MS_admin_flg") = LingFengNet_MS_adminflg
			Session("LingFengNet_MS_admin_flg_adminname") = LingFengNet_MS_adminname
			Session("LingFengNet_MS_admin_flg_login") = LingFengNet_MS_language_messdef_mesok_re_admin_4 & LingFengNet_MS_adminpublicname
		End IF	
	Else		
		nameReturn = Split(LingFengNet_MS_adminname, "|")
		passReturn = Split(LingFengNet_MS_adminpass, "|")
		flgReturn = Split(LingFengNet_MS_adminflg, "|")
		publicnameReturn = Split(LingFengNet_MS_adminpublicname, "|")
		For i = LBound(nameReturn) To UBound(nameReturn)
			IF Trim(nameReturn(i)) = adminname and Trim(passReturn(i)) = adminpass Then 
				Session("LingFengNet_MS_admin") = "ok"
				Session("LingFengNet_MS_admin_flg") = flgReturn(i)
				Session("LingFengNet_MS_admin_flg_adminname") = Trim(nameReturn(i))
				Session("LingFengNet_MS_admin_flg_login") = LingFengNet_MS_language_messdef_mesok_re_admin_4 & Trim(publicnameReturn(i))
				Exit For
			End IF
		Next 
	End IF
	
	IF Session("LingFengNet_MS_admin") = "ok" Then
		'Session("LingFengNet_MS_admin")="ok"
		'Session("LingFengNet_MS_admin_flg")=LingFengNet_MS_adminflg
		'Session("LingFengNet_MS_admin_flg_login")=LingFengNet_MS_language_messdef_mesok_re_admin_4&adminname
		IF Session("DatabaseErr") <> "ok_now" Then
			Call logok()
		End IF	
	Else
		IF Session("DatabaseErr") <> "ok_now" Then
			Call logerr() 
		End IF
		Response.Write "<meta http-equiv=Content-Type content=text/html;charset="& LingFengNet_MS_language_meta_mes_1 &"><script>" 
		Response.Write "alert('"& LingFengNet_MS_language_Warning_login_2 &"');" 
		Response.Write "history.go(-1);" 
		Response.Write "</script>" 
		Response.End			
	End IF
	Response.Redirect "admin"&Get_Suffix()
End IF
%>
<head>
<title><%= LingFengNet_MS_language_title_login %></title>
<%  
  Call htmlmeta() 
%> 
<link rel="stylesheet" href="../style/css/<%= LingFengNet_MS_web_css %>.css" type="text/css">
<link rel="shortcut icon" href="../pic/favicon.ico" type="image/x-icon">
<link rel="bookmark" href="../pic/favicon.ico" type="image/x-icon">
<script>
var system = { 
win: false, 
mac: false, 
xll: false, 
ipad: false 
}; 
var p = navigator.platform; 
var hrefstr = location.href; //获取到整个地址
hrefstr = hrefstr.substr(-1);
system.win = p.indexOf("Win") == 0; 
system.mac = p.indexOf("Mac") == 0; 
system.x11 = (p == "X11") || (p.indexOf("Linux") == 0); 
system.ipad = (navigator.userAgent.match(/iPad/i) != null) ? true : false; 
if (system.win || system.mac || system.xll||system.ipad) { 
} else { 
window.location.href="m_admin_login<%= Get_Suffix() %>";
}
</script>
</head>
<body onkeydown="EnableKey()" >
<%
Call htmltop()
Call htmlbr()
Call htmldefaultmen()
Call htmlbr()
%>
  <table width="<%= LingFengNet_MS_web_w %>" border="0" cellspacing="0" cellpadding="0" align="center">
  <form name="myform" method="post" action="admin_login<%= Get_Suffix() %>" onSubmit="return checklogin()">
    <tr> 
      <td class="bgc2"> <table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr class="bgc"> 
            <td height=40 width=25% class="bgc"> <div align="left">&ensp;<%= LingFengNet_MS_language_messdef_login_name %></div></td>
            <td height="40" width="75%" class="bgc"> <div align="left"> 
                <input type="text" name="LingFengNet_MS_adminname" size="25" maxlength="25">
              </div></td>
          </tr>
          <tr class="bgc"> 
            <td height=40 width=25% class="bgc"> <div align="left">&ensp;<%= LingFengNet_MS_language_messdef_login_pass %></div></td>
            <td height="40" width="75%" class="bgc"> <div align="left"> 
                <input type="password" name="LingFengNet_MS_adminpass" size="25" maxlength="25">
              </div></td>
          </tr>
          <tr class="bgc"> 
            <td height=40 width=25% class="bgc">&ensp;<%= LingFengNet_MS_language_messdef_login_Att %></td>
            <td height="40" width="75%" class="bgc"> <input type="text" name="reg" size="8" maxlength="10" class="input"> 
              <%= LingFengNet_MS_language_messdef_login_left %>&ensp;
              <img src="showcode_math<%= Get_Suffix() %>" width="88" height="14" id="verifypic" onClick="newverifypic()" border="1" align="absmiddle">
            <%= LingFengNet_MS_language_messdef_login_right %><input name="set" type="hidden" id="set" value="ok"> </td>
          </tr>
          <tr class="bgc"> 
            <td height=40 colspan="2" class="bgc"> <div align="center"> 
                <input type="submit" name="Submit" value="<%= LingFengNet_MS_language_messdef_login_submit %>" class="buttonface">
                &ensp;&ensp; 
                <input type="reset" name="reset" value="<%= LingFengNet_MS_language_messdef_login_reset %>" class="buttonface">
              </div></td>
          </tr>
      </table></td>
    </tr>
	</form>
  </table>
<%
Call htmlbr()
Call htmlend()
%>
<script src="../common/md532.js"></script>
<script>
function checklogin(){
	if(document.myform.LingFengNet_MS_adminname.value == ""){
		alert("<%= LingFengNet_MS_language_Warning_login_1 %>");
		myform.LingFengNet_MS_adminname.focus();
		return false;
	}
	if(document.myform.LingFengNet_MS_adminpass.value == ""){
		alert("<%= LingFengNet_MS_language_Warning_login_1 %>");
		myform.LingFengNet_MS_adminpass.focus();
		return false;
	}
	if(document.myform.reg.value == ""){
		alert("<%= LingFengNet_MS_language_Warning_login_1 %>");
		myform.reg.focus();
		return false;
	}
	document.getElementById("LingFengNet_MS_adminpass").value = md5(document.getElementById("LingFengNet_MS_adminpass").value);
	return true;
}

function newverifypic() {
	var timenow = new Date().getTime();
	url="showcode_math<%= Get_Suffix() %>";
	id = url.indexOf('?');
	if(id >= 0){
		if(id == (url.length-1))
			url = url + "t=" + timenow;
		else 
			url = url + "&t=" + timenow;
	}else{
		url = url + "?t=" + timenow;
	}
	document.getElementById("verifypic").src = url;
}	
</script>
</body>
</html>