%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Option Explicit
dim DBConn
dim RS
dim SQLStr
dim id
dim title
dim author
dim image
dim des
dim pdf
dim PATH
dim info
dim artistlink
'PATH = "C:\Inetpub\vhosts\mst-online.org\subdomains\art\httpdocs\artwork.mdb"
PATH = server.MapPath("artwork.mdb")
id = Request.QueryString("id")
if Request.QueryString("id") & "" = "" then id = "1"
set DBConn = Server.CreateObject("ADODB.Connection")
set RS = Server.CreateObject("ADODB.Recordset")
'DBConn.Open "driver={Microsoft Access Driver (*.mdb)}; dbq=" & PATH
DBConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & PATH & "; Persist Security Info=False"
SQLStr = "SELECT * FROM artwork WHERE ID=" & id & " AND Show=true;"
RS.CursorLocation = 3
RS.CursorType = 3
RS.Open SQLStr, DBConn
if not RS.EOF then
title = RS("Title")
author = RS("Author")
image = RS("image")
des = RS("Des")
pdf = RS("pdf")
info = RS("Size")
artistlink = RS("link")
else
Response.Redirect("default.asp")
end if
RS.Close
%>
Artwork at MST, Institute of Education, University of London - <%= title %> by <%= author %>
Artwork <%= ID %> - <%= title %>
<%= info %> Print | Enlarge All artworks are copyrighted
<% if author & "" <> "" then %>
<%= author %>
<% if artistlink & "" <> "" then%>
Artist's website - <%= artistlink %>
<% end if %>