[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/date/theme/ -> date-valarm.tpl.php (source)

   1  <?php
   2  /**
   3   * $alarm
   4   *   An array with the following information about each alarm:
   5   *
   6   *   $alarm['action'] - the action to take, either 'DISPLAY' or 'EMAIL'
   7   *   $alarm['trigger'] - the time period for the trigger, like -P2D.
   8   *   $alarm['repeat'] - the number of times to repeat the alarm.
   9   *   $alarm['duration'] - the time period between repeated alarms, like P1D.
  10   *   $alarm['description'] - the description of the alarm.
  11   *
  12   *   An email alarm should have two additional parts:
  13   *   $alarm['email'] - a comma-separated list of email recipients.
  14   *   $alarm['summary'] - the subject of the alarm email.
  15   *
  16   * If you are editing this file, remember that all output lines generated by it
  17   * must end with DOS-style \r\n line endings, and not Unix-style \n, in order to
  18   * comply with the iCal spec: http://tools.ietf.org/html/rfc5545#section-3.1.
  19   **/
  20  
  21  print "BEGIN:VALARM\r\n";
  22  print "ACTION:" . $alarm['action']  . "\r\n";
  23  if (!empty($alarm['trigger'])):
  24    print "TRIGGER:" . $alarm['trigger']  . "\r\n";
  25  endif;
  26  if (!empty($alarm['repeat'])):
  27    print "REPEAT:" . $alarm['repeat']  . "\r\n";
  28  endif;
  29  if (!empty($alarm['duration'])):
  30    print "DURATION:" . $alarm['duration']  . "\r\n";
  31  endif;
  32  if ($alarm['action'] == 'EMAIL'):
  33    print "ATTENDEE:MAILTO:" . $alarm['email']  . "\r\n";
  34    print "SUMMARY:" . $alarm['summary']  . "\r\n";
  35  endif;
  36  print "DESCRIPTION:" . $alarm['description']  . "\r\n";
  37  print "END:VALARM\r\n";


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7