<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
'****************************************************************
'**   版权所有：烈火工作室  演示网站http://www.strongfire.cn   **
'**   QQ:839225572   邮箱：strongfire2008@163.com              **
'**   非正版用户不得擅自非法修改用于商业用途！查出必究。       **
'****************************************************************
%>
<!--#include file="islogin.asp"-->
<!--#include file="Check_SqlIn.asp"-->
<!--#include file="admin_conn.asp"-->
<!--#include file = "config.asp"-->
<%
act=Request("act")
id=Request("id")
if (act<>""and id<>"") then
	Set rs=Server.CreateObject("Adodb.RecordSet")
	sql="Select tj From article Where id="&id
	rs.open sql,conn,1,3
	if (rs.bof and rs.EOF) then
		response.Write "<script language=javascript>alert( '没有此id的信息！');</script>"
	else
		if act="addtj" then
			rs("tj")=1
		end if
		if act="deltj" then
			rs("tj")=0
		end if
		rs.update
		response.Write "<script language=javascript>alert( '操作完成！');</script>"
	end if
	
	rs.close
	set rs=nothing
	
end if
%>
<html>
<head>
<LINK href="admin_Css.css" type=text/css rel=stylesheet>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改信息列表</title>

<style type="text/css">
<!--
.STYLE1 {
	font-size: 14px;
	color: #0000FF;
	font-weight: bold;
}
-->
</style>
<script language="JavaScript" type="text/javascript">
function check_input()  
{  
	if (form1.id.value==""){
		alert ("\n请填写id号！");
		document.form1.id.focus();
		return false;
	}
		return true;
}
</script>
</head>


<body>
<div align="center">
  <p><br>
  </p>
  <table class="list" width="90%" border="0" cellspacing="1" cellpadding="0">
    
    <tr>
      <th colspan="5" ><div align="center">推荐信息列表</div></th>
    </tr>
    <tr>
      <td width="50" ><div align="center">ID号</div></td>
      <td width="275" ><div align="center">标题</div></td>
      <td width="100" ><div align="center">浏览数</div></td>
      <td width="120" ><div align="center">日期</div></td>
      <td width="120" ><div align="center">操作</div></td>
    </tr>
  <%
		

Set rs=Server.CreateObject("ADODB.RecordSet") 

sql="select ID,Title,hits,addTime from article where tj =1 order by id desc"
rs.Open sql,conn,1,1
tjlhsum=0
if rs.eof and rs.bof then
  response.Write("<tr><td colspan='5' ><div align='center'>暂时没有记录</div> </td></tr>")
else

do while not rs.eof
%>	
	
    <tr >
      <td width="50" class="table_td1"><div align="center"><%=rs("ID")%></div></td>
      <td class="table_td1"><a  href="../article.asp?id=<%=rs("ID")%>"  target=_blank><%=rs("Title")%></a></td>
      <td width="100" class="table_td1"><div align="center"><%=rs("hits")%></div></td>
      <td width="120" class="table_td1"><div align="center"><%=rs("addTime")%></div></td>
      <td width="120" class="table_td1"><div align="center"><a href='TjArticle.asp?act=deltj&id=<%=rs("id")%>'>取消</a></div></td>
    </tr>
<%
rs.movenext 
tjlhsum=tjlhsum+1
loop
end if
rs.close
set rs=nothing
%>	
	
    
    <tr>
      <td colspan="5" ><div align="center">注：只需设置<%=tjrownum%>条信息，推荐信息只显示<%=tjrownum%>条。
        
      目前共<%=tjlhsum%>条</div>        
        <div align="center"></div></td>
    </tr>
  </table>
  <table width="90%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td width="58%"><form id="form1" name="form1" onSubmit="return check_input()" method="post" action="TjArticle.asp?act=addtj">
        输入推荐信息id号：

        <input name="id" type="text" id="id" size="10" />
     
      <input type="submit" name="Submit" value="提交" />
      
      </form></td>
      <td width="42%" valign="top"><a href="JsMakejs.asp?info=推荐信息"></a></td>
    </tr>
  </table>
  <p>&nbsp;</p>
  <p><br>
  </p>
</div>
</body>

</html>
