<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/function.asp"-->
<%
dim show_username,blog_password,rs
show_username=replacebadchar(trim(request.QueryString("name")))
blog_password=trim(request("blog_password"))
set rs=conn.execute("select blog_password from [user] where username='"&show_username&"'")
if not rs.eof then
	if rs(0)="" then
	set rs=nothing
	Response.Cookies("oblog")("blog_password") =""
	response.Redirect "blog.asp?name="&show_username
	end if
else
	set rs=nothing
	Response.Write"<script language=JavaScript>"
	Response.Write"alert(""无此用户！"");"
	Response.Write"window.history.go(-1);"
	Response.Write"</script>"
end if

if blog_password<>"" then
	blog_password=md5(blog_password)
	if rs(0)=blog_password then
		set rs=nothing
		Response.Cookies("oblog")("blog_password") =blog_password
		response.Redirect "blog.asp?name="&show_username
	else
		set rs=nothing
		Response.Write"<script language=JavaScript>"
		Response.Write"alert(""密码错误，请重新输入！"");"
		Response.Write"window.history.go(-1);"
		Response.Write"</script>"
	end if
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Admin_STYLE.CSS" rel="stylesheet" type="text/css">
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0" class="bgcolor">
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<table width="35%"  border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" class="border">
  <tr>
    <td height="25" class="topbg"><strong>请输入<%= show_username %>的blog访问密码</strong></td>
  </tr>
  <tr>
    <td height="30" class="tdbg"><div align="center">
      <form name="form1" method="post" action="">
        <br>
        密码：
        <input name="blog_password" type="password" maxlength="20">
      <input type="submit" name="Submit" value="提交">
         <br>
         <br>
         <input TYPE="button" value="返回前页" onCLICK="history.back(-1)">
      </form>
    </div></td>
  </tr>
</table>
