<% 'Chache ausschalten (abgeschwächt) Response.Expires = 1 regionid = request("Regionid") if isnull(regionid) or regionid="" or regionid="3" then regionid="3" reg_where = "" reg_from = "" else reg_where = " KRZ.Eintrag_ID=Eintrag.ID and KRZ.Region_ID=" & regionid & " and" reg_from = ", Kost_Reg_Zuord KRZ" 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 'init Vars and Constants heute = date heute_2 = left(cstr(heute),6) & right(year(heute),2) heute_4 = left(cstr(heute),6) & year(heute) Const pg_size = 20 Const mpid = 5 '=========================================== 'set the Group by Sparte (or not) sp_group = false '=========================================== set admin = Server.CreateObject("ADODB.Connection") set markt = Server.CreateObject("ADODB.Connection") set rs_a = Server.CreateObject("ADODB.RecordSet") set rs_m = Server.CreateObject("ADODB.RecordSet") sql_reg = "Select Region, R_Text_Neu, R_Titel from Region where ID=" & regionid sql_branchen = "Select ID, Branche from Branche order by Sort" sql_ang_all = "Select Eintrag.ID, Beginn_Datum, ABS(Beginn_Datum>Date()-5) as IsNew, HP_Img, EKunden_ID, Inhalt from Internet, Eintrag, Detail" & reg_from & " where" & reg_where & " Internet.ID=EKunden_ID and Eintrag.ID=Detail.Eintrag_ID and Aktiv=-1 and Vorschau=0 and Online=-1 and Bann=0 and Date() between Beginn_Datum and Ende_Datum and Feld_ID=1 and not Inhalt='' and Marktplatz_ID=" & mpid & " order by Beginn_Datum desc, Detail.Eintrag_ID, Feld_ID" sql_ang_dtip = "Select Eintrag.ID, Beginn_Datum, HP_Img, EKunden_ID, Inhalt, Title, Breite, Hoehe from Internet, Eintrag, Detail, Kost_Reg_Zuord KRZ, Format where KRZ.Region_ID=" & regionid & " and KRZ.Eintrag_ID=Eintrag.ID and Internet.ID=EKunden_ID and Eintrag.ID=Detail.Eintrag_ID and Eintrag.Format_ID=Format.ID and Aktiv=-1 and Vorschau=0 and Online=-1 and Bann=0 and Date() between Beginn_Datum and Ende_Datum and (Feld_ID=1 or Feld_ID=2) and (Tagestipp like '%" & heute_2 & "%' or Tagestipp like '%" & heute_4 & "%') and Marktplatz_ID=" & mpid & " order by Detail.Eintrag_ID, Feld_ID" 'response.write sql_ang_all & "
" 'response.write sql_ang_dtip & "
" admin.open("admin") markt.open("kostenlos") rs_a.open sql_reg, admin, 3 if not rs_a.EOF then region = rs_a("Region") r_text = rs_a("R_Text_Neu") r_titel = rs_a("R_Titel") end if rs_a.close rs_a.open sql_branchen, admin, 3 br_array = rs_a.getRows() br_anz = rs_a.Recordcount-1 rs_a.close admin.close rs_m.open sql_ang_all, markt, 3 if not rs_m.EOF then ang_anz = rs_m.RecordCount rs_m.move (akt_pg-1)*pg_size bookm = rs_m.Bookmark ang_array = rs_m.getRows(pg_size,bookm) pg_anz = get_Pageanz(ang_anz,pg_size) list_anz = ubound(ang_array,2) else anz_anz = 0 pg_anz = 0 list_anz = -1 end if rs_m.close rs_m.open sql_ang_dtip, markt, 3 if not rs_m.EOF then dtip_array = rs_m.getRows() dtip_anz = rs_m.RecordCount/2 dtip = 2 * get_RND_Index(0,dtip_anz) dtip_eid = dtip_array(0,dtip) else dtip_anz = -1 dtip_eid = 0 end if rs_m.close 'avoid reading the Day-Tip again sql_ang_hp_1 = "Select Eintrag.ID, Beginn_Datum, ZBS.Branche_ID, Branche, HP_Img, EKunden_ID, Inhalt, Title, Feld_ID, ZES.Sparte_ID, Breite, Hoehe from Internet, Eintrag, ZuordEintragSparte ZES, ZuordBrancheSparte ZBS, Branche, Detail, Kost_Reg_Zuord KRZ, Format where KRZ.Region_ID=" & regionid & " and KRZ.Eintrag_ID=Eintrag.ID and Homepage=-1 and Internet.ID=EKunden_ID and Eintrag.ID=ZES.Eintrag_ID and ZES.Sparte_ID=ZBS.Sparte_ID and ZBS.Branche_ID=Branche.ID and Eintrag.ID=Detail.Eintrag_ID and Eintrag.Format_ID=Format.ID and Aktiv=-1 and Vorschau=0 and Online=-1 and Bann=0 and Date() between Beginn_Datum and Ende_Datum and (Feld_ID=1 or Feld_ID=2) and Marktplatz_ID=" & mpid & " and not Branche.ID=17 and not Eintrag.ID=" & dtip_eid sql_ang_hp_2 = "Select Eintrag.ID, Beginn_Datum, ZBS.Branche_ID, Branche, HP_Img, EKunden_ID, Inhalt, Title, Feld_ID, ZES.Sparte_ID, Breite, Hoehe from Internet, Eintrag, ZuordEintragSparte ZES, ZuordBrancheSparte ZBS, Branche, Detail, Kost_Reg_Zuord KRZ, Format where KRZ.Region_ID=" & regionid & " and KRZ.Eintrag_ID=Eintrag.ID and Homepage=-1 and Internet.ID=EKunden_ID and Eintrag.ID=ZES.Eintrag_ID and ZES.Sparte_ID=ZBS.Sparte_ID and ZBS.Branche_ID=Branche.ID and Eintrag.ID=Detail.Eintrag_ID and Eintrag.Format_ID=Format.ID and Aktiv=-1 and Vorschau=0 and Online=-1 and Bann=0 and Date() between Beginn_Datum and Ende_Datum and (Feld_ID=1 or Feld_ID=2) and Marktplatz_ID=" & mpid & " and Branche.ID=17 and not Eintrag.ID=" & dtip_eid sql_ang_hp = sql_ang_hp_1 & " Union " & sql_ang_hp_2 & " order by ZBS.Branche_ID, ZES.Sparte_ID, Eintrag.ID, Feld_ID" sql_aus_gr_1 = "Select Branche.ID, Branche, count(*) from Internet, Branche, ZuordBrancheSparte ZBS, ZuordEintragSparte ZES, Eintrag, Kost_Reg_Zuord KRZ where Internet.ID=EKunden_ID and Branche.ID=ZBS.Branche_ID and ZBS.Sparte_ID=ZES.Sparte_ID and ZES.Eintrag_ID=Eintrag.ID and Eintrag.ID=KRZ.Eintrag_ID and KRZ.Region_ID=" & regionid & " and Homepage=-1 and Aktiv=-1 and Vorschau=0 and Online=-1 and Bann=0 and Date() between Beginn_Datum and Ende_Datum and Marktplatz_ID=" & mpid & " and not Branche.ID=17 and not Eintrag.ID=" & dtip_eid & " group by Branche.ID, Branche" sql_aus_gr_2 = "Select Branche.ID, Branche, count(*) from Internet, Branche, ZuordBrancheSparte ZBS, ZuordEintragSparte ZES, Eintrag, Kost_Reg_Zuord KRZ where Internet.ID=EKunden_ID and Branche.ID=ZBS.Branche_ID and ZBS.Sparte_ID=ZES.Sparte_ID and ZES.Eintrag_ID=Eintrag.ID and Eintrag.ID=KRZ.Eintrag_ID and KRZ.Region_ID=" & regionid & " and Homepage=-1 and Aktiv=-1 and Vorschau=0 and Online=-1 and Bann=0 and Date() between Beginn_Datum and Ende_Datum and Marktplatz_ID=" & mpid & " and Branche.ID=17 and Onlineshop=-1 and not Eintrag.ID=" & dtip_eid & " group by Branche.ID, Branche" sql_aus_gr = sql_aus_gr_1 & " Union " & sql_aus_gr_2 & " order by Branche.ID" 'response.write sql_ang_hp & "
" 'response.write sql_aus_gr & "
" rs_m.open sql_ang_hp, markt, 3 if not rs_m.EOF then hp_anz = rs_m.RecordCount/2 hp_array = rs_m.getRows() else hp_anz = -1 end if rs_m.close rs_m.open sql_aus_gr, markt, 3 if not rs_m.EOF then aus_anz = rs_m.Recordcount-1 aus_array = rs_m.getRows() else aus_anz = -1 end if rs_m.close markt.close set rs_a = nothing set rs_m = nothing set admin = nothing set markt = nothing %> cco.de - Ihr regionaler Marktplatz
Marktplatzwechsel <%=r_titel%>
  go!
  Branchenfinder
  Regiofinder
  Schnäppchen
  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
  Highlight des Tages (<%=r_text%>)
  <% if dtip_anz>-1 then response.write "" & chr(13) hp_bild = not(dtip_array(2,dtip) = "" or isnull(dtip_array(2,dtip)) or dtip_array(2,dtip)="blind.gif") len_txt = 150 if hp_bild then response.write "" response.write "" & chr(13) len_txt = 100 end if response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) else response.write "" & chr(13) response.write "" response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) end if %>
