%@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 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, 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 %>