<% 'Chache ausschalten (abgeschwächt) Response.Expires = 1 regionid = request("Regionid") ortid = request("Ortid") brid = request("Brid") akt_pg = request("Page") if isnull(akt_pg) or akt_pg="" then akt_pg = 1 else akt_pg = int(akt_pg) end if set conn = Server.CreateObject("ADODB.Connection") set rs = Server.CreateObject("ADODB.RecordSet") intdat = get_neudat() 'intdat = 200010 pg_size = 20 sql_reg = "Select Region, R_Text_Neu, R_Titel, Img_Map_Neu from Region where ID=" & regionid if brid = "0" then sql_sparten = "Select 'Keine' as Branche, Sparte.ID, Sparte, Standort.ID, Standort, count(*), (Select count(*) from Internet, Ortzuord, ZuordKundeSparte ZKS_1 where Internet.ID=Ortzuord.Kunden_ID and Ortzuord.Standort_ID=Standort.ID and Ortzuord.Kunden_ID=ZKS_1.Kunden_ID and ZKS_1.Sparte_ID=Sparte.ID and Vorschau=0 and Aktiv=-1 and Deldatum>=" & intdat & ") from Sparte, ZuordKundeSparte ZKS, Internet, Ortzuord OZ, Standort where Sparte.ID=ZKS.Sparte_ID and ZKS.Kunden_ID=Internet.ID and Internet.ID=OZ.Kunden_ID and Standort_ID=Standort.ID and Standort.ID=" & ortid & " and Vorschau=0 and Aktiv=-1 group by Sparte.ID, Sparte, Standort.ID, Standort order by Sparte" sql_neu_kunden = "Select Sparte.ID, OZ.Kunden_ID, Title, Domain, Deldatum, Eintrag from Internet, Sparte, ZuordKundeSparte ZKS, Ortzuord OZ where Internet.ID=ZKS.Kunden_ID and ZKS.Kunden_ID=OZ.Kunden_ID and Sparte.ID=ZKS.Sparte_ID and OZ.Standort_ID=" & ortid & " and Vorschau=0 and Aktiv=-1 and Deldatum>=" & intdat & " and Sparte.ID in (#spidlist) order by Sparte, Deldatum desc, Title" elseif brid = "17" then sql_sparten = "Select Branche, Sparte.ID, Sparte, Standort.ID, Standort, count(*), (Select count(*) from Internet, Ortzuord, ZuordKundeSparte ZKS_1 where Internet.ID=Ortzuord.Kunden_ID and Ortzuord.Standort_ID=Standort.ID and Ortzuord.Kunden_ID=ZKS_1.Kunden_ID and ZKS_1.Sparte_ID=Sparte.ID and Vorschau=0 and Aktiv=-1 and Onlineshop=-1 and Deldatum>=" & intdat & ") from Branche, ZuordBrancheSparte ZBS, Sparte, ZuordKundeSparte ZKS, Internet, Ortzuord OZ, Standort where Branche.ID=ZBS.Branche_ID and ZBS.Sparte_ID=Sparte.ID and Sparte.ID=ZKS.Sparte_ID and ZKS.Kunden_ID=Internet.ID and Internet.ID=OZ.Kunden_ID and Standort_ID=Standort.ID and Standort.ID=" & ortid & " and Branche.ID=" & brid & " and Vorschau=0 and Aktiv=-1 and Onlineshop=-1 group by Branche, Sparte.ID, Sparte, Standort.ID, Standort order by Sparte" sql_neu_kunden = "Select Sparte.ID, OZ.Kunden_ID, Title, Domain, Deldatum, Eintrag from Internet, Sparte, ZuordBrancheSparte ZBS, ZuordKundeSparte ZKS, Ortzuord OZ where ZBS.Branche_ID="&brid&" and ZBS.Sparte_ID=Sparte.ID and Sparte.ID=ZKS.Sparte_ID and ZKS.Kunden_ID=OZ.Kunden_ID and OZ.Standort_ID=" & ortid & " and OZ.Kunden_ID=Internet.ID and Vorschau=0 and Aktiv=-1 and Onlineshop=-1 and Deldatum>=" & intdat & " and Sparte.ID in (#spidlist) order by Sparte, Deldatum desc, Title" else sql_sparten = "Select Branche, Sparte.ID, Sparte, Standort.ID, Standort, count(*), (Select count(*) from Internet, Ortzuord, ZuordKundeSparte ZKS_1 where Internet.ID=Ortzuord.Kunden_ID and Ortzuord.Standort_ID=Standort.ID and Ortzuord.Kunden_ID=ZKS_1.Kunden_ID and ZKS_1.Sparte_ID=Sparte.ID and Vorschau=0 and Aktiv=-1 and Deldatum>=" & intdat & ") from Branche, ZuordBrancheSparte ZBS, Sparte, ZuordKundeSparte ZKS, Internet, Ortzuord OZ, Standort where Branche.ID=ZBS.Branche_ID and ZBS.Sparte_ID=Sparte.ID and Sparte.ID=ZKS.Sparte_ID and ZKS.Kunden_ID=Internet.ID and Internet.ID=OZ.Kunden_ID and Standort_ID=Standort.ID and Standort.ID=" & ortid & " and Branche.ID=" & brid & " and Vorschau=0 and Aktiv=-1 group by Branche, Sparte.ID, Sparte, Standort.ID, Standort order by Sparte" sql_neu_kunden = "Select Sparte.ID, OZ.Kunden_ID, Title, Domain, Deldatum, Eintrag from Internet, Sparte, ZuordBrancheSparte ZBS, ZuordKundeSparte ZKS, Ortzuord OZ where ZBS.Branche_ID="&brid&" and ZBS.Sparte_ID=Sparte.ID and Sparte.ID=ZKS.Sparte_ID and ZKS.Kunden_ID=OZ.Kunden_ID and OZ.Standort_ID=" & ortid & " and OZ.Kunden_ID=Internet.ID and Vorschau=0 and Aktiv=-1 and Deldatum>=" & intdat & " and Sparte.ID in (#spidlist) order by Sparte, Deldatum desc, Title" end if conn.open("admin") rs.open sql_reg, conn, 3 if not rs.EOF then region = rs("Region") r_text = rs("R_Text_Neu") r_titel = rs("R_Titel") r_map = rs("Img_Map_Neu") end if rs.close rs.open sql_sparten, conn, 3 if not rs.EOF then br_txt = rs("Branche") ort_txt = rs("Standort") 'sp_array = rs.GetRows() 'sp_anz = rs.RecordCount-1 sp_anz = rs.RecordCount rs.move (akt_pg-1)*pg_size bookm = rs.Bookmark sp_array = rs.getRows(pg_size,bookm) pg_anz = get_Pageanz(sp_anz,pg_size) list_anz = ubound(sp_array,2) else sp_anz = 0 pg_anz = 0 list_anz = -1 end if rs.close 'Blättern: Bug behoben: Sparten_ID_List für "in"-Klausel aufbauen für Empfehlungen entsprechend mittlerer Selection UND Page!!!! for i=0 to list_anz spidlist = spidlist & sp_array(1,i) & "," next if not spidlist = "" then spidlist = left(spidlist,len(spidlist)-1) sql_neu_kunden = replace(sql_neu_kunden,"#spidlist",spidlist) rs.open sql_neu_kunden, conn, 3 if not rs.EOF then ku_array = rs.getRows() ku_anz = rs.RecordCount-1 else ku_anz = -1 end if rs.close set rs = nothing conn.close set conn = nothing if brid="0" then path_ort = ort_txt else path_ort = "" & ort_txt & " > " & br_txt end if str_query = "Regionid=" & regionid & "&Ortid=" & ortid & "&Brid=" & brid str_counter_query = "&" & str_query & "&Spid=0" %> cco.de - Ihr regionaler Marktplatz
Marktplatzwechsel <%=r_titel%>
  go!
  Branchenfinder
  Schnäppchen
  Highlights
  Profi-Tipps
  Online-Shopping
  Autobörse
  Reisewelt
  Kostenlos
  Gewinnspiele
  Branchen-News
  XXL-Power-Anfrage
  Profisuche
  Newsletter Abo
  cco.de and more
  Profi Homepages
  Promotion in cco.de
  Company
  Karriere bei cco.de
  Kontakt
  Wählen Sie die gewünschte Stadt aus:
  <%=r_map%>
  Regio-Finder
  <% for i=0 to list_anz response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" next if list_anz>9 and pg_anz>1 then %> <% end if %>
