<!--#Include file="conn.asp"-->
<%
if Request("action")="login" Then
Function ReplaceBadWord(g_word)
'Replace(string,被搜索的子字符串,用于替换的子字符串)函数
'返回字符串,其中指定数目的某子字符串被替换为另一个子字符串
g_word=Replace(g_word,"'","")
g_word=Replace(g_word," ","")
g_word=Replace(g_word,"&","")
g_word=Replace(g_word,"(","")
g_word=Replace(g_word,"\","")
g_word=Replace(g_word,"/","")
g_word=Replace(g_word,"..","")
g_word=Replace(g_word,"^","")
g_word=Replace(g_word,"#","")
g_word=Replace(g_word,"%","")
g_word=Replace(g_word,"|","")
g_word=Replace(g_word,";","")
g_word=Trim(Replace(g_word,")",""))
ReplaceBadWord=g_word
End Function
'-----------------函数结束-------------
dim sql
dim rs
dim username
dim password
username=replace(trim(request("username")),"'","")
password=Request.form("password")'密码加密
On Error Resume Next'错误开启
sql="select count(*) as RECORDCOUNT from admin where username='"& username &"' and userpassword='"& userpassword &"'"
Set rs=conn.Execute("sql")
rcount=rs("RECORDCOUNT")
rs.close
conn.close
if rcount<1 then
%>
<script>
<!--
alert("用户不存在");
history.back();
-->
</script>
<%
else
response.Cookies("users")("username")=username
response.Cookies("users")("userpassword")=userpassword
response.Redirect"admin.asp?action=login"
end if
end if
%>
<html>
<head>
<title>【音乐系统】-【管理登陆】</title>
<style>
body { color: #12463b; FONT-FAMILY 宋体; font-size: 9pt }
td { color: #12463b; FONT-FAMILY 宋体; font-size: 9pt }
a { color: #12463b; font-size: 9pt; text-decoration: none }
a:hover { color: red; font-size: 9pt; text-decoration: none }
a.linkblue { color: #2222cc; font-size: 9pt; text-decoration: none }
a.linkgr { color: #666622; font-size: 9pt; text-decoration: none }
a.linkblue:hover { background-color: #000066; color: white; font-size: 9pt; text-decoration: none }
table {
font-size: 9pt;
}
input {
background-color: #FFFFFF;
border: 1px solid #CCCCCC;
}
</style>
</head>
<body background="skybg.gif" leftMargin=0 topMargin=0>
<br>
<br><br>
<TABLE height=350 cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
<TBODY>
<TR>
<TD >
<TABLE height=210 cellSpacing=0 cellPadding=0 width=307 align=center border=0>
<form method="get" action="?action=login" >
<TBODY>
<TR>
<TD background="images/dt2.jpg">
<TABLE cellSpacing=0 cellPadding=" " width=300 border=0>
<TBODY>
<TR>
<TD colSpan=2 height=50></TD></TR>
<TR>
<TD align=right width="35%" height=20><STRONG>用户名:</STRONG> </TD>
<TD width="65%" height=20><INPUT
style="BORDER-RIGHT: #004485 1px solid; BORDER-TOP: #004485 1px solid; FONT-SIZE: 10pt; BORDER-LEFT: #004485 1px solid; BORDER-BOTTOM: #004485 1px solid; BACKGROUND-COLOR: #d1ddeb"
maxLength=20 name="username" type="text" id="username"> </TD></TR>
<TR>
<TD align=right height=7></TD>
<TD height=7></TD>
</TR>
<TR>
<TD align=right height=20><STRONG>密 码:</STRONG></TD>
<TD height=20><INPUT
style="BORDER-RIGHT: #004485 1px solid; BORDER-TOP: #004485 1px solid; FONT-SIZE: 10pt; BORDER-LEFT: #004485 1px solid; BORDER-BOTTOM: #004485 1px solid; BACKGROUND-COLOR: #d1ddeb"
maxLength=20 name="password" type="password" class="input" id="password"> </TD></TR>
<TR>
<TD align=right height=10> </TD>
<TD height=10></TD></TR>
<TR align=middle>
<TD colSpan=2 height=16>
<HR width=270 color=#0a4d99 noShade SIZE=1>
</TD></TR>
<TR vAlign=top align=middle>
<TD colSpan=2 height=25><INPUT name="Submit" type=image height=15 width=38
src="images/bgoffice_12.gif" border=0>
<IMG onMouseOver="this.style.cursor='hand';"
onclick="form1.username.value='';form1.password.value='';"
height=15 src="images/bgoffice_13.gif" width=38 border=0>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></FORM></TABLE></TD></TR></TBODY></TABLE>
<p> </p><p> </p>
<p><CENTER><font color="#000000">╃Only音乐系统后台管理╃<br>Copyright © 2006
<a href=http://www.only.com target=_blank>AnQR.NeT</a> Corporation. All Rights
Reserved <br> Designed By <a href="mailto:only@gmail.com">AnQR</a> © 2006<br></font></CENTER></p>
<!--
'****************************************************
'****************************************************
-->
</body>
</html>