% 'Chache ausschalten (abgeschwächt) Response.Expires = 1 regionid = request("Regionid") if isnull(regionid) or regionid="" or regionid="3" then regionid="3" reg_where = "" else reg_where = " and Region_ID=" & regionid end if 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 spidlist = "" sql_reg = "Select Region, R_Text_Neu, R_Titel from Region where ID=" & regionid sql_branchen = "Select Branche.ID, Branche, ABS(Branche.ID=" & brid & ") from Branche order by Sort" if brid = "17" then 'Onlineshops Dummybranche sql_sparten = "Select Sparte.ID, Sparte, count(*) AS Ges_Anzahl, (Select count(*) from Internet, ZuordKundeSparte ZKS_1 where Internet.ID=ZKS_1.Kunden_ID and ZKS_1.Sparte_ID=Sparte.ID and Vorschau=0 and Aktiv=-1 and Onlineshop=-1 and Deldatum>=" & intdat & reg_where & ") AS Neu_Anzahl from Sparte, ZuordBrancheSparte AS ZBS, ZuordKundeSparte AS ZKS, Internet where ZBS.Sparte_ID=Sparte.ID and Sparte.ID=ZKS.Sparte_ID and ZKS.Kunden_ID=Internet.ID and Branche_ID=" & brid & reg_where & " and Vorschau=0 and Aktiv=-1 and Onlineshop=-1 group by Sparte.ID, Sparte order by Sparte" sql_neu_kunden = "Select Sparte.ID, Sparte, Kunden_ID, Title, Domain, Deldatum, Eintrag from Internet, Sparte, ZuordBrancheSparte ZBS, ZuordKundeSparte ZKS where Sparte.ID=ZBS.Sparte_ID and ZBS.Sparte_ID=ZKS.Sparte_ID and ZKS.Kunden_ID=Internet.ID and Vorschau=0 and Aktiv=-1 and Onlineshop=-1 and ZBS.Branche_ID=" & brid & reg_where & " and Deldatum>=" & intdat & " and Sparte.ID in (#spidlist) order by Sparte, Deldatum desc, Title" else sql_sparten = "Select Sparte.ID, Sparte, count(*) AS Ges_Anzahl, (Select count(*) from Internet, ZuordKundeSparte ZKS_1 where Internet.ID=ZKS_1.Kunden_ID and ZKS_1.Sparte_ID=Sparte.ID and Vorschau=0 and Aktiv=-1 and Deldatum>=" & intdat & reg_where & ") AS Neu_Anzahl from Sparte, ZuordBrancheSparte AS ZBS, ZuordKundeSparte AS ZKS, Internet where ZBS.Sparte_ID=Sparte.ID and Sparte.ID=ZKS.Sparte_ID and ZKS.Kunden_ID=Internet.ID and Branche_ID=" & brid & reg_where & " and Vorschau=0 and Aktiv=-1 group by Sparte.ID, Sparte order by Sparte" sql_neu_kunden = "Select Sparte.ID, Sparte, Kunden_ID, Title, Domain, Deldatum, Eintrag from Internet, Sparte, ZuordBrancheSparte ZBS, ZuordKundeSparte ZKS where Sparte.ID=ZBS.Sparte_ID and ZBS.Sparte_ID=ZKS.Sparte_ID and ZKS.Kunden_ID=Internet.ID and Vorschau=0 and Aktiv=-1 and ZBS.Branche_ID=" & brid & reg_where & " 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") end if rs.close rs.open sql_branchen, conn, 3 if not rs.EOF then br_array = rs.getRows() br_anz = rs.RecordCount-1 else br_anz = -1 end if rs.close rs.open sql_sparten, conn, 3 if not rs.EOF then '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 list_anz = -1 pg_anz = 0 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(0,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 %>