<% response.write "" & r_text & " > " response.write "Orte > " response.write path_ort %>
Branchen: <% strpages = "" strlink = "sp_list.asp?Regionid=" & regionid & "&Ortid=" & ortid & "&Brid=" & brid for page=1 to pg_anz pg_first = (page-1) * pg_size + 1 pg_last = pg_first + pg_size - 1 if pg_last>sp_anz then pg_last = sp_anz strout = "[" & pg_first & "-" & pg_last & "]" if page=akt_pg then strpages = strpages & " " & strout & " " 'response.write " " & strout & " " else strpages = strpages & " " & strout & " " 'response.write " " & strout & " " end if next response.write strpages %>
 " & sp_array(2,i) & " (" & sp_array(5,i) & ")
Branchen:<%=strpages%>
<% start = 0 for i=0 to list_anz if sp_array(6,i) > 0 then k_index = get_RND_Index(start,sp_array(6,i)) start = start + sp_array(6,i) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) end if next %>
  Empfehlungen:
" & sp_array(2,i) & "
 " & ku_array(5,k_index) & "
<% function get_neudat() mon = month(date) if mon < 10 then mon = "0" & mon jahr = year(date) get_neudat = int(jahr&mon) end function function get_Pageanz(byVal records,byVal div) rest = records mod div get_Pageanz = int(records/div)+abs(rest>0) end function function get_RND_Index(byVal min,byVal margin) randomize(time) get_RND_Index = min + int(margin*rnd()) end function %>