<%@ Language=VBScript %>
<%
If Not isnumeric(request("type1")) Then Response.Redirect "e.asp?e=非法type1"
If Not isnumeric(request("type2")) Then Response.Redirect "e.asp?e=非法type2"
If Not isnumeric(request("pn")) Then Response.Redirect "e.asp?e=非法pn"
If Not isnumeric(request("pagesize")) Then Response.Redirect "e.asp?e=非法pagesize"
If request("freehost")<>"" And request("freehost")<>"lsoft" Then Response.Redirect "e.asp?e=非法freehost"
If instr(request.QueryString,"<")>1 Then Response.Redirect "e.asp?e=非法URL"
If instr(request.QueryString,">")>1 Then Response.Redirect "e.asp?e=非法URL"
If instr(request.QueryString,";")>1 Then Response.Redirect "e.asp?e=非法URL"
If instr(request.QueryString,"""")>1 Then Response.Redirect "e.asp?e=非法URL"
If instr(request.QueryString,"(")>1 Then Response.Redirect "e.asp?e=非法URL"
If instr(request.QueryString,")")>1 Then Response.Redirect "e.asp?e=非法URL"
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html12")%>
　新闻/帮助
<%=htmlwrite("html13")%><br>
<br>

<a href="listnews.asp?type1=0">新闻类</a>
<a href="listnews.asp?type1=1">帮助类:</a>
<a href="listnews.asp?type2=0">域名类</a>		
<a href="listnews.asp?type2=1">虚拟主机类</a>		
<a href="listnews.asp?type2=2">邮箱类</a>		
<a href="listnews.asp?type2=3">数据库类</a>		
<a href="listnews.asp?type2=4">IDC类</a>		
<a href="listnews.asp?type2=5">网站建设类</a>		
<a href="listnews.asp?type2=6">付款类</a>		
<a href="listnews.asp?type2=8">云服务器类</a>
<a href="listnews.asp?type2=9">CDN类</a> <a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=10">网站优化类</a> <a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=11">企业短信类</a><a href="listnews.asp?type2=10"></a> <a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=12">电子传真类</a> <a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=7"></a><a href="listnews.asp?type2=7">其他类</a>	<br>
<br>


<%'/style/info/listnews.asp?typeid=分类号&pagesize=条数
'listnewjs.asp一样支持这种方式
'/style/info/listnewsjs.asp?typeid=分类号&pagesize=条数
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsnews = Server.CreateObject("ADODB.Recordset")	
	username=Application("superuser")
	if session("agentname")<>"n" then username=session("agentname")
	Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then 	Sql="Select * from FreeHost.FreeHost_News where username='"&username&"'  and typeid='"&Request.QueryString("typeid")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"

if Request.QueryString ("type1")<>"" And (Request.QueryString ("type1")="0" Or Request.QueryString ("type1")="1")  and  IsNumeric(Request.QueryString("type1")) then 	Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and type1='"&Request.QueryString("type1")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"
if Request.QueryString ("type2")<>"" and  IsNumeric(Request.QueryString("type2")) then 	Sql="Select * from FreeHost.FreeHost_News where username='"&username&"' and type1=1 and type2='"&Request.QueryString("type2")&"' and (type1=0 or type1=1) order by orderbyid desc,id desc"


	dsnews.PageSize = 15
if Request.QueryString ("pagesize")<>"" and  IsNumeric(Request.QueryString("pagesize")) then dsnews.PageSize = Request.QueryString("pagesize")
	dsnews.Open Sql,conn,1,1
%>
<%
if dsnews.Eof then
%>
<br>
数据库中不存在相关的记录。
<%
else
if Request.ServerVariables("QUERY_STRING")<>"" then
ask=Split(Request.ServerVariables("QUERY_STRING"), chr(38)&"pn")
else
ask=Split("freehost=1", "")
ask(0)="freehost=lsoft"
end if
	pn=1
if Request.QueryString ("pn")<>"" then pn=Request.QueryString ("pn")
If dsnews.RecordCount <> 0 Then dsnews.AbsolutePage = CLng(pn)  
    if clng(pn)<=10 then
    begini=1
      if dsnews.PageCount<=10 then
       endini=dsnews.PageCount 
       else
       endini=10
      end if
    end if
%>
<%if clng(pn)<=10 then%>最新 <%for i=begini to endini
    if clng(pn)=i then%><font color=red>[<%=i%>]</font><%else%><a href="?<%=ask(0)%>&pn=<%=i%>"><font color="#000000">[<%=i%>]</font></a><%end if%>　<%next%> 
        <%else%>　<a href="?<%=ask(0)%>&pn=1"><font color="#000000">最新[1]--[10]</font></a>　　现在是第<font color=red>[<%=pn%>]</font>页 
        　共<%=dsnews.PageCount%>页　<%end if%><%If Clng(pn)>1 Then%><a href="?<%=ask(0)%>&pn=<%=pn-1%>"><font color="#000000">上一页</font></a>
        <%End If%>|<%If Clng(pn)<dsnews.PageCount Then%><a href="?<%=ask(0)%>&pn=<%=pn+1%>"><font color="#000000">下一页</font></a>
        <%End If%>
<table width="100%"  border="0" cellspacing="1" bgcolor="#666666">
  <tr >
    <td width="10%" align="center" background="img/tablebg.gif"><font color="#FFFFFF">编号</font></td>    
    <td width="62%" align="center" background="img/tablebg.gif"><font color="#FFFFFF">标题</font></td>
	<td width="28%" align="center" background="img/tablebg.gif"><font color="#FFFFFF">时间</font></td>
  </tr>
<%
For N=1 To dsnews.PageSize 
					If dsnews.RecordCount=0 Then Exit For
%>

  <tr bgcolor="#FAFAFA">
    <td align="center"><%=dsnews("id")%></td>
    <td align="center"><a href="/style/info/shownews.asp?id=<%=dsnews("id")%>" target=_blank><font color="#000000"><%=dsnews("title")%></font></a></td>
	<td align="center"><%=dsnews("posttime")%>    </td>
  </tr>
<%
If clng(pn)=dsnews.PageCount Then
I = dsnews.RecordCount - (dsnews.PageCount-1) * dsnews.PageSize
If N=I Then Exit For
End If
dsnews.movenext
Next%>
</table>
<%
dsnews.close
set dsnews=nothing%>
<%end if%>
<%=htmlwrite("html14")%>