" & dtip_array(5,dtip) & " präsentiert:
" & konv_Text(dtip_array(4,dtip),"Titel",40,false) & "
" & konv_Text(dtip_array(4,dtip+1),"Text",len_txt,false) & "
Hier könnte Ihre Werbung stehen!

Nehmen Sie mit uns Kontakt auf!
weiter...
  Highlights-Navigator (<%=r_text%>)
  <% if sp_group then br_link = "sp_liste.asp?Regionid=" & regionid & "&Brid=" else br_link = "mp_liste.asp?Regionid=" & regionid & "&Spid=0&Brid=" end if for i=0 to 5 response.write "" & chr(13) for j=0 to 2 br_index = 3*i+j response.write "" & chr(13) next response.write "" & chr(13) response.write "" & chr(13) next %>
A L L E     B R A N C H E N
" & br_array(1,br_index) & "
  <%=r_text%> > Highlights aus allen Branchen (<%=ang_anz%>)
  Einträge: <% str_page = "einstieg.asp?Regionid=" & regionid & "&Page=" for page=1 to pg_anz pg_first = (page-1) * pg_size + 1 pg_last = pg_first + pg_size - 1 if pg_last > ang_anz then pg_last = ang_anz strout = "[" & pg_first & "-" & pg_last & "]" if page=akt_pg then response.write " " & strout & " " else response.write " " & strout & " " end if next %>
  <% for i=0 to list_anz response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) next %>
