<!--#include file="db.asp"-->
<%
validpwd = true
If request.form("submit") <> "" Then
' setup variables
userid = Request.Form("userid")
passwd = Request.Form("passwd")
Set conn = Server.CreateObject("ADODB.Connection")
conn.open xDb_Conn_Str
Set rs = conn.Execute( "Select * from [user] where [系统管理员] = '" & UCASE(userid) & "'")
If not rs.eof then
If ucase(rs("系统管理员")) = ucase(passwd) Then
validpwd = true
Else
validpwd = false
End If
Else
validpwd = false
end if
rs.Close
Set rs=Nothing
conn.Close
Set conn=Nothing
If validpwd Then
Session("conn_status") = "login"
response.redirect "default.asp"
End If
End If
%>
<html>
<head>
<title>大同西供电段电源监测管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<meta name="generator" content="ASPMaker v2.1.0.1">
<script language="JavaScript">
<!-- start Javascript
var errfound = false;
function error(elem, text) {
if (errfound) return;
window.alert(text);
elem.select();
elem.focus();
errfound = true;
}
function loginCheck(f) {
errfound = false;
if (f.userid.value == "")
error(f.userid,"Please enter your user id!");
if (f.passwd.value == "")
error(f.passwd,"Please enter your password!");
return ! errfound;
}
// end Java script -->
</script>
<body leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>
<table width="600" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td>大同西供电段电源监测管理系统</td>
</tr>
</table>
<% If not validpwd Then %>
<p><font color="#FF0000">请重新输入用户名和密码!</font></p>
<% End If %>
<form action="login.asp" method="post" onSubmit="return loginCheck(this);">
<table width="600" border="0" cellspacing="0" cellpadding="2" align="center">
<tr><td align="left">User ID</td>
<td><input name="userid" type="TEXT"size="8"></td></tr>
<tr><td align="left">Password</td>
<td><input name="passwd" TYPE="PASSWORD" size="6"></td></tr>
<tr><td> </td></tr>
<tr><td colspan="2"><input type="submit" name="submit" value="Login"></td></tr>
</table>
<br>
</form>
<br>
</body>
</html>