%@ Language=VBScript %> <%Option Explicit%> <% Response.CharSet="iso-8859-7" if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if if session("UserID") & "" = "" then Response.Redirect "account.asp?fromnews=1" dim SQL, oConn, oRs, Data, DataExist, Access, newcateg, i dim DTData, DTExist,PHrecordCount,DTRecordCount newcateg = 1 set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.Recordset") if Session("UserID") & "" <> "" then SQL = "Select UCategID, UAccess from [User] where UID=" & session("UserID") oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then if oRs("UCategID")=7 AND oRs("UAccess") = true then Access = 1 else Access = 0 else Response.Redirect "account.asp?fromnews=1" end if oRs.close end if if Access = 1 then if lang = "GR" then SQL = "Select top 4 PHDID, PHTitle, PHThumbname, PHDate from Photos where PHDID in (select PHDID from DeltioTypou) order by PHDate" if lang = "EN" then SQL = "Select top 4 PHDID, PHTitleEN, PHThumbname, PHDate from Photos where PHDID in (select PHDID from DeltioTypou) order by PHDate" oRs.open SQL, oConn, 3,1,1 if oRs.EOF = False then DataExist = 1 Data = oRs.GetRows() PHrecordCount = oRs.RecordCount else DataExist = 0 end if oRs.close if lang = "GR" then SQL = "Select DID, DDate, DTitle, dbo.GetLessText(DText,100) from DeltioTypou" if lang = "EN" then SQL = "Select DID, DDate, DTitleEN, dbo.GetLessText(DTextEN,100) from DeltioTypou" oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then DTExist = 1 DTData = oRs.GetRows() DTRecordCount=oRs.RecordCount end if end if set oRs = nothing oConn.close : set oConn = nothing GoToPage = "news.asp" menu = "4" %>