% '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 if isnull(request("Brid")) or request("Brid")="" or request("Brid")="17" then brid = -1 else brid = clng(request("Brid")) end if akt_pg = request("Page") if isnull(akt_pg) or akt_pg = "" then akt_pg=1 else akt_pg=int(akt_pg) end if spid = request("Spid") intdat = get_neudat() sql_reg = "Select Region, R_Text_Neu, R_Titel from Region where ID=" & regionid sql_branchen = "Select Branche.ID, Branche, ABS(Branche.ID=17) from Branche order by Sort" 'Onlineshops Dummybranche if brid = -1 then 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=17 " & reg_where & " and Vorschau=0 and Aktiv=-1 and Onlineshop=-1 group by Sparte.ID, Sparte order by Sparte" sql_neu_kunden = "Select TOP 10 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 In(17," & brid &") " ®_where & " and Deldatum>=" & intdat & " 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 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 distinct top 10 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 &" " ®_where & " and Deldatum>=" & intdat & " order by Sparte, Deldatum desc, Title" end if 'response.write sql_neu_kunden set conn = Server.CreateObject("ADODB.Connection") set rs = Server.CreateObject("ADODB.RecordSet") conn.open("onlineshop") 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 'Neu: Seitenweise Navigation im Array (analog Recordset...): 'Vorteil: Recordset un Connection können geschlossen werden rs.open sql_sparten, conn, 3 if not rs.EOF then sp_anz = rs.RecordCount-1 pg_size = (abs(sp_anz > 59)+1)*20 pg_anz = get_Pageanz(sp_anz+1,pg_size) first = (akt_pg - 1) * pg_size last = first + pg_size - 1 if last > sp_anz then last = sp_anz sp_array = rs.getRows() else sp_anz = -1 pg_anz = -1 first = 0 last = -1 end if rs.close 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 ssql = "" ssql = ssql & "Select Shopglobal.Kunden_ID, Shopglobal.Waehrung_ID, Waehrung.Output, Shopglobal.Shop_Text, Internet.Domain, Internet.Verzeichnis, Internet.Title, Internet.Region_ID, Internet.Aktiv, Internet.Vorschau, (select count(*) from artikel where Kunden_ID=Internet.ID) AS AnzArtikel " ssql = ssql & "from Internet,Shopglobal,Waehrung " ssql = ssql & "where Internet.ID = Shopglobal.Kunden_ID " ssql = ssql & "and Internet.ID not in (961,1068,1076,1164) " ssql = ssql & "and Waehrung.ID=Shopglobal.Waehrung_ID " ssql = ssql & "and Internet.Aktiv=-1 " ssql = ssql & "and Internet.Vorschau=0 " ssql = ssql & "and (select count(*) from artikel where Kunden_ID=Internet.ID)>0 " ssql = ssql & "order by Shopglobal.Kunden_ID" rs.open ssql, conn, 3 if not rs.EOF then ashop_tt = rs.getRows lashop_tt = rs.RecordCount dtipp = get_RND_Index(0,lashop_tt) else lashop_tt = -1 end if rs.close if lashop_tt > -1 then ssql_tt = "" ssql_tt = ssql_tt & "SELECT Artikel.Kunden_ID, Artikel.ID, Artikel.ArtBez, Artikel.Info, Artikel.Preis, Artikel.Bild, Artikel.Upd_Datum, (select count(*) from HGAGArtZuord,Gruppenzuord,Hauptgruppe where Artikel_ID=Artikel.ID and Gruppenzuord_ID=Gruppenzuord.ID and Hauptgruppe_ID=Hauptgruppe.ID and Hauptgruppe.Online=-1) AS AnzGrp, Shopglobal.Waehrung_ID " ssql_tt = ssql_tt & "FROM Artikel, Internet, Shopglobal " ssql_tt = ssql_tt & "WHERE Artikel.Kunden_ID Not In (961,1068,1076,1164) " ssql_tt = ssql_tt & "and (select count(*) from HGAGArtZuord,Gruppenzuord,Hauptgruppe where Artikel_ID=Artikel.ID and Gruppenzuord_ID=Gruppenzuord.ID and Hauptgruppe_ID=Hauptgruppe.ID and Hauptgruppe.Online=-1) >0 " ssql_tt = ssql_tt & "and Internet.ID=" & ashop_tt(0,dtipp) & " " ssql_tt = ssql_tt & "AND Shopglobal.Kunden_ID=Internet.ID " ssql_tt = ssql_tt & "AND Internet.ID=Artikel.Kunden_ID " ssql_tt = ssql_tt & "AND Internet.Aktiv=-1 " ssql_tt = ssql_tt & "AND Internet.Vorschau=0 " ssql_tt = ssql_tt & "order by Artikel.Kunden_ID, Artikel.ID, Artikel.Upd_Datum DESC" rs.open ssql_tt, conn, 3 if not rs.EOF then aartikel_tt = rs.getRows laartikel_tt = rs.RecordCount idtipp = get_RND_Index(0,laartikel_tt) else laartikel_tt = -1 end if rs.close end if set rs = nothing conn.close set conn = nothing str_url = "einstieg.asp" str_query = "Regionid=" & regionid &"&Brid=" & brid & "&Spid=" & spid %>