<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>IT Business  - Top stories</title>
<description>Recent stories  </description> 
<link>http://www.itbusiness.ca/</link>

<%
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML

  Dim objRegExp, strOutput
  Set objRegExp = New Regexp

  objRegExp.IgnoreCase = True
  objRegExp.Global = True
  objRegExp.Pattern = "<(.|\n)+?>"

  'Replace all HTML tag matches with the empty string
  strOutput = objRegExp.Replace(strHTML, "")
  
  'Replace all < and > with &lt; and &gt;
  'strOutput = Replace(strOutput, "<", "&lt;")
  'strOutput = Replace(strOutput, ">", "&gt;")
  
  stripHTML = strOutput    'Return the value of strOutput

  Set objRegExp = Nothing
End Function



            Dim Publication
            Dim Publication_cmd
            Dim Publication_numRows 
            Set Publication_cmd = Server.CreateObject ("ADODB.Command")
            Publication_cmd.ActiveConnection = "Driver={SQL Native Client};Server=localhost;Database=itbusiness;Uid=itbusiness;Pwd=lkh_v284;"  
			' connection name
			's_Conn = "Driver={SQL Native Client};Server=localhost;Database=itbusiness;Uid=itbusiness;Pwd=lkh_v284;"
			Publication_cmd.CommandText = "SELECT TOP 20 nwNews.id_News, nwNews.titre, nwNews.SousTitre,  " &_
			" nwNews.datePosting, nwNews.activation, nwNews.bOnline, nwNews.etat, nwAuteur.prenom, nwAuteur.nom, nwNews.idLangue " &_
			"FROM nwNews INNER JOIN " &_
			"nwAuteur ON nwNews.idAuteur = nwAuteur.id_Auteur " &_ 
			"AND nwNews.activation <= getdate()" &_
			"AND nwNews.bOnline = 1 " &_
			"AND nwNews.etat = 1 " &_
			"AND nwNews.idLangue = 2 " &_
			"ORDER BY nwNews.datePosting DESC"
            Publication_cmd.Prepared = true     

          Set Publication = Publication_cmd.Execute
         Publication_numRows = 0
 
 %>

<%	   
 
		   do while (NOT Publication.EOF)
		   
		      	response.Write("<item>")
		   		response.Write("<title><![CDATA["& Publication(1) &"]]></title>")
				response.Write("<link> http://www.itbusiness.ca/it/client/en/home/News.asp?id="& Publication(0) &"</link>")
				response.Write("<description><![CDATA["& stripHtml(Publication(2)) &"]]></description>")
				response.Write("<pubDate>"& Publication(3) &"</pubDate>")
				response.Write("<author><![CDATA["& Publication(7) &" "& Publication(8) &"]]></author>")
				response.Write("</item>")
			
				Publication.movenext
		   loop

            if  NOT(Publication.EOF or Publication.BOF) then	

        
					 
					 
           
            end if
            Publication.Close() 
            Set Publication = Nothing
 %>
</channel>
</rss>
