%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <%'@LANGUAGE="VBSCRIPT" CODEPAGE="28592"%> <% start=Timer %> <% hua=UCase(request.ServerVariables("HTTP_USER_AGENT")) if instr(hua,"BOT")>0 or instr(hua,"CRAWL")>0 then if instr(hua,"GOOGLE")=0 and instr(hua,"NETSPRINT")=0 and instr(hua,"ONET")=0 then response.end end if end if %> <%' %> <%' %> <% conn.execute "set dateformat ymd" %> <% data_dzis=year(now)&"-" if month(now)<10 then data_dzis=data_dzis&"0" end if data_dzis = data_dzis&month(now)&"-" if day(now)<10 then data_dzis=data_dzis&"0" end if data_dzis=data_dzis&day(now) spoz=false if request.QueryString("miejscowosc")<>"" and request.QueryString("nazwa")="" then set objmi = server.CreateObject("adodb.recordset") objmi.open "select top 1 id_miejscowosci from v_miejscowosci_pokazuj_all where tm_nazwa2 like '%"&SQLRepl(request.QueryString("miejscowosc"))&"%' order by typ_pokazuj desc",conn,1,3 if objmi.recordcount > 0 then response.Redirect("nn.asp?p=4132,"&objmi("id_miejscowosci")&",2005-03-23" ) else blad = "Miejscowosc "&request.QueryString("miejscowosc")&" nie istnieje w bazie" end if end if subdomena=false if request.QueryString("p")="" then httphost = request.ServerVariables("HTTP_HOST") httphost = replace(httphost, "www.", "") httphost = replace(httphost, ".info1.pl", "") httphost = replace(httphost, "info1.pl", "") if httphost="tokio" then response.redirect "http://warszawa.restauracje.com.pl/ng.asp?p=38,8,4499,11" end if if httphost="nauboczu" and request.querystring("p")="" then subdomena=true konf_param="4612,18883,2005-10-18" ' response.end end if set objdom=server.CreateObject("adodb.recordset") objdom.open "select * from t_subdomeny where nazwa='"&httphost&"'",conn,1,3 if not objdom.eof then ' if isnull(objdom("resv1")) or objdom("resv1")<>1 then ' response.write "error" ' response.end ' end if subdomena=true if objdom("typ")=1 then konf_param="4132,"&objdom("id_typu")&","&data_dzis end if if objdom("typ")=2 then konf_param="4228,"&objdom("id_typu")&","&data_dzis end if if objdom("typ")=3 then konf_param="4356,"&objdom("id_typu")&","&data_dzis end if if objdom("typ")=11 then konf_param="4148,"&objdom("id_typu")&",1,"&data_dzis end if if objdom("typ")=9 then spoz=true konf_param="2068,"&objdom("id_typu")&",2005-03-23" end if end if if httphost="spa" then subdomena=true spoz=true konf_param="256,8" end if objdom.close end if sv_http_host = lcase(request.ServerVariables("HTTP_HOST")) if Left(sv_http_host,4) <> "www." and sv_http_host<> "informator.turystyka.wp.pl" then response.Redirect "http://www."&sv_http_host end if %> <% if 1=2 then %> <% if datediff("n",liczniki_refresh_csh_akt,now) > 60 then %> <%' %> <% end if %> <% if datediff("h",rotacja_refresh_csh_akt,now) > 23 then %> <% conn.execute "sp_rotuj" %> <%' %> <% end if %> <% end if %> <% const GT_ZLITERAMI=0 const GT_BEZLITER=1 const GT_NAZWA=0 const GT_LINK=1 const GT_SUBDOMENA=2 Function GenerujTabele(sqlq, nazwa, id, litery, ilekol) set objt=server.CreateObject("adodb.recordset") objt.open sqlq, conn,1,3 if objt.recordcount > 0 then ilelit=0 if litery=GT_ZLITERAMI then aktlit="" while not objt.eof if Ucase(Left(obJt(nazwa),1))<>aktlit then aktlit=Ucase(Left(obJt(nazwa),1)) ilelit=ilelit+1 end if objt.movenext wend objt.movefirst end if dim tab ilesuma=objt.recordcount+ilelit redim tab(ilesuma,5) aktlit="" wsk=0 aktkol=0 while not objt.eof if litery=GT_ZLITERAMI and aktlit<>Ucase(Left(objt(nazwa),1)) then aktlit=Ucase(Left(objt(nazwa),1)) tab(wsk, GT_NAZWA)=aktlit tab(wsk, GT_LINK)="" else tab(wsk, GT_NAZWA)=objt(nazwa) tab(wsk, GT_LINK)=objt(id) objt.movenext end if wsk=wsk+ilekol if wsk>=ilesuma then aktkol=aktkol+1 wsk=aktkol end if wend end if objt.close set objt=nothing GenerujTabele=tab End Function Function GenerujTabeleBold(sqlq, nazwa, id, bold, litery, ilekol) set objt=server.CreateObject("adodb.recordset") objt.open sqlq, conn,1,3 if objt.recordcount > 0 then ilelit=0 if litery=GT_ZLITERAMI then aktlit="" while not objt.eof if Ucase(Left(obJt(nazwa),1))<>aktlit then aktlit=Ucase(Left(obJt(nazwa),1)) ilelit=ilelit+1 end if objt.movenext wend objt.movefirst end if dim tab ilesuma=objt.recordcount+ilelit redim tab(ilesuma,5) aktlit="" wsk=0 aktkol=0 while not objt.eof if litery=GT_ZLITERAMI and aktlit<>Ucase(Left(objt(nazwa),1)) then aktlit=Ucase(Left(objt(nazwa),1)) tab(wsk, GT_NAZWA)=aktlit tab(wsk, GT_LINK)="" else if objt(bold)=6 then tab(wsk, GT_NAZWA)=""&objt(nazwa)&"" else tab(wsk, GT_NAZWA)=objt(nazwa) end if tab(wsk, GT_LINK)=objt(id) objt.movenext end if wsk=wsk+ilekol if wsk>=ilesuma then aktkol=aktkol+1 wsk=aktkol end if wend end if objt.close set objt=nothing GenerujTabeleBold=tab End Function Function GenerujTabeleSubdomeny(sqlq, nazwa, id, subdomena, litery, ilekol) set objt=server.CreateObject("adodb.recordset") objt.open sqlq, conn,1,3 if objt.recordcount > 0 then ilelit=0 if litery=GT_ZLITERAMI then aktlit="" while not objt.eof if Ucase(Left(obJt(nazwa),1))<>aktlit then aktlit=Ucase(Left(obJt(nazwa),1)) ilelit=ilelit+1 end if objt.movenext wend objt.movefirst end if dim tab ilesuma=objt.recordcount+ilelit redim tab(ilesuma,5) aktlit="" wsk=0 aktkol=0 while not objt.eof if litery=GT_ZLITERAMI and aktlit<>Ucase(Left(objt(nazwa),1)) then aktlit=Ucase(Left(objt(nazwa),1)) tab(wsk, GT_NAZWA)=aktlit tab(wsk, GT_LINK)="" tab(wsk, GT_SUBDOMENA)="" else tab(wsk, GT_NAZWA)=objt(nazwa) tab(wsk, GT_LINK)=objt(id) tab(wsk, GT_SUBDOMENA)=objt(subdomena) objt.movenext end if wsk=wsk+ilekol if wsk>=ilesuma then aktkol=aktkol+1 wsk=aktkol end if wend end if objt.close set objt=nothing GenerujTabeleSubdomeny=tab End Function %> <% Set rs = CreateObject("ADODB.RecordSet") if not subdomena then konf_param=request.QueryString("p") if IsEmpty(konf_param) then konf_param="0" end if end if Rozpakuj_parametry(konf_param) ' Weryfikacja subdomen - id_krainy, z wykrywaniem loopa if session("CRM")<>"OK" and session("wp")=0 and false then sv_http_host = lcase(request.ServerVariables("HTTP_HOST")) set objsub = server.CreateObject("adodb.recordset") objsub.open "select * from t_subdomeny where typ=2",conn,1,3 while not objsub.eof if id_krainy=objsub("id_typu") then if sv_http_host = "www."&lcase(objsub("nazwa"))&".info1.pl" then glowna_domena = false else if session("redirect_loop")=1 then session("redirect_loop")=0 response.redirect "http://www.info1.pl" end if session("redirect_loop")=1 if konf_param="" or konf_param="0" or konf_param="4228,"&objsub("id_typu")&","&data_dzis then response.Redirect "http://www."&objsub("nazwa")&".info1.pl" else response.Redirect "http://www."&objsub("nazwa")&".info1.pl?p="&konf_param end if end if end if objsub.movenext wend objsub.close end if session("redirect_loop")=0 if isnull(id_prezentacji) and typ_pokazuj=TP_ARTYKUL then typ_pokazuj=TP_LOKALIZACJA end if if isnull(data_od) then data_od=DateSerial(year(now),month(now),day(now)) data_do=data_do end if if typ_oferty=TO_PROMOCJE_WEEKENDOWE then data_od=DateAdd("d", (7-weekday(data_od,1)), data_od) end if if typ_oferty=TO_PROMOCJE_RODZINNE or typ_oferty=TO_WOLNE_MIEJSCA then data_od=DateAdd("d", (1-weekday(data_od,2)), data_od) data_do=DateAdd("d", 7, data_od) while datediff("d",now, data_od)<-7 data_od=DateAdd("d",7,data_od) data_do=DateAdd("d",7,data_do) wend end if session("noclegi_powrot")=request.QueryString("p") if request.QueryString("nazwa")<>"" then typ_pokazuj=TP_FOUND konf_param=null end if if typ_pokazuj=TP_FOUND then typ_pokazuj=TP_FOUND_ALL end if %> <% meta_title="" katimg = "info/" kolor_belek = "#E5F2F9" kolor_linii = "#D1DFEC" koliko = "niebieskie/" if id_regionu=TR_POBYT_ODCHUDZAJACY then katimg = "info/" koliko = "niebieskie/" kolor_belek = "#E5F2F9" meta_title="Pobyt odchudzający" end if if id_regionu=TR_ODNOWA then katimg = "spa/" koliko = "bezowe/" kolor_belek = "#efece7" meta_title="SPA, Odnowa biologiczna" end if if id_regionu=TR_ZIELONE_SZKOLY then katimg = "zieloneszkoly/" koliko = "zieloneinfo/" kolor_belek = "#FFF5E5" meta_title="Zielone szkoły" end if if id_regionu=TR_WSIODLE then katimg = "info/" koliko = "niebieskie/" kolor_belek = "#E5F2F9" meta_title="Wakacje w siodle" end if if id_regionu=TR_REHABILITACJA then katimg = "info/" koliko = "niebieskie/" kolor_belek = "#E5F2F9" meta_title="Rehabilitacja" end if if id_regionu=TR_KOLONIE then katimg = "zieloneszkoly/" koliko = "niebieskie/" kolor_belek = "#FFF5E5" meta_title="Kolonie" end if if meta_title="" then if id_regionu<=TR_ZABYTKI or isnull(id_regionu) then if not isnull(id_regionu) then select case id_regionu case 1: nag_lokal="Morze" case 2: nag_lokal="Nad jeziorem" case 3: nag_lokal="Góry" end select end if if not isnull(id_krainy) then nag_lokal=conn.execute("select nazwa from t_krainy where id_krainy="&id_krainy)(0) end if if not isnull(id_miasta) then nag_lokal=conn.execute("select tm_nazwa2 from t_miejscowosc where id_miejscowosci="&id_miasta)(0) end if end if meta_title="Noclegi w Polsce" if not isnull(id_krainy) then meta_title=conn.execute("select nazwa from t_krainy where id_krainy="&id_krainy)(0) meta_title=meta_title&" Noclegi" end if if not isnull(id_miasta) then meta_title=conn.execute("select tm_nazwa2 from t_miejscowosc where id_miejscowosci="&id_miasta)(0) miasto_narz=conn.execute("select tm_narzednik from t_miejscowosc where id_miejscowosci="&id_miasta)(0) if isnull(rodzaj_obiektu) and (id_atutu<>85 or isnull(id_atutu)) then meta_title=meta_title&" Noclegi" end if end if if not isnull(id_regionu) and id_regionu<4 then select case id_regionu case 1: meta_title="Morze" case 2: meta_title="Jeziora" case 3: meta_title="Góry" end select meta_title=meta_title&" Noclegi" end if select case rodzaj_obiektu case 1: print_rodzaj_obiektu = "Hotele" case 2: print_rodzaj_obiektu = "Motele" case 3: print_rodzaj_obiektu = "Pensjonaty" case 4: print_rodzaj_obiektu = "Ośrodki Wypoczynkowe" case 5: print_rodzaj_obiektu = "Kwatery" case 6: print_rodzaj_obiektu = "Schroniska" case 8: print_rodzaj_obiektu = "Kempingi" end select if id_atutu=85 then print_rodzaj_obiektu = "Domki" end if if not isnull(id_prezentacji) and typ_pokazuj<>TP_ARTYKUL then set objmt=server.CreateObject("adodb.recordset") objmt.open "select * from v_nowe_noclegi where id_noclegu="&id_prezentacji,conn,1,3 If objmt("tn_id_przedrostek")<>"" then print_nazwa = objmt("tp_nazwa")&" "&objmt("tn_nazwa") else print_nazwa = objmt("tn_nazwa") end if meta_title = print_nazwa end if if print_rodzaj_obiektu<>"" then if isnull(id_miasta) then meta_title=print_rodzaj_obiektu&" "&meta_title else if miasto_narz<>"" then meta_title=print_rodzaj_obiektu&" w "&miasto_narz&", "&meta_title&print_rodzaj_obiektu else meta_title=meta_title&" "&print_rodzaj_obiektu&" "&meta_title end if end if end if end if if request.querystring("epi")<>"" then PARTNER = request.querystring("epi") strURL = "http://www.imediagroup.pl/administracja/swl/remote/wywolaj.php?typ=6&dodqs=index.asp?epi=&server="&Request.ServerVariables("SERVER_NAME")&"&id="&PARTNER&"&code=2" Set objWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1") objWinHTTP.SetTimeouts 1500000, 1500000, 1500000, 1500000 objWinHttp.Open "GET", strURL objWinHttp.Send meta_title = objWinHttp.ResponseText Set objWinHttp = Nothing end if if request.querystring("fo")<>"" then FOUND = request.querystring("fo") if request.querystring("str")<>"" then STRONA = request.querystring("str") else STRONA = 1 end if end if session("redirect_loop")=0 wp_user_belka="turystykarestauracje" wp_pass_belka="dsadc3vy5bsd" %>
<% if request.querystring("partnerzy")=1 then %>
|
<% if session("wp")=1 then %> <% end if %> <% wykryj_kraine=null if not isnull(id_miasta) then set objkrai=server.CreateObject("adodb.recordset") response.write "" objkrai.open "select id_krainy from t_miejscowosci_krainy where id_miejscowosci="&id_miasta,conn,1,3 if not objkrai.eof then wykryj_kraine=objkrai("id_krainy") end if objkrai.close set objkrai=nothing end if ' if not isnull(wykryj_kraine) then ' wykryj_region=2 ' if wykryj_kraine>0 and wykryj_kraine<11 then ' wykryj_region=3 ' end if ' if wykryj_kraine>37 and wykryj_kraine<43 then ' wykryj_region=1 ' end if ' id_krainy=wykryj_kraine ' id_regionu=wykryj_region ' dummy_id_miasta=id_miasta ' id_miasta=null ' end if %> <% 'if not isnull(wykryj_kraine) then ' id_krainy=null ' id_regionu=null ' id_miasta=dummy_id_miasta 'end if %> <% if konf_param="0" then %> <% else %> <% end if %> |