<%@ Language=VBScript %> <%Option Explicit%> <% if session("LastNameOnTop") & "" = "" AND session("UserID") & "" <> "" then%> <%end if dim Access, newcateg,oConn,oRs,sql,whereclause dim searchtitlemeso,searchdate dim prodsubcateg,i,House,showdim dim arrdate,searchingdate GoToPage = "pubs.asp" menu = "4" newcateg = 3 set oConn = Server.CreateObject("ADODB.Connection") oConn.open Application("ConStr") set oRs = Server.CreateObject("ADODB.Recordset") '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 showdim=request.form("showdim") if showdim="1" then '----------------------------------------anazitisi dimosievmaton-------------------------------- '===================building whereclause================================== whereclause = "" searchtitlemeso = Replace(Request("searchtitlemeso"),"'","''") searchdate = Request("searchdate") if searchtitlemeso & "" <> "" then whereclause =" WHERE (RTitle like ''%" & searchtitlemeso & "%'' OR RTitleEN like ''%" & searchtitlemeso & "%''OR RMeso like ''%" & searchtitlemeso & "%'' OR RMesoEN like ''%" &searchtitlemeso & "%'')" end if if searchdate & "" <> "" then arrdate=split(searchdate,"-") searchingdate=arrdate(2) & "/" & arrdate(1) & "/"&arrdate(0) if whereclause & ""<>"" then whereclause=whereclause & " AND RDate =convert(SmallDateTime,''"& searchingdate &"'',120) " else whereclause =" WHERE RDate = convert(SmallDateTime,''"& searchingdate &"'',120)" end if end if '===================sigentrosi dimosievmaton 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 = "SearchDim '" & 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 showdim=1 then %> <%if oRs.EOF=false then%> <%while Not oRs.EOF%> <%oRs.MoveNext wend%> <%end if%> <%end if%>
"> "> <%=Calender(lg)%>
<%=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%>
" alt="" width="78" height="78" border="0">
<% dim fso, RelPath set fso = Server.CreateObject("Scripting.FileSystemObject") RelPath = Server.mappath("../RelFiles") if fso.FileExists(RelPath &"/"&oRs("RID")&".pdf") then 'elegxos mipos den iparxei kataxorimeno pdf foto gia to dim %> <%end if%> <%if fso.FileExists(RelPath &"/"&oRs("RID")&".doc") then 'elegxos mipos den iparxei kataxorimeno doc gia to dim %> <%end if%>
<%=oRs(""&RTitle(lg)&"")%>:<%=oRs("RDate")%>
<%=oRs(""&RMeso(lg)&"")%>
.pdf" class="normal" onmouseover="window.status='<%=PDFWindowStatus(lg)%>';return true;" onmouseout="window.status='<%=windowstatus%>';return true;"><%=DownloadPDF(lg)%>
.doc" class="normal" onmouseover="window.status='<%=DOCWindowStatus(lg)%>';return true;" onmouseout="window.status='<%=windowstatus%>';return true;"><%=DownloadDOC(lg)%>
<% if showdim=1 then oRs.close : set oRs = nothing oConn.close : set oConn = nothing showdim=0 end if %>