home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2002 March / PCWMAR02.iso / software / windowsxp / ftgateoffice / ftgateoffice.exe / Main / extendedheaders.fts < prev    next >
Encoding:
Text File  |  2001-11-29  |  986 b   |  62 lines

  1. <%
  2. function date(folder, id)
  3. {
  4.     var message = new folder.message
  5.     message.id=id
  6.  
  7.     var ok = message.firsttext()
  8.     var line = message.text
  9.     while (ok&&(line!="\n"))
  10.     {
  11.         var test = line.touppercase()
  12.  
  13.         if (test.indexof("DATE:",0)==0)
  14.         {
  15.             var date = line.slice(6, line.length)
  16.  
  17.             var index = date.indexof("+", 0)
  18.  
  19.             if (index==-1)
  20.                 index = date.indexof("-", 0)
  21.  
  22.             if (index!=-1)
  23.                 date=date.slice(0,index)
  24.  
  25.             return date
  26.         }
  27.  
  28.         ok = message.nexttext()
  29.         line = message.text
  30.     }
  31.  
  32.     return ""
  33. }
  34.  
  35. function priority(line)
  36. {
  37.     var priority = 3
  38.  
  39.     line=string(line)
  40.     line.tolowercase()
  41.  
  42.     if (line.left(11)=="x-priority:")
  43.     {
  44.         line = line.slice(11, 999)
  45.         line = line.trim()
  46.  
  47.         priority = number(line)
  48.     }
  49.     else if if (line.left(18)=="x-msmail-priority:")
  50.     {
  51.         line = line.slice(18, 999)
  52.         line = line.trim()
  53.  
  54.         if (line.left(4)=="high")
  55.             priority = 1
  56.         else if (line.left(3)=="low")
  57.             priority = 5
  58.     }
  59.  
  60.     return priority
  61. }
  62. %>