<%
'********************************************************
'程序名称:小金通用采集系统
'版权所有:小金(qq:85103270)
%>
<!--#include file="inc/setup.asp"-->
<!--#include file="inc/md5.asp"-->
<link rel="stylesheet" type="text/css" href="css/Admin_Style.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
'----是否登陆
Call Admin()
If IsAdmin=false then
	ErrMsg="<li> 您没有登陆或不是管理员。请<a href='w163_login.asp' target='_top'>登陆</a>。"
	response.Redirect("w163_err.asp?action=AdminErr&ErrMsg="&ErrMsg&"")
	response.End()
end if
'-----
Action=Trim(Request("Action"))
if action="save" then
	Set rspwd=ConnItem.execute("select top 1 pwd from admin")
	if md5(Trim(Request.Form("pwd1")))=rspwd("pwd") then
		if Trim(Request.Form("pwd2"))=Trim(Request.Form("pwd3")) and Trim(Request.Form("pwd2"))<>"" and Trim(Request.Form("pwd3"))<>""then
		response.write "<script>alert('修改密码成功!');</script>"
		ConnItem.execute("update admin set pwd ='"& md5(Trim(Request.Form("pwd2"))) &"' where ID=5")
		call Main()
		else
		response.write "<script>alert('确认密码错误!');location.href='javascript:history.go(-1)'</script>"
		End if
	else
	response.write "<script>alert('原来密码错误!');location.href='javascript:history.go(-1)'</script>"
	End if
	rspwd.close
	set rspwd=nothing
else
	call Main()'显示页面
end if
'关闭数据库链接
Call CloseConnItem()
%>



<%Sub Main()
set rs = ConnItem.execute("select top 1 WebName,WebUrl,WebLogo,Webabout,ArticleDir,flashdir,photoDir,alldir from w163_Config")
%>
<table width="97%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableBorder">
<form action="?action=save" method="post">
  <tr>
    <td height="33" colspan="3" class="title"><div align="center"><span style="font-weight: bold">网站基本设置</span></div></td>
  </tr>
  <tr>
    <td colspan="3" class="title2">&nbsp;用于设置网站的基本信息。</td>
    </tr>
  

  
  <tr>
    <td width="18%" class="table">&nbsp;密码修改</td>
    <td colspan="2" class="table"><p>
      <input name="pwd1" type="password" class="lostfocus" id="WebLogo2" onfocus='this.className=&quot;getfocus&quot;;this.gf=&quot;1&quot;' onblur='this.className=&quot;lostfocus&quot;;this.gf=&quot;0&quot;' onmouseover='this.className=&quot;getfocus&quot;' onmouseout='if (this.gf==&quot;0&quot;) this.className=&quot;lostfocus&quot;' size="40" maxlength="50" gf="0" />
      输入原来密码<br />

        <input name="pwd2" type="password" class="lostfocus" id="WebLogo3" onfocus='this.className=&quot;getfocus&quot;;this.gf=&quot;1&quot;' onblur='this.className=&quot;lostfocus&quot;;this.gf=&quot;0&quot;' onmouseover='this.className=&quot;getfocus&quot;' onmouseout='if (this.gf==&quot;0&quot;) this.className=&quot;lostfocus&quot;' value="" size="40" maxlength="50" gf="0" />
        输入新密码<br />
        <input name="pwd3" type="password" class="lostfocus" id="WebLogo32" onfocus='this.className=&quot;getfocus&quot;;this.gf=&quot;1&quot;' onblur='this.className=&quot;lostfocus&quot;;this.gf=&quot;0&quot;' onmouseover='this.className=&quot;getfocus&quot;' onmouseout='if (this.gf==&quot;0&quot;) this.className=&quot;lostfocus&quot;' value="" size="40" maxlength="50" gf="0" />
        再输一次新密码
    </p></td>
  </tr>
  <tr>
    <td height="30" colspan="3" class="title3"><div align="center">
      <input type="submit" name="Submit" value="提交">
    </div></td>
    </tr>
</form>
</table>
<%
end sub%>

