<!--#include file="../conn.asp"-->
<!--#include file="../inc/function.asp"-->
<%if session("china_admin")="" then response.redirect "login.asp"%>
<%dim action,id,dname,rs,newsdata1,i,yname,sql,adid,pic
id=strint(request.QueryString("id"))
action=HtmlEncode(request.querystring("action"))
dname=HtmlEncode(request("name"))
if action="add"  then
response.write "<script>window.alert('测试程序不提供修改功能！ 需要完整代码请联系QQ：525264131  全部功能演示网址：www.longyuit.com');history.go(-1);</script>"
response.end
end if
 dbpath="../"
dblink


set rs=server.CreateObject("adodb.recordset")
rs.Open "select id,name from news_type order by id",conn,1,1
if not rs.eof then newsdata1=rs.GetRows
CloseConn%>
<HTML>
<HEAD>
<LINK rel="stylesheet" type="text/css" href="style.css">
<META http-equiv="Content-Type" content="text/html; charset=gb2312">
<META name="GENERATOR" content="Microsoft FrontPage 4.0">
<META name="ProgId" content="FrontPage.Editor.Document">
<TITLE>分类管理</TITLE>
</HEAD>

<BODY background="images/background.gif">
<TABLE width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
  <TR> 
    <TD height="20" bgcolor="#799AE1" align="center"><FONT color="#FFFFFF" style="font-size:14px">新 闻&nbsp;分 类 栏&nbsp;目&nbsp;管 理</FONT></TD>
  </TR>
  <TR> 
    <TD bgcolor="#FFFFFF"> &nbsp;首页 <BR>
	<TABLE width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
        <TR align="center" bgcolor="#FFFFFF" height="20"> 
          <TD width="30">编号</TD>
          <TD width="186">分类名称</TD>
          <TD width="169">管理操作</TD>
          <TD width="936" align="left">首页调用代码&nbsp;f_news(t,c1,c2,c3,n,q,s,d,zs,zt,hg)n(0静止,1为滚动)q(标题前缀可选0-2)d(显示时间0否1是)zs(标题字数)zt(字体大小)hg(行距)</TD>
        </TR>
        <%if not isarray(newsdata1) then
          response.write"<tr bgcolor=#FFFFFF><td colspan='3'><p align='center'><font color='red'>暂无分类！</font></td></tr></table><br>"
		  else
		 for i=0 to ubound(newsdata1,2)%>
        <FORM name="form1" method="post" action="?action=edit&id=<%=int(newsdata1(0,i))%>">
          <TR bgcolor="#FFFFFF" align="center">
		  <TD><%=i+1%></TD>
            <TD><INPUT name="name" type="text" size="12" value="<%=trim(newsdata1(1,i))%>"></TD>
            <TD><input type="submit" name="Submit" onClick="{if(confirm('测试程序不提供修改功能！ 需要完整代码请联系QQ：525264131  全部功能演示网址：www.longyuit.com')){location.href='?action=del&id=<%=newsdata1(0,i)%>';}return false;}" value="修 改">
            &nbsp; <INPUT type="button" name="DEL" onClick="{if(confirm('测试程序不提供删除功能！ 需要完整代码请联系QQ：525264131  全部功能演示网址：www.longyuit.com')){location.href='?action=del&id=<%=newsdata1(0,i)%>';}return false;}" value="删除" >            </TD><TD align="center"><font color="#FF0000">&lt;%=f_news(<%=int(newsdata1(0,i))%>,0,1,8,1,40,11,22)%&gt;</font></TD>
          </TR>
        </FORM>
        <%next
          end if%>
      </TABLE>
	<BR></TD>
  </TR>
</TABLE>
<BR>
<TABLE width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
  <TR> 
    <TD height="20" bgcolor="#799AE1" align="center"><FONT color="#FFFFFF" style="font-size:14px">添 加 新 闻&nbsp;分 类 名 称</FONT></TD>
  </TR>
  <TR> 
    <TD bgcolor="#FFFFFF">
	<BR>
	<TABLE width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
        <TR align="center" bgcolor="#FFFFFF" height="20"> 
          <TD width="30">编号 </TD>
          <TD>分类名称</TD>
          <TD>确定操作</TD>
        </TR>
        <FORM name="form1" method="post" action="?action=add">
          <TR align="center" bgcolor="#FFFFFF"> 
		  <%if isarray(newsdata1) then%>
            <TD><%=ubound(newsdata1,2)+2%></TD>
			<%Else%>
			<TD>1</TD>
			<%End IF%>
	        <TD><INPUT name="name" type="text" id="name" size="12"></TD>
	        <TD><INPUT type="submit" name="Submit3" value="添 加"></TD>
          </TR>
        </FORM>
      </TABLE>
	<BR></TD>
  </TR>
</TABLE>
</BODY>                                                                                                                          
                                                                                                                          
</HTML>  
