<% '编码者: 蓝诺 '邮 箱: spacener@163.com 'Q Q: 75833476 '时 间: 2007-10-11 on error resume next Set Conn=Server.CreateObject("Adodb.Connection") ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:DataBase Password=shundeit888;Data Source="& Server.MapPath("admin_zhongzheng/DataBase/##xinshi.mdb") Conn.open ConnStr function CloseDb Conn.close Set Conn = Nothing End Function '''''''''''''''''''''''处理数据函数集合'''''''''''''''''''''''''''''''''''''' '功能:执行sql语句没有返回值 Function ExeSQL(strSQL) Conn.Execute(strSQL) End Function '功能:执行sql语句返回Recordset Function ReturnRecordSet(strSQL) Dim Rs Set Rs=Server.CreateObject("ADODB.RecordSet") 'Response.write strSQL 'Response.end Rs.Open strSQL,Conn,1,3 Set ReturnRecordSet=Rs End Function '得到网站的内容 Function getNetCont(Xid,encn) dim Rs,sql sql="select top 1 [info],[eninfo] from system_text_info where id="&Xid Set Rs=ReturnRecordSet(sql) If Not (Rs.eof and Rs.eof) Then if encn="cn" then getNetCont=Rs(0) else getNetCont=Rs(1) end if Else getNetCont="No Data!" End If Rs.Close Set Rs=Nothing End Function Function ListIndexNews(nTop,Xid,nLen,encn) dim Rs,sql if encn="cn" then sql="select top "& nTop &" id,title,dateandtime from system_text_info where sort_name_id in ("&Xid&") order by id desc" else sql="select top "& nTop &" id,entitle,dateandtime from system_text_info where sort_name_id in ("&Xid&") order by id desc" end if Set Rs=ReturnRecordSet(sql) If Not (Rs.eof and Rs.eof) Then Response.Write ("") 'Response.Write ("") 'Response.Write ("") 'Response.Write ("") 'Response.Write ("") do while not rs.eof Response.Write ("") Response.Write ("") Response.Write ("") Response.Write ("") Response.Write ("") Response.Write ("") Response.Write ("") Response.Write ("") rs.MoveNext loop Response.Write ("
  
"&rs(2)&""&left(rs(1),nLen)&"
") Else Response.Write ("无") End If Rs.Close Set Rs=Nothing End function %> <% '******************************************************* 'Function: ListExpPic(pTop,pChanId,pColId,pSort,pDesc,pNum,pW,pH,pTd,pSc,pScW,pScH) 'Description: 以图片形式为示新闻 'Parameter: pTop:前pTop条,pChanId:频道Id,pColId:栏目Id,pSort:排序的字段,pNum:标题显示pNum个字符,pSort:排序字段,pDesc:1升序 0降序 'Parameter: pW图片的宽 pH图片的高 pTd一行显示图片个数 pSc:0不动,1动画 'Return: 无返回 '调用的方法: Call ListExpPic(5,1,5,"",0,15,129,94,5,1,800,120) '******************************************************** function ListExpPic(pTop,pDesc,pNum,pW,pH,pTd,pSc,pScW,pScH) dim rs,strSQL,uDesc,uSort,i,uChan,uCol,uddImg If pDesc Then uDesc="asc" Else uDesc="desc" End If If pTop=0 Then strSQL="select * from product_info where tuijian=1 and pass=1 order by sx asc" else strSQL="select top "&pTop&" * from product_info where tuijian=1 and pass=1 order by asc" End If set Rs=ReturnRecordSet(strSQL) if Not(Rs.eof and Rs.bof) Then Select Case pSc Case "0" i=1 Response.Write("") Response.Write("") do while not rs.eof Response.Write("") if i mod pTd=0 then Response.Write("") rs.MoveNext i=i+1 loop Response.Write("") Response.Write("
") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("") Response.Write("
"&Rs("product_name")&"
") Case "1" %>
<% a=1 do while not rs.eof %> <%uddImg=uddImg&" " %> <%rs.MoveNext a=a+1 Loop Response.write uddImg&uddImg %>

"&Rs("product_name")&"
"&rs("shichangjia")&"元
<% End Select end if Rs.Close set rs=Nothing end function %> <% '******************************************************* 'Function: ListJsPic(pTop,pChan,pXid,pSort,pH,pW) 'Description: 列出指定栏目图片新闻 'Parameter: pTop:前pTop条,pChan:频道Id,pXid:指定新闻类别为pXid,pSort:排序的字段,pH:高,pW:宽 'Return: 无返回 '调用的方法: Call ListJsPic(5,1,2,"Id",211,300) '******************************************************** Function ListJsPic(pTop,pSort,pH,pW) dim Rsp,strSQL,uSort,uPic,uLinks,uTexts,i uPic = "" uLinks = "" uTexts = "" i = 0 if pSort="" then uSort=" order by Id desc" else uSort=" order by "&pSort end if strSQL="select top "&pTop&" * from system_text_info where tuijian=1 and small_img<>'' order by dateandtime desc" set Rsp=ReturnRecordSet(strSQL) if Not(Rsp.eof and Rsp.bof) Then do while Not Rsp.eof If i=0 Then uPic = Rsp("small_img") uLinks = "cn/shownews.asp?id="&Rsp("id") uTexts = Rsp("title") Else uPic = uPic&"|"&Rsp("small_img") uLinks = uLinks&"|"&"cn/shownews.asp?id="&Rsp("id") uTexts = uTexts&"|"&Rsp("title") End If Rsp.MoveNext i=i+1 Loop end if Rsp.Close set Rsp=Nothing %> <% End Function %> 广州中正冲床压力机;中正冲床;中正压力机;中正机械;广州中正精密机床厂
copyright©广州中正精密机床厂.    [直接跳过动画]      [企业邮箱登陆]