<!--#include file="Inc/Conn.asp"-->
<!--#include file="Head.asp"-->
<!--#include file="Inc/Code.asp"-->

<%
'首页产品列表
Dim NProHtml
Set rsp=Server.CreateObject("Adodb.Recordset")
Sql="Select top 10 * From [Product] Where [Pass]=True and [PassShow]=true Order by ID Desc"
rsp.Open Sql,Conn,1,1
If rsp.Eof Then
NProHtml = NProHtml & "没有项目!"
Else
Do While Not rsp.Eof
na=rsp("Name")
co=rsp("Mome")
If Len(na)>30 Then na = Left(na,30) & "..." 
If Len(co)>30 Then co = Left(co,30) & "..." 
NProHtml = NProHtml & "&nbsp;<IMG src='ziyan/tp007.gif'>&nbsp;&nbsp;<a href='ShowProduct.asp?id="&rsp("ID")&"'>"&na&"</a><br>"
rsp.MoveNext
Loop
End if
rsp.Close
Set rsp=Nothing


'首页推荐产品
Dim img
Dim ID
Dim Pname
Dim guige
Dim Unit
Dim MM
Set rs_p=Server.CreateObject("Adodb.Recordset")
Sql="Select Top 1 * From [Product] Where [PassShow]=true and [Pass]=true Order by ID Desc"
rs_p.Open Sql,Conn,1,1
If not rs_p.Eof or not rs_p.Bof Then
Do While Not rs_p.Eof or rs_p.Bof
img = rs_p("Image")
ID =  rs_p("ID")
Pname = Left(rs_p("Name"),10)
guige = rs_p("GuiGe")
Unit = rs_p("Unit")
MM = rs_p("Mome")
rs_p.MoveNext
Loop
End if
rs_p.Close
Set rs_p=Nothing
 


'首页下载列表
 
Dim DId
Dim Dimg
Dim Dname
Dim Dsize
Dim Dinfo
Dim Dtype
Dim Durl
set rs=server.createobject("adodb.recordset")
sqltext="Select Top 1 * From [DownLoad] Order By ID Desc"
rs.open sqltext,conn,1,1
if not rs.eof Then
Did = rs("ID")
Dimg = rs("PhotoUrl")
Dname = rs("Titel")
Dsize = rs("DownSize")
Dinfo = rs("InfoTime")
Dtype = rs("DownType")
Durl = Right(rs("DownUrl"),4)
End If
 



Dim StrBody
StrBody=application("JaIndex")
StrBody=replace(StrBody,"{用户登陆}",UserLogin())
StrBody=replace(StrBody,"{用户搜索}",FindProd())
StrBody=replace(StrBody,"{分类列表}",PClass())
StrBody=replace(StrBody,"{用户投票}",ShowVote())

StrBody=replace(StrBody,"{产品列表}",NProHtml)
StrBody=replace(StrBody,"{产品数字}",ID)
StrBody=replace(StrBody,"{产品图片}",Img)
StrBody=replace(StrBody,"{产品名称}",Pname)
StrBody=replace(StrBody,"{产品规格}",guige)
StrBody=replace(StrBody,"{产品单位}",Unit)
StrBody=replace(StrBody,"{产品备注}",MM)

StrBody=replace(StrBody,"{下载数字}",Did)
StrBody=replace(StrBody,"{下载图片}",Dimg)
StrBody=replace(StrBody,"{下载名称}",Dname)
StrBody=replace(StrBody,"{下载大小}",Dsize)
StrBody=replace(StrBody,"{下载日期}",Dinfo)
StrBody=replace(StrBody,"{下载类别}",Dtype)
StrBody=replace(StrBody,"{文件类型}",Durl)

StrBody=replace(StrBody,"{下载列表}",DownList())
StrBody=replace(StrBody,"{新闻信息}",TopNews("News_ID"))
StrBody=replace(StrBody,"{热点新闻}",TopNews("Hits"))
StrBody=replace(StrBody,"{工作信息}",Joblist())
StrBody=replace(StrBody,"{留言列表}",BookList())
StrBody=replace(StrBody,"{友情连接}",Friends())
Response.Write StrBody
%>
<!--#Include File="bottom.Asp"-->