<% Set objFSO = Server.CreateObject("Scripting.FileSystemObject") strPathtoTextFile=server.MapPath(".") & "\dat_file\" file_name="epos.txt" function check_file check_file=true if objFSO.FileExists(strPathtoTextFile&file_name) = false then check_file=false end if end function Function Onlist(StrField,StrIgnoreList) TheArray=Split(StrIgnorelist,",") If isarray(TheArray) Then For count=LBound(TheArray) to UBound(TheArray) If lcase(StrField) = lcase(TheArray(Count)) Then Onlist=True End If Next End If End Function Function DoList(Qry,LinkField,LinkRef,RefField,xingnorelist,twidth) Set xrs =conn.execute(Qry) IF not xrs.eof THEN intFieldCount = xrs.Fields.Count Dim aFields() ReDim aFields(intFieldCount,3) For x = 1 to intFieldCount aFields(x, 1) = xrs.Fields(x-1).Name aFields(x, 2) = xrs.Fields(x-1).Type aFields(x, 3) = xrs.Fields(x-1).DefinedSize Next IF twidth="" then twidth="100%" out_put= "" For x = 1 to intFieldCount if aFields(x, 1)<> RefField THEN If not onlist(aFields(x, 1),xingnorelist) THEN out_put=out_put & "" end if END IF Next out_put=out_put & "" intCount = 0 rcount=1 Do While NOT xrs.EOF intCount = intCount + 1 x = 0 'response.write (xField.name) ' Every other line will have a shaded background If intCount mod 2 = 0 Then bgcolor="#EEEEEE" Else bgcolor="White" End If out_put=out_put & "" For Each xField in xrs.Fields If not onlist(xField.name,xingnorelist) THEN curVal = xField.Value IF xField.name<>RefField THEN ' ignore the ref field 'response.write xField.name & "--" If ( lcase(xField.name)) = lcase(LinkField) Then out_put=out_put & "" ELSE out_put=out_put & "" End If END IF ' ref field END IF NEXT xrs.MoveNext out_put=out_put & "" rcount=rcount+1 Loop out_put=out_put & "
"& aFields(x,1) & "
" & xrs(LinkField) & ""& curVal & "
" DoList=out_put else DoList="" end if end Function %>