<!--#include file="security.asp"-->
<!--#include file="articleconn.asp"-->
<!--#include file="home1.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>高级管理页</title>
<link rel="stylesheet" href="../../inc/style.css">
</head>
<body bgcolor="#FFFFFF" >
<br>
<center>
    <table border="0" cellspacing="2" width="650" height="24">
      <tr> 
        <td> 
          <b>　<font color="#FF0099">高级管理页</font></b> 
        </td>
        <td align="right">
        <a href="MANAGE.ASP">返回</a> <a href="changepass.asp">刷新</a> 
        </td>
      </tr>
    </table>
    <table border="1" width="650" bordercolorlight="#000000" cellspacing="0" cellpadding="3" bordercolordark="#FFFFFF">
      <%
dim rs,tsql
dim rst
	set rs=server.CreateObject("ADODB.RecordSet")
	set rst=server.CreateObject("ADODB.RecordSet")
	    rs.open "select * from password",conn,1
%> 
      <tr> 
        <td width="50%" align=center><form name=pass method="post" action="changepass.asp"> 
          <font color=red>修改管理员信息</font></td>
        <td width="50%" rowspan="4">* 如点击修改后仍显示原来密码不用理会，密码已经按照您输入的修改，您可以用新密码登陆看看，或者点刷新选择重试，这时显示将正常！　</td>
      </tr>
      <tr> 
        <td width="50%" align="center"> 
          <INPUT TYPE="hidden" name=method value="chan">
          <INPUT TYPE="hidden" name=id value="<%=rs("id")%>">
          名字： 
          <INPUT TYPE="text" size=10 NAME="name" class=put value="<%=rs("name")%>">
          　</td>
      </tr>
      <tr> 
        <td width="50%" align="center">密码： 
          <INPUT TYPE="text" size=10 NAME="pass" class=put value="<%=rs("pwd")%>">
          　</td>
      </tr>
      <tr> 
        <td width="50%" align="center"> 
          <INPUT name="change" class=put1 value="修改" type='submit'>
          　</td>
      </tr></form>
      <!----------------------修改密码----------------------------> <%
rs.close
  
		if request("method")="chan" then 
		  if request("change")="修改" then
			sql= "select * from password"
                        rs.open sql,conn,3,3	
				rs("name")=request("name")
				rs("pwd")=request("pass")
				rs.Update
		  end if 
		end if

%> <!----------------------------------------------------------> 
      <tr> 
        <td width="50%" 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><font color=red>文章栏目管理</font><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
	end if
rst.close
%> 
          </form>
          <!----------------------删除修改栏目----------------------------> <%
		  if request("name")="del" then
			rst.open "delete * from type where typeid="+request("typeid"),conn,1
			rst.close
		  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" class=put value="<%=rst("type")%>">
            <INPUT name="changetype" class=put1 value="修改" type='submit'>
          </form>
          <%
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
		  end if 
		end if

%> <!-----------------------------------------------------------> 　</td>
        <td width="50%" valign="top"><br>
          <p align=center><font color=red>增加栏目</font><br>
          <form name=add method="post" action="changepass.asp">
            <INPUT TYPE="hidden" name=method value="added">
            <INPUT TYPE="text" size=10 NAME="addtype" class=put >
            <INPUT name="way" class=put1 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>
      <tr> 
        <td colspan="2" align="center">
        <!--#include file="home1.asp"-->
        <form method="POST" action="gaosave.asp">
         文章显示量：<input class=put name=duo size=3 maxlength="5" value="<%=rs("duo")%>">&nbsp;&nbsp;<input type="submit" value="修 改" name="cmdok" class=put1>
         </form>
        </td>
      </tr>
    </table>
</body>
</html>