<% ' cut the strin function cutStr(str,strlen) dim l,t,c l=len(str) t=0 for i=1 to l c=Abs(Asc(Mid(str,i,1))) if c>255 then t=t+2 else t=t+1 end if if t>=strlen then cutStr=left(str,i)&".." exit for else cutStr=str end if next cutStr=replace(cutStr,chr(10),"") end function sub main() %> <% cid=request.querystring("cid") i=1 set rsT=server.CreateObject("ADODB.RECORDSET") sql="select * from Tw_News order by sendtime desc" rsT.open sql,conn,1,1 if rst.eof then response.write("") else Page=Int(Abs(Request("page"))) IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then page=1 rst.pagesize = 18 total = rst.RecordCount mp = rst.pagesize rst.absolutepage = page k=0 do while not rst.eof and mp>0:k=k+1 %> <% i=i+1 mp=mp-1 rst.movenext Loop response.write("
暫無信息
 [最新動向] ')" title="<%=rst("title")%>"><%=cutstr(rst("title"),45)%> [<% response.write year(rst("sendtime"))&"-"&right(("0"&month(rst("sendtime"))),2)&"-"&right(("0"&day(rst("sendtime"))),2) %>]
") %>
<% response.Write(" 共 "&total&" 條記錄 本頁顯示第 "&(page-1)*rst.pagesize+1&"條到第 "&(page-1)*rst.pagesize+k&" 條") if page>rst.pagecount then Response.redirect("?cid="&cid&"&page="&rst.pagecount) if page>1 then response.Write("9") response.Write(" 7 ") else response.write"9" response.write"7" end If response.Write("第"&page&"/"&rst.pagecount&"頁") if page8") response.Write(" :") else response.write"8" response.write":" end If end If %>
<% rst.close set rst=Nothing %> <% end Sub db="custom/database/Tw_Order.mdb" Set orderconn = server.CreateObject("adodb.connection") connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&db&"") orderconn.Open connstr cst_name=Trim(request.Form("cst_name")) cst_pwd =Trim(request.Form("cst_password")) set rs=server.createobject("adodb.recordset") if cst_name<>"" and cst_pwd<>"" then sql="select * from Tw_User where cst_id='"&cst_name&"' and cst_pwd='"&cst_pwd&"'" 'response.Write sql 'response.End() rs.open sql,orderconn,1,1 if not(rs.bof and rs.eof) then 'if password=rs("password") then session("cst_name")=Trim(rs("cst_name")) session("cst_id")=trim(rs("cst_id")) rs.close set rs=nothing 'Response.Redirect "cst_upload.asp" 'end if else response.Write "" end if orderconn.close:set orderconn=nothing end if %>
order now
If you are the first time to use our website order system,please get a detail information Of 'How to place an order'
quotation
If you quotation don't have the product you want , please don't hesitate to contact with us by telephone or email
inquiry
Online inquiry, it's a best way to save your time
<% strsql="select * from Tw_Model where P_parentid in (11)" set StrRs=server.CreateObject("ADODB.Recordset") StrRs.open strsql,conn,1,3 recount = strrs.recordcount if recount>0 then %> <% end if %>
<% if session("cst_name")="" or Isnull(session("cst_name")) then %>
Number:
(Please fill in mobile / telephone no.)
Password:
<% else response.Write "Welcome "&session("cst_name")&" Login

User No.: "&session("cst_id")&"    sign out

my cart
" end if %>