home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / MakeCDF.cdx < prev    next >
Text File  |  1997-11-01  |  2KB  |  66 lines

  1. <% Option Explicit %>
  2. <% Response.Buffer = True %>
  3.  
  4. <% Dim strPushURL %>
  5. <% strPushURL = GetPrefixValue() %>
  6.  
  7. <!--#include file=../libGlobalFuncs.inc-->
  8.  
  9. <?XML version="1.0"?>
  10.  
  11. <CHANNEL HREF="<%=strPushURL%>/Welcome.asp">
  12.     
  13.     <TITLE>Exploration Air News</TITLE>
  14.     <ABSTRACT>The Latest Exploration Air News</ABSTRACT>
  15.     <LOGO HREF="<%=strPushURL%>/Images/ExairNews.gif" Style="IMAGE" />
  16.  
  17.     <SCHEDULE>
  18.         <INTERVALTIME HOUR="1" />
  19.     </SCHEDULE>
  20.  
  21.     <%
  22.         GetChannelItems
  23.         Response.Flush
  24.     %> 
  25.  
  26. </CHANNEL>
  27.  
  28. <%
  29.     ' GetChannelItems uses the FileSystem Object to access a file 
  30.     ' on the server which holds all the latest ExAir headlines. 
  31.     Sub GetChannelItems
  32.         On Error Resume Next
  33.         Dim fso, prFile, strTitle, strLink,strCategory
  34.         Dim CRLF, QUOTE
  35.  
  36.         CRLF = vbCr
  37.         QUOTE= Chr(34)
  38.  
  39.         Set fso = Server.CreateObject("Scripting.FileSystemObject")
  40.         Set prFile = fso.OpenTextFile(Server.MapPath("../pr/prFileList.txt"))
  41.         If Err.Number <> 0 Then
  42.             Exit Sub
  43.         End If
  44.         
  45.         Do Until prFile.AtEndOfStream
  46.             ' Get headline
  47.             strTitle = prFile.ReadLine
  48.             If prFile.AtEndOfStream Then Exit Do
  49.  
  50.             ' Get URL
  51.             strLink = "../pr/" & prFile.ReadLine
  52.  
  53.             ' Get Category 
  54.             strCategory = prFile.ReadLine 
  55.  
  56.             ' Write response
  57.             Response.Write("<ITEM HREF=" & QUOTE & strPushURL & "/" & strLink & QUOTE & ">" & CRLF)
  58.             Response.Write("  <TITLE>" & strTitle & "</TITLE>" & CRLF)
  59.             Response.Write("  <ABSTRACT>" & strCategory & " News: " & strTitle & "</ABSTRACT>" & CRLF)
  60.             Response.Write("</ITEM>" & CRLF)
  61.             Response.Write(CRLF)
  62.  
  63.         Loop
  64.     End Sub
  65. %>
  66.