<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Const ShowAll_num=10 Const NumPerPage=5 Const footer=5 Const intro_len=280 const faq_num=5 id=CheckNum(Request.QueryString("id")) ConnectionDatabase if id>0 then title=conn.execute("select dir_name from product_dir where dir_id="&id)(0) else title="Product Center" end if %> <%=title%> - Liming Video
<%=title%>
<% if id<=0 then call ShowAll else call ShowOne(id,ShowOne_num) end if Sub ShowAll dim rs_dir,rs set rs_dir=conn.execute("select dir_id,dir_name,path_name from product_dir order by dir_order") path_name=rs_dir("path_name") dir_name=rs_dir("dir_name") while not rs_dir.eof Response.Write("

"&rs_dir("dir_name")&"

"&vbcrlf) Response.Write(""&vbcrlf) rs_dir.movenext wend set rs_dir=nothing End Sub Sub ShowOne(the_dir_id,the_num) dim where_dir,rs,rs_dir where_dir="dir_id="&the_dir_id num=conn.execute("select count(post_id) from product where "&where_dir)(0) if num>0 then 'begin set rs_dir=conn.execute("select dir_name,path_name from product_dir where dir_id="&the_dir_id) if not rs_dir.eof then path_name=rs_dir("path_name") dir_name=rs_dir("dir_name") end if set rs_dir=nothing Response.Write("

"&dir_name&"

"&vbcrlf) Response.Write(""&vbcrlf) 'end end if End Sub Function GetIntro(the_text) dim regEx,temp_text temp_text=the_text Set regEx=New RegExp regEx.Global=True regEx.IgnoreCase=True regEx.Pattern="<[a-z/][^'"">]*(('[^']*'|""[^""]*"")[^'"">]*)*>" temp_text=regEx.Replace(temp_text,"") temp_text=left(temp_text,intro_len) regEx.Pattern="\s+\S*$" temp_text=regEx.Replace(temp_text,"") GetIntro=trim(temp_text)&" ..." End Function %>
Tel:   0086-371-67992899        Fax:   0086-371-67992699
Email:  info@limingco.com