Highlights:
" & konv_Text(ang_array(5,i),"Titel",60,false) & "
<% start = 0 for i=0 to aus_anz response.write "" & chr(13) response.write "" & chr(13) response.write "" & chr(13) ang_idx = 2 * get_RND_Index(start,aus_array(2,i)) response.write "" & chr(13) response.write "" response.write "" & chr(13) response.write "" & chr(13) hp_bild = not(hp_array(4,ang_idx) = "" or isnull(hp_array(4,ang_idx)) or hp_array(4,ang_idx)="blind.gif") if hp_bild then response.write "" & chr(13) end if response.write "" & chr(13) start = start + aus_array(2,i) next %>
 " & aus_array(1,i) & "
" & konv_Text(hp_array(6,ang_idx),"Titel",35,false) & "
 " & konv_Text(hp_array(6,ang_idx+1),"Text",100,false) & "
 
<% function get_RND_Index(byVal min,byVal margin) randomize(time) get_RND_Index = min + int(margin*rnd()) 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_ArrayIndex(byVal typeid) retidx = -1 for i=0 to type_anz if aus_array(0,i)=typeid then retidx = i exit for end if next get_ArrayIndex = retidx end function function konv_Text(newstext,feld,length,leer) if len(newstext)>0 then newstext = replace(newstext,"
"," ") newstext = replace(newstext,"&squot;","'") newstext = trim(newstext) end if newstext = eliminate_all_HTML(newstext) if len(newstext) > length then newstext = left(newstext,instrrev(newstext," ",length+1)) & "..." end if if not leer and (newstext = "..." or newstext = "" or len(newstext)=0) then newstext = "Kein " & feld konv_Text = newstext end function function eliminate_all_HTML(byVal parastr) nlength = len(parastr) out_buffer = "" for chridx=1 to nlength zeichen = mid(parastr,chridx,1) if not zeichen = "<" then 'append to result-String out_buffer = out_buffer & zeichen else 'jump to the end of html-Tag or to the end of String chridx = instr(chridx+1,parastr,">") if chridx = 0 then chridx = nlength end if next eliminate_all_HTML = out_buffer end function %>