Gallery News


<% Dim connect2, records1, AtstRS, Linkstr, ImgStr Set Connect2 = Server.CreateObject("ADODB.Connection") Connect2.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("Webpub.mdb") Set records1 = Server.CreateObject("ADODB.Recordset") records1.Open "SELECT * From Events Where Active Order By Orderfld", Connect2 If not records1.eof and not records1.bof then records1.movefirst %>
<% Do until records1.eof Linkstr = "" If Len(records1("Event_Link")) > 0 Then 'Try to make valid link if not If Left(records1("Event_Link"), 3) = "www" Then Linkstr = "http://" & records1("Event_Link") Else Linkstr = records1("Event_Link") End If End If Imgstr = "" If Instr(records1("Event_Image"), "\") > 0 Then 'Parse Image out of String Imgstr = Mid(records1("Event_Image"), InstrRev(records1("Event_Image"), "\") + 1) Else Imgstr = records1("Event_Image") End If If records1("Image_Location") = "Right" Then %>
<% Else ' Image on Left Side %> <% End If records1.movenext Loop End If 'have records %>
<% If Len(records1("Event_Image")) > 0 Then If Len(records1("Event_Link")) > 0 Then %> <%End If If isnumeric(records1("Image_Size")) And records1("Image_Size") > 20 Then %> " border="0" style="margin:6px;"> <%Else%> <%End If If Len(records1("Event_Link")) > 0 Then %> <%End If End If %> <%=records1("Event_Title")%>
<% DateText = records1("Event_Dates") & "" DateText = Replace(replace(DateText,"""","''"),"","é") DateText = replace(DateText,CHR(10),"") DateText = Replace(replace(DateText,CHR(13),"
")," ", "   ") DateText = Replace(replace(DateText,CHR(147),"''"),CHR(148), "''") DateText = Replace(replace(DateText,CHR(145),"'"),CHR(146), "'") DateText = Replace(replace(DateText,CHR(133),"..."),CHR(149), "-") %> <%=DateText%>
 
<% If Len(records1("Event_Artist")) > 0 Then Set AtstRS = Server.CreateObject("ADODB.Recordset") AtstRS.Open "SELECT * From Artists Where ArtistID = '" & records1("Event_Artist") & "'", Connect2 If AtstRS.EOF and AtstRS.BOF Then AtstRS.close Else %> <%=AtstRS("ArtistFirst") & " " & AtstRS("ArtistLast")%>
 
<% AtstRS.close End If End If EventText = records1("Event_Text") If IsNull(EventText) Then EventText="" Else EventText = Replace(replace(EventText,"""","''"),"","é") EventText = replace(EventText,CHR(10),"") EventText = Replace(replace(EventText,CHR(13),"
")," ", "   ") EventText = Replace(replace(EventText,CHR(147),"''"),CHR(148), "''") EventText = Replace(replace(EventText,CHR(145),"'"),CHR(146), "'") EventText = Replace(replace(EventText,CHR(133),"..."),CHR(149), "-") End If %> <%=EventText%>
 
<% DateText = records1("Event_Dates") & "" DateText = Replace(replace(DateText,"""","''"),"","é") DateText = replace(DateText,CHR(10),"") DateText = Replace(replace(DateText,CHR(13),"
")," ", "   ") DateText = Replace(replace(DateText,CHR(147),"''"),CHR(148), "''") DateText = Replace(replace(DateText,CHR(145),"'"),CHR(146), "'") DateText = Replace(replace(DateText,CHR(133),"..."),CHR(149), "-") %> <%=records1("Event_Title")%>
<%=DateText%>
 
<% If Len(records1("Event_Artist")) > 0 Then Set AtstRS = Server.CreateObject("ADODB.Recordset") AtstRS.Open "SELECT * From Artists Where ArtistID = '" & records1("Event_Artist") & "'", Connect2 If AtstRS.EOF and AtstRS.BOF Then AtstRS.close Else %> <%=AtstRS("ArtistFirst") & " " & AtstRS("ArtistLast")%>
 
<% AtstRS.close End If End If EventText = records1("Event_Text") If IsNull(EventText) Then EventText="" Else EventText = Replace(replace(EventText,"""","''"),"","é") EventText = replace(EventText,CHR(10),"") EventText = Replace(replace(EventText,CHR(13),"
")," ", "   ") EventText = Replace(replace(EventText,CHR(147),"''"),CHR(148), "''") EventText = Replace(replace(EventText,CHR(145),"'"),CHR(146), "'") EventText = Replace(replace(EventText,CHR(133),"..."),CHR(149), "-") End If %> <%=EventText%>
<% If Len(records1("Event_Image")) > 0 Then If Len(records1("Event_Link")) > 0 Then %> <%End If If isnumeric(records1("Image_Size")) And records1("Image_Size") > 20 Then %> " border="0" style="margin:6px;"> <%Else%> <%End If If Len(records1("Event_Link")) > 0 Then %> <%End If End If %>