<% set cn = Server.CreateObject("ADODB.Connection") set cnBook = Server.CreateObject("ADODB.Connection") set cnNews = Server.CreateObject("ADODB.Connection") cn.open sCDB_contenuti_admin cnBook.open sCDB_books_admin cnNews.open sCDB_news_admin iNumNewsChar = 250 iNumArticleChar = 400 iNumNewsToShow = 3 function ClearHTMLTags(strHTML, intWorkFlow) dim regEx, strTagLess strTagless = strHTML set regEx = New RegExp regEx.IgnoreCase = True regEx.Global = True if intWorkFlow <> 1 then regEx.Pattern = "<[^>]*>" strTagLess = regEx.Replace(strTagLess, "") end if if intWorkFlow > 0 and intWorkFlow < 3 then regEx.Pattern = "[<]" strTagLess = regEx.Replace(strTagLess, "<") regEx.Pattern = "[>]" strTagLess = regEx.Replace(strTagLess, ">") end if set regEx = nothing ClearHTMLTags = strTagLess end function function getALiveStone bFlag=true set rs = Server.CreateObject("ADODB.Recordset") sql = "SELECT MAX(id) AS MaxId FROM tArticoli WHERE sezione='PIETRE VIVE'" set rs = cn.execute(sql) iMaxId = rs("MaxId") rs.close set rs = nothing while bFlag set rs = Server.CreateObject("ADODB.Recordset") Randomize iRndId = int(Rnd * iMaxId) sql = "SELECT * FROM tArticoli WHERE sezione='PIETRE VIVE' AND id = " & iRndId set rs = cn.execute(sql) if not rs.eof then bFlag = false getALiveStone="
" & rs("titolo") & "

" & rs("contenuto") & "
" end if rs.close set rs = nothing wend end function function getLastMissionTodayArticle set rs = Server.CreateObject("ADODB.Recordset") sql = "SELECT * FROM tArticoli WHERE sezione='MISSIONE OGGI' ORDER BY id desc" set rs = cn.execute(sql) if not rs.eof then sTemp = "
" & rs("titolo") & "
" sTemp = sTemp & "
" & Left(ClearHTMLTags(rs("contenuto"),0),iNumArticleChar) & " [...]
" sTemp = sTemp & "
" getLastMissionTodayArticle= sTemp end if rs.close set rs = nothing end function function getSomeNews set rs = Server.CreateObject("ADODB.Recordset") sql = "SELECT TOP " & iNumNewsToShow & " * FROM tNews ORDER BY id desc" set rs = cnNews.execute(sql) sNewsTable = "
" while not rs.eof and not rs.bof sNewsTable = sNewsTable & "" sNewsTable = sNewsTable & "" sNewsTable = sNewsTable & "" sNewsTable = sNewsTable & "" rs.movenext wend sNewsTable = sNewsTable & "
" & "" & rs("titolo") & "
 
di " & rs("autore") & " [" & rs("regione") & "]
 
" & Left(ClearHTMLTags(rs("contenuto"),0),iNumNewsChar) & " [...]
 
" getSomeNews = sNewsTable rs.close set rs = nothing end function function getABook bFlag = true set rs = Server.CreateObject("ADODB.Recordset") sql = "SELECT MAX(id) AS MaxId FROM tBooks" set rs = cnBook.execute(sql) iMaxId = rs("MaxId") rs.close set rs = nothing while bFlag set rs = Server.CreateObject("ADODB.Recordset") Randomize iRndId = int(Rnd * iMaxId) sql = "SELECT * FROM tBooks WHERE id=" & iRndId set rs = cnBook.execute(sql) if not rs.eof then bFlag = false sBookData = "" sBookData = sBookData & "" sBookData = sBookData & "" sBookData = sBookData & "" sBookData = sBookData & "
Autore:
" & "
"& rs("autore") & "
Titolo:
"& "
" & rs("titolo") & "
Editrice:
" & "
" & rs("editrice") & "
Anno:
" & "
" & rs("anno") & "
Altro:
" & "
" & rs("pagine") & "
" sBookPicture = "" sBookTable = "
" sBookTable = sBookTable & "
" & sBookPicture & " " & sBookData & "
" getABook = sBookTable end if rs.close set rs = nothing wend end function %> Consolata.org - Sito Ufficiale dei Missionari della Consolata
 
 
 
     

 

<% response.Write(getALiveStone) %>
 

 

 

 

 

 

 

 
 
 

Il Beato Giuseppe Allamano, loro Fondatore risponderebbe così:

1. Sono una famiglia di persone, sacerdoti e laici, che si impegnano a portare il vangelo nel mondo. Ma anzitutto, non una organizzazione, un Istituto, un Collegio, bensì una famiglia. Le difficoltà che incontra chi si impegna per il vangelo e per l'aiuto dei fratelli nelle situazioni più difficili, di frontiera, richiedono che egli abbia dei fratelli che lo aiutano, lo sostengono, lo incoraggiano.

   
       
 
 
  <% response.Write(getSomeNews) %>    
       
 
 
  <% Response.Write(getLastMissionTodayArticle) %>    
       
 
 
  <% response.Write(getABook) %>    
       
 




Consolata.org
Consolata.net

 


 





<% stringaConnessioneDb = "driver={Microsoft Access Driver (*.mdb)};dbq=" & Server.MapPath("aggio.mdb") nAggiornamenti = 5 set conn = Server.CreateObject("ADODB.Connection") conn.Open stringaConnessioneDb set rs = Server.CreateObject("ADODB.Recordset") query = "SELECT DISTINCT TOP " & nAggiornamenti & " * FROM aggiornamenti ORDER BY id DESC" set rs = conn.execute(query) i = -1 while not rs.eof %><%=rs("titolo")%>
" class="testoarticolo"><%=rs("descrizione")%>



<% rs.movenext wend set rs = nothing %>

 

     
© Missionari della Consolata 1999-<%=year(now)%>
  Credits
  Ultimo Aggiornamento: 15-novembre-2005
<% cn.close cnBook.close cnNews.close set cn = nothing set cnBook = nothing set cnNews = nothing %>