<%@LANGUAGE="VBSCRIPT"%> <% Dim ID if request.querystring("ID") <> "" then ID = request.querystring("ID") else ID = 0 end if Dim rsContent Dim rsContent_numRows Set rsContent = Server.CreateObject("ADODB.Recordset") rsContent.ActiveConnection = MM_Connector_STRING rsContent.Source = "SELECT c.fBody,c.fContentID,c.fDateAdded,c.fTitle,a.fFileID FROM tContent AS c LEFT OUTER JOIN tAttachedFiles AS a ON c.fContentID = a.fContentID WHERE c.fContentID = " + CStr(ID) rsContent.CursorType = 0 rsContent.CursorLocation = 2 rsContent.LockType = 1 rsContent.Open() rsContent_numRows = 0 %> Welcome to Comptons 2000
 
 

Comptons 2000 Ltd.
85 MOSELEY STREET
BIRMINGHAM
B12 0RT

Telephone
0121 622 5562
0121 622 5585

Fax
0121 622 6322
Email
enquiries@comptons2000.co.uk

 

 
<% do while rsContent.eof = false %> <% ' if file record exists find file and figure out ext. if image display at top otherwise link at bottom. if rsContent("fFileID") <> "" AND rsContent("fFileID") <> 0 then Dim rsFile Dim rsFile_numRows Set rsFile = Server.CreateObject("ADODB.Recordset") rsFile.ActiveConnection = MM_Connector_STRING rsFile.Source = "SELECT fExtension,fName,fHeight,fWidth FROM tFiles WHERE fFileID = " & rsContent("fFileID") rsFile.CursorType = 0 rsFile.CursorLocation = 2 rsFile.LockType = 1 rsFile.Open() rsFile_numRows = 0 if LCase(rsFile("fExtension")) = "pdf" then FileIcon = "pdf.gif" elseif LCase(rsFile("fExtension")) = "doc" then FileIcon = "word.gif" elseif LCase(rsFile("fExtension")) = "xls" then FileIcon = "xls.gif" elseif LCase(rsFile("fExtension")) = "jpg" then FileIcon = "jpeg.gif" elseif LCase(rsFile("fExtension")) = "gif" then FileIcon = "gif.gif" else FileIcon = "misc.gif" end if end if %>

<%= DoDateTime((rsContent.Fields.Item("fDateAdded").Value), 1, 2057) %>
<%=UCase(rsContent.Fields.Item("fTitle").Value)%>

<% if rsContent("fFileID") <> "" AND rsContent("fFileID") <> 0 then if LCase(rsFile("fExtension")) = "gif" OR LCase(rsFile("fExtension")) = "jpg" then 'Dim Height,Width 'Height = rsFile("fHeight") 'Width = rsFile("fWidth") 'if Width > 524 then 'Width = 524 'Height = Round((524/Width)*Height) 'end if %>

.<%=(rsFile("fExtension"))%>">

<% end if end if %> <%=Replace(rsContent.Fields.Item("fBody").Value,CHR("10"),"
")%> <% if rsContent("fFileID") <> "" AND rsContent("fFileID") <> 0 then if LCase(rsFile("fExtension")) <> "gif" AND LCase(rsFile("fExtension")) <> "jpg" then %>

.<%=(rsFile("fExtension"))%>" target="_blank"> <%=rsFile("fName")%>

<% end if rsFile.Close() Set rsFile = Nothing end if rsContent.MoveNext() Loop %>
 
Back Home bookmark Comptons2000.co.uk
Back Home bookmark Comptons2000.co.uk <% rsContent.Close() Set rsContent = Nothing %>