<% sDIR = request.QueryString("dir") sYEAR = mid(sDIR,1,4) 'response.write ( sYEAR & " " & sDIR ) Set oDB = Server.CreateObject("ADODB.Connection") oDB.Open "Driver={MySQL ODBC 3.51 Driver};SERVER=83.168.227.169;DATABASE=db1129556_koholmen;USER=u1129556_admin;PASSWORD=DEJ-994;OPTION=3;" dim SQLstring dim sString dim sDIR SQLstring = "select max(DIR) from Foton where WEBID = 1 and DIR < '" & sDIR &"'" 'response.write ( SQLstring & "
" ) Set RS = oDB.Execute(SQLstring) 'response.write ( RS(0) & "
" ) sPREV = RS(0) SQLstring = "select min(DIR) from Foton where WEBID = 1 and DIR > '" & sDIR &"'" 'response.write ( SQLstring & "
" ) Set RS = oDB.Execute(SQLstring) 'response.write ( RS(0) & "
" ) sNEXT = RS(0) response.write ( "
" ) if len(sPREV) > 0 then response.write ( "" ) response.write ("") if len(sNEXT) > 0 then response.write ( "") response.write ( "
" ) response.write ( "
" ) response.write ( sDIR ) response.write ( "/
" ) SQLstring = "select DIR, IMAGE, HITS from Foton where WEBID = 1 and DIR = '" & sDIR &"' order by IMAGE" Set RS = oDB.Execute(SQLstring) response.write ( "
" ) response.write ( "
" ) ix=0 do until RS.eof if len(RS("IMAGE")) > 0 then ix = ix + 1 if ix > 5 then ix=1 response.write ( "
" ) end if response.write ( "" ) end if RS.movenext Loop response.write ( "
" ) response.write ( "
" ) oDB.close %>