<!--#include file="articleconn.asp"--><%
if request.cookies("adminok")="" then
  response.redirect "login.asp"
end if
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改密码</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<link rel="stylesheet" href="style/style.css" type="text/css">
</head>
<body style="background-color: #FFFFFF" background="../skin/skin_1/bg.gif">
<div align="center"><center>
    文章管理管理员页面 
    <table width="100%" border="1" bordercolorlight="#000000" cellspacing="0" cellpadding="0"
bordercolordark="#FFFFFF">
      <tr> 
        <td width="80%"> 
          <form name=pass method="post" action="changepass.asp">
            <table width="100%" border="0" cellspacing="0" cellpadding="5">
                    <%
dim rs,tsql
dim rst
	set rs=server.CreateObject("ADODB.RecordSet")
	set rst=server.CreateObject("ADODB.RecordSet")
	    rs.open "select * from admin",conn,1
%>
<tr> 
                <td><b>修改管理员信息</b></td>
              </tr>
              <tr> 
                <td align="center"> 
                  <input type="hidden" name=method2 value="chan">
                  <input type="hidden" name=id value="<%=rs("id")%>">
                  名字： 
                  <input type="text" size=10 name="name">
                  　密码： 
                  <input type="text" size=10 name="pass">
                  　</td>
              </tr>
              <tr> 
                <td align="center"> 
                  <input name="change" class=buttonface value="修改" type='submit'>
                  　</td>
              </tr>
            </table>      <!----------------------修改密码---------------------------->
      <%
rs.close
		if request("method")="chan" then 
		  if request("change")="修改" then
			rs.open "select * from admin where id="+request("id"),conn,1,3
				rs("username")=request("name")
				rs("password")=request("pass")
				rs.Update
				rs.close
		  end if 
		end if
%>
      <!---------------------------------------------------------->

          </form>
        </td>
        <td width="20%" valign="top">* 如点击修改后仍显示原来密码不用理会，密码已经按照您输入的修改，您可以用新密码登陆看看，或者点刷新选择重试，这时显示将正常！　</td>
      </tr>
    </table>
    <table border="1" width="100%" bordercolorlight="#000000" cellspacing="0" cellpadding="0"
bordercolordark="#FFFFFF">
      <tr> 
        <td width="80%" valign="top"> 
          <%
	rst.open "select * from type",conn,1
 if rst.EOF then
	response.write "没有栏目：（"
	else
%>
          <br>
          <form name=edittype method="post" action="changepass.asp">
            <p align=center><b>文章栏目管理</b><br>
              <%do while NOT rst.EOF%>
              <%=rst("type")%> <a href="changepass.asp?typeid=<%=rst("typeid")%>&name=del">删除</a> 
              <a href="changepass.asp?typeid=<%=rst("typeid")%>&name=edit">修改</a> 
              <br>
              <%
	rst.MoveNext
	loop
	rst.close
	end if

%>
          </form>
          <!----------------------删除修改栏目---------------------------->
          <%
		  if request("name")="del" then
			rst.open "delete * from type where typeid="+request("typeid"),conn,1

		  end if 


%>
          <%if request("name")="edit" then
		rst.open "select * from type where typeid="+request("typeid"),conn,1
 %>
          <form name=ctype method="post" action="changepass.asp">
            <INPUT TYPE="hidden" name=method value="modified">
            <INPUT TYPE="hidden" name=typeid value="<%=request("typeid")%>">
            <INPUT TYPE="text" size=10 NAME="typename" value="<%=rst("type")%>">
            <INPUT name="changetype" class=buttonface value="修改" type='submit'>
          </form>
          <%
rst.close
end if
		if request("method")="modified" then 
		  if request("changetype")="修改" then
			rst.open "select * from type where typeid="+request("typeid"),conn,1,3
				rst("type")=request("typename")
				rst.Update
				rst.close
		  end if 
		end if
%>
          <!----------------------------------------------------------->
          　</td>
        <td width="20%" valign="top"><br>
          <p align=center><b>增加栏目</b><br>
          <form name=add method="post" action="changepass.asp">
            <INPUT TYPE="hidden" name=method value="added">
            <INPUT TYPE="text" size=10 NAME="addtype">
            <INPUT name="way" class=buttonface value="增加" type='submit'>
          </form>
          <br>
          *在增加栏目以后必须刷新才能出现新增的栏目，但是刷新了以后要是选择重试就会重新增加一个栏目，所以建议大家这时候点击别的地方连接，比如修改栏目里面的修改，这样新增的栏目就会出来了！ 
          <!---------------------增加栏目------------------------------>
          <%	if request("method")="added"  then   
			rst.open "select * from type",conn,3,2  
			rst.addnew  
			rst("type")=request("addtype")  
			rst.update  
			rst.close  
		end if 	%>
          <!----------------------------------------------------------->
        </td>
      </tr>
    </table>  
</center></div>  
  <p align="center"><br>  
  </p> 
</body> 
</html>