<%@ Language=VBScript %>
document.write("<%
SERVER_NAME=Request.ServerVariables("SERVER_NAME")
If Request.ServerVariables("HTTP_FreeHostAPISITE")<>"" Then SERVER_NAME=Request.ServerVariables("HTTP_FreeHostAPISITE")
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set dsph = Server.CreateObject("ADODB.Recordset")	
		username=Application("superuser")
	if session("agentname")<>"n" then username=session("agentname")
	Sql="Select top 10 * 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 top 10 * 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 ("pagesize")<>"" and  IsNumeric(Request.QueryString("pagesize")) then sql = replace(sql,"10 *",Request.QueryString("pagesize")&" *")

	dsph.Open Sql,conn,1,1
X=1
while not dsph.eof
%><IMG height=18 src=http://<%=SERVER_NAME%>/newstyle/3/images/inside-left-little.jpg width=18 align=absMiddle>&nbsp;<a href=http://<%=SERVER_NAME%>/style/info/shownews.asp?id=<%=dsph("id")%> target=_blank><font color=black><%=left(dsph("title"),18)%>...</font></a><br><%X=X+1
dsph.movenext
wend
dsph.close
set dsph=nothing
%>");