<%@ Language=VBScript %> <%Option Explicit%> <% if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if dim Access, newcateg,oConn,oRs,sql,whereclause dim searchtitle,searchsubcateg,searchhouse dim prodsubcateg,i,House,showphotos GoToPage = "photos.asp" menu = "4" newcateg = 2 set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.Recordset") '===========================drop downs=========================================== if lang = "GR" then prodsubcateg=Application("ProdSubCategsGR") else prodsubcateg=Application("ProdSubCategsEN") end if 'to select ginetai sto global asa SQL = "Select ProdHouseID, ProdHouseDescr,ProdHouseDescrEN from ProdHouse" oRs.open SQL, oConn, 3,1,1 if oRs.EOF = false then House = oRs.GetRows() end if oRs.close 'elegxos an o xristis einai dimosiografos me dikaioma prosvasis 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" end if oRs.close end if showphotos=request.form("showphotos") if showphotos="1" then '----------------------------------------anazitisi fotos-------------------------------- '===================building whereclause================================== whereclause = "" searchtitle = Replace(Request("searchtitle"),"'","''") searchsubcateg = Request("subcateg") searchhouse = Request("houseid") if searchtitle & "" <> "" then whereclause =" WHERE (Phtitle like ''%" & searchtitle & "%'' OR PHTitleEN like ''%" & searchtitle & "%'')" end if if searchsubcateg & "" <> "" then if whereclause & ""<>"" then whereclause=whereclause & "AND PhCategID = '" & searchsubcateg & "' " else whereclause =" WHERE PhCategID = " & searchsubcateg & " " end if end if if searchhouse & "" <> "" then if whereclause & ""<>"" then whereclause=whereclause & "AND PhHouseID = " & searchhouse & " " else whereclause =" WHERE PhHouseID = " & searchhouse & " " end if end if '===================sigentrosi fotos apo ti vasi============== dim pageno,Tens PageNo = Request("PageNo") : if PageNo & "" = "" then PageNo = 1 'numero proigumenis selidas Tens = Request("tens") : if Tens & "" = "" then Tens = 1 'dekada proigumenis selidas dim totalRows,MainDataExist,totalPages,starting,ending SQL = "SearchPhotos '" & whereclause & "', '" & PageSize &"', " & PageNo oRs.open SQL, oConn, 0, 1, 1 if oRs.EOF = false then totalRows = oRs("TotalRecs") if totalRows = 0 then MainDataExist = 0 else totalRows = oRs("TotalRecs") 'sinolo foto sti vasi MainDataExist = 1 totalPages = totalRows \ PageSize 'arithmos selidon gia emfanisi if totalRows mod PageSize > 0 then totalPages = totalPages + 1 end if starting = ((tens-1)*10)+1 : ending = starting + 9 ',megistos arithmos selidon oi 10 end if %> <%=PageTitle%>
<%if Access = 1 then%>
       <%if newcateg <> 1 then%><%=NCateg1(lg)%><%else%><%=NCateg1(lg)%><%end if%>       <%if newcateg <> 2 then%><%=NCateg2(lg)%><%else%><%=NCateg2(lg)%><%end if%>       <%if newcateg <> 3 then%><%=NCateg3(lg)%><%else%><%=NCateg3(lg)%><%end if%>  
<%end if%>
<%if showphotos=1 then %> <%if oRs.EOF=false then%> <%while Not oRs.EOF%> <%oRs.MoveNext wend%> <%end if%> <%end if%>
">
<%=Page(lg)%>   <% if pageno>10 then %>   <%end if for i = starting to ending if i <=totalpages then%> <%if Cint(i) = Cint(PageNo) then%><%=i%><%else%><%=i%><%end if%> <% else exit for end if next if i   <%end if%>
_ZIP.ZIP" onmouseover="window.status='<%=PHWindowStatus(lg)%>';return true;" onmouseout="window.status='<%=windowstatus%>';return true;" >" alt="" width="78" height="78" border="0">
<%=oRs(""&PhotoTitle(lg)&"")%>:<%=oRs("PhDate")%>
<%=oRs(""&ProdSubCategDescr(lg)&"")%><%if oRs(""&PhotoHouseDescr(lg)&"")&""<>""then%>><%=oRs(""&PhotoHouseDescr(lg)&"")%><%end if%>
_ZIP.ZIP" class="normal" onmouseover="window.status='<%=PHWindowStatus(lg)%>';return true;" onmouseout="window.status='<%=windowstatus%>';return true;"><%=Download(lg)%>
<% if showphotos=1 then oRs.close : set oRs = nothing oConn.close : set oConn = nothing showphotos=0 end if %>