<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <% option explicit %> <% Dim equipID, equipName Dim query Dim cat1RS, eRS, epRS, maxPID Dim cat1RSCnt, eRSCnt, epRSCnt Dim cur_equip, cur_cat1, dis_equip, dis_cat1 Dim cat_x, cat_y, equip_cnt, equip_type Dim default_style cat_x = 0 cat_y = 0 default_style = "none" equipName = "" 'ConnectDB_TS_MDB() ConnectDB_TS_MSSQL() If Request.Form("cbx_type") = "" or Request.Form("cbx_type") = "All" Then equip_type = "" Else equip_type = Request.Form("cbx_type") End If Set maxPID = CreateObject("ADODB.RecordSet") If equip_type = "" Then query = "select max(e_id) max_pid from " + db_equipment + " where e_cat1 <> ''" Else query = "select max(e_id) max_pid from " + db_equipment + " where e_cat1 <> '' and e_type = '" & equip_type & "'" End If maxPID.Open query, objDBConn_TS_MDB Set cat1RSCnt = CreateObject("ADODB.RecordSet") If equip_type = "" Then query = "select e_type, case when e_type = 'Production Equipment' then '生产设备' when e_type = 'Testing Equipment' then '检测设备' else '' end e_type_lang1, count(e_cat1) count from " + db_equipment + " where e_cat1 <> '' group by e_type order by e_type" Else query = "select count(e_cat1) count from " + db_equipment + " where e_cat1 <> '' and e_type = '" & equip_type & "'" End If cat1RSCnt.Open query, objDBConn_TS_MDB 'Set cat1RS = CreateObject("ADODB.RecordSet") 'If equip_type = "" Then ' query = "select e_id, e_cat1, e_type from " + db_equipment + " order by e_cat1, e_type" 'Else ' query = "select e_id, e_cat1, e_type from " + db_equipment + " where e_type = '" & equip_type & "' order by e_cat1, e_type" 'End If 'cat1RS.Open query, objDBConn_TS_MDB 'for each x in cat1RS.fields ' response.write(x.name) ' response.write(" = ") ' response.write(x.value) 'next dim iwidth, iHeight sub ImgDimension(img) dim myImg, fs Set fs= CreateObject("Scripting.FileSystemObject") 'Response.write("Check file" & img) if not fs.fileExists(Trim(img)) then exit sub 'Response.write("file found" & img) set myImg = loadpicture(Trim(img)) iwidth = myImg.width iHeight = myImg.height set myImg = nothing set fs = nothing end sub %> Tatt Shing Metal Work Manufactory 達成金屬製品廠
 
|
简体
 
 
 
 
 
 
 
 
<% cat_x = 0 WHILE NOT cat1RSCnt.EOF cur_equip = cat1RSCnt("e_type") If cur_equip = "Production Equipment" Then dis_equip = "生产设备" ElseIf cur_equip = "Testing Equipment" Then dis_equip = "检测设备" Else dis_equip = "" End If cat_x = cat_x + 1 Set cat1RS = CreateObject("ADODB.RecordSet") query = "select e_id, e_cat1, e_cat1_lang1 from " + db_equipment + " where e_type = '" & cur_equip & "' and e_cat1 <> '' order by e_cat1" cat1RS.Open query, objDBConn_TS_MDB %> <% If cat1RSCnt("count") > 0 Then cat_y = 0 WHILE NOT cat1RS.EOF cur_cat1 = cat1RS("e_cat1_lang1") cat_y = cat_y + 1 %> <% cat1RS.MoveNext WEnd End If Set cat1RS = Nothing cat1RSCnt.MoveNext WEnd Set cat1RSCnt = Nothing %>
<% If cat1RSCnt("count") > 0 Then %>
<% Else %> <% End If %>
');" style="cursor:hand"><%=dis_equip%>
 
');" style="cursor:hand"><%=cur_cat1%>
 
<% Set eRSCnt = CreateObject("ADODB.RecordSet") If equip_type = "" Then query = "select Count(e_id) count from " + db_equipment + " with (nolock)" Else query = "select Count(e_id) count from " + db_equipment + " with (nolock) where e_type = '" & equip_type & "'" End If eRSCnt.Open query, objDBConn_TS_MDB Set eRS = CreateObject("ADODB.RecordSet") If equip_type = "" Then query = "select e_id, e_cat1, e_cat1_lang1 e_name from " + db_equipment + " with (nolock) order by e_cat1, e_type" Else query = "select e_id, e_cat1, e_cat1_lang1 e_name from " + db_equipment + " with (nolock) where e_type = '" & equip_type & "' order by e_cat1, e_type" End If eRS.Open query, objDBConn_TS_MDB equip_cnt = 0 If eRSCnt("Count") > 0 Then WHILE NOT eRS.EOF equipName = eRS("e_name") equipID = eRS("e_id") equip_cnt = equip_cnt + 1 If equip_cnt = 1 Then %> <% Else %> <% End If %> <% eRS.MoveNext WEnd Set eRS = Nothing End If %>