<%@LANGUAGE="VBscript"%> <% select case Request("task") case "hr": Session("Language") = "hr" case "en": Session("Language") = "en" case "de": Session("Language") = "de" case "it": Session("Language") = "it" case else if Session("Language") = "" then Session("Language") = "en" end select Call OpenDBConnection Dim iPage Dim iPageSize Dim iPageCount Dim iPageCurrent Dim strSQL Dim rsData : Set rsData = Server.CreateObject("ADODB.Recordset") Dim iRecordsShown Dim iAccType Dim iPersonNum dim iLocationID Dim bSearch Dim iRecordNumber iRecordNumber = 0 iAccType = Clng(Request("AccType")) iPersonNum = Clng(Request("PersonNum")) iLocationID = Clng(Request("LocationID")) Dim aField(9) Dim aSortOrder(1) Dim sSortOrder : sSortOrder = Request("SortOrder") Dim iRnd1,iRnd2 Dim sComma : sComma = ", " if trim(sSortOrder) = "" then aSortOrder(0) = "ASC" aSortOrder(1) = "DESC" aField(0) = "ApartmentName " aField(1) = "TypeID " aField(2) = "CategoryID " aField(3) = "LocationID " aField(4) = "OwnerID " aField(5) = "CenterDistance " aField(6) = "MarketDistance " aField(7) = "SeaDistance " aField(8) = "PersonNum " aField(9) = "HospitalDistance " bIn = False For i = 0 to 18 Randomize iRnd1 = int((9 * Rnd) + 0) Randomize iRnd2 = int((2 * Rnd) + 0) sComma = "" if instr(1,sSortOrder,aField(iRnd1),1) <= 0 then if bIn then sComma = ", " sSortOrder = sSortOrder & sComma & aField(iRnd1) & aSortOrder(iRnd2) bIn = True End if Next End if sWhere = "WHERE" Dim aTemp(2) Dim a() aTemp(0) = iPersonNum aTemp(1) = iLocationID aTemp(2) = iAccType j=0 sWhere = "" sAnd = "" stest = "" for i=0 to 2 if aTemp(i) > 0 then sWhere = "WHERE " if j>0 then sAnd = " AND " select case i case 0:stest = stest & sAnd & "PersonNum>=" & iPersonNum case 1:stest = stest & sAnd & "LocationID=" & iLocationID case 2:stest = stest & sAnd & "TypeID=" & iAccType end select j=j+1 End if next iBroj = true sActive = " where active=" & iBroj if j>0 then sActive = " and active=" & iBroj sSQL = "SELECT * FROM Apartments " & sWhere & stest & sActive & " and uSklopuHotela=false ORDER BY ApartmentName" ' & sSortOrder & ";" if Request("go2page") <> "" then session("currentPageObjekti") = Request("go2page") If session("currentPageObjekti") = "" Or session("currentPageObjekti") = 0 Then session("currentPageObjekti") = 1 if Request("task")= "new_search" then session("currentPageObjekti") = 1 Set rsObjekti = server.CreateObject("adodb.recordset") iPageSize = 4 Set rsObjekti = GetRecordset(sSQL) rsObjekti.PageSize = iPageSize if not rsObjekti.eof then If Len(Request("pagenum")) = 0 Then currPage = 1 Else If CInt(Request("pagenum")) <= rsObjekti.PageCount Then currPage = Request("pagenum") Else currPage = rsObjekti.PageCount End If End If rsObjekti.AbsolutePage = currPage Dim abspage, pagecnt abspage = rsObjekti.AbsolutePage pagecnt = rsObjekti.PageCount end if %> <%=getXMLValue("privatni_smjestaj")%> - <%=getXMLValue("title")%>
HOTEL RESTAURANT
MANORA
NEREZINE MALI LOŠINJ
CROATIA
Book now Powered by Booking.com


Kroatien Urlaub

<%=getXMLValue("privatni_smjestaj")%>

<%=GetMsg("Location")%>
<%=GetMsg("Accomodation")%>
<%=GetMsg("PersonNumber")%>
 



" onClick="javascript:document.getElementById('task').value='new_search';adminForm.submit();"/>

<% For i = 1 To iPageSize If rsObjekti.EOF Then Exit For %>

<% sSQL = "SELECT * FROM Images WHERE ApartmentID=" & Clng(rsObjekti("ApartmentID")) & " ORDER BY ImageName" Set rsImages = GetRecordset(sSQL) If Not rsImages.EOF then rsImages.MoveFirst if rsImages("ImagePath") <> "" then%> '">" width="170" height="118" /> <%else%> <%End if else %> <% End if %> <% sSQL = "SELECT * FROM Type Where TypeID =" & Clng(rsObjekti("TypeID")) & ";" Set rsDetails = GetRecordset(sSQL) rsDetails.MoveFirst sSQL = "SELECT * FROM Category Where CategoryID =" & Clng(rsObjekti("CategoryID")) & ";" Set rsDetails1 = GetRecordset(sSQL) rsDetails.MoveFirst %>
<%=GetMsg(rsDetails("TypeName"))%> <%=rsObjekti.Fields("ApartmentName")%> (<%=rsDetails1("CategoryName")%>) <% sSQL = "SELECT Stars FROM Apartments Where ApartmentID =" & Clng(rsObjekti("ApartmentID")) & ";" Set rsDetails = GetRecordset(sSQL) rsDetails.MoveFirst %> <% for o=1 to rsDetails("Stars") Response.Write("*") next %> <% sSQL = "SELECT * FROM Locations Where LocationID =" & Clng(rsObjekti("LocationID")) & ";" Set rsDetails = GetRecordset(sSQL) rsDetails.MoveFirst %> - <%=rsDetails("LocationName")%>
<%=GetMsg("Capacity")%>: <%=rsDetails1("Rooms")%> / <%=rsDetails1("PersonNum")%>
<% sSQL = "SELECT min(AccCjenik.Cijena) as Cijena FROM AccCjenik WHERE AccCjenik.ApartmentID = " & rsObjekti("ApartmentID") & ";" Set rsDetails = GetRecordset(sSQL) rsDetails.MoveFirst %> <%=GetMsg("PriceFrom")%>:  <%=rsDetails("Cijena")%> €

" onclick="document.location='acc_details.asp?appID=<%= rsObjekti("ApartmentID") %>'"/> " onClick="javascript:window.open('AccLocationMap.asp?ID=<%=rsObjekti("ApartmentID")%>','','directories=0,location=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0')"/>

<% rsObjekti.MoveNext() next %>
<% limit = iPageSize if absPage > 1 then Response.Write "<< " & getXMLValue("previous") & "    " end if minPage = 1 maxPage = abspage-1 + limit if maxPage > pagecnt then maxPage = pagecnt if abspage - limit > 1 then minPage = abspage - limit for i = minPage to maxPage if i=abspage then response.Write("" & i & "") & " " else Response.Write "" & i & " " end if next If abspage < pagecnt Then Response.Write "   " & getXMLValue("next") & " >>" end if %>

" />