[ Index ]
 

Code source de WebCalendar 1.0.5

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables | Statistiques

title

Body

[fermer]

/includes/ -> site_extras.php (source)

   1  <?php
   2  if ( empty ( $PHP_SELF ) && ! empty ( $_SERVER ) &&
   3    ! empty ( $_SERVER['PHP_SELF'] ) ) {
   4    $PHP_SELF = $_SERVER['PHP_SELF'];
   5  }
   6  if ( ! empty ( $PHP_SELF ) && preg_match ( "/\/includes\//", $PHP_SELF ) ) {
   7      die ( "You can't access this file directly!" );
   8  }
   9  /*
  10   * $Id: site_extras.php,v 1.12 2005/02/08 01:35:45 cknudsen Exp $
  11   *
  12   * Page Description:
  13   *    This file can be used to define extra information associated with a
  14   *    calender entry.
  15   *    
  16   *    You may define extra fields of the following types:
  17   *      EXTRA_TEXT - will allow user to enter a line of text
  18   *      EXTRA_MULTILINETEXT - will allow user to enter multiple lines of text
  19   *      EXTRA_URL - will be displayed as a link
  20   *      EXTRA_DATE - will be presented with date pulldown menus when entering
  21   *      EXTRA_EMAIL - will be presented as a mailto URL
  22   *      EXTRA_USER - most be a calendar user name; will be presented
  23   *                   with a pulldown
  24   *      EXTRA_REMINDER - will allow reminder email messages to be sent
  25   *        out to all event participants
  26   *      EXTRA_REMINDER_DATE - will allow reminder email messages to be sent
  27   *        out to all event participants on the specified date.  Can use
  28   *        extra options to send it out before this date also.
  29   *      EXTRA_SELECTION_LIST - allows a custom selection list.  Can use
  30   *        this to specify a list of possible locations, etc.
  31   *    
  32   * Comments:
  33   *    If you want to fully support using languages other than what
  34   *    you define below, you will need to add the 2nd field of the arrays
  35   *    below to the translation files.
  36   *    
  37   * WARNING:
  38   *    If you want to use reminders, you will need to do some
  39   *    extra steps in setting up WebCalendar.  There is no built-in support
  40   *    for executing time-based jobs within PHP, so you need to setup something
  41   *    to execute the send_reminders.php script.
  42   *    On UNIX/Linux, this will be cron.
  43   *    On Windows, you'll need to find a cron-like way to do this.
  44   *    See README.html for more info.
  45   *
  46   */
  47  
  48  
  49  // define types
  50  $EXTRA_TEXT = 1;
  51  $EXTRA_MULTILINETEXT = 2;
  52  $EXTRA_URL = 3;
  53  $EXTRA_DATE = 4;
  54  $EXTRA_EMAIL = 5;
  55  $EXTRA_USER = 6;
  56  $EXTRA_REMINDER = 7;
  57  $EXTRA_SELECTLIST = 8;
  58  
  59  // Options for reminders - these should be or-ed together when
  60  // it makes sense.  (Right now the only two available options wouldn't
  61  // make sense to or together.)
  62  // By default, options = 0.
  63  
  64  // Owner specifies what date to send.  This will present a date selection
  65  // area on the edit page (just like a EXTRA_DATE will).
  66  $EXTRA_REMINDER_WITH_DATE =    0x0001;
  67  
  68  // Owner chooses how many days/hours/minutes before event date that
  69  // the reminder should be sent.  Will see:  __ Days __ Hrs __ Mins on
  70  // event edit page.
  71  $EXTRA_REMINDER_WITH_OFFSET =    0x0002;
  72  
  73  // Default for reminder is "no".  Add this flag to make the default "Yes"
  74  // when creating a new event.
  75  $EXTRA_REMINDER_DEFAULT_YES =    0x0004;
  76  
  77  // Format of an entry is an array with the following elements:
  78  // name: unique name of this extra field (used in db)
  79  // description: how this field will be described to users
  80  // type: $EXTRA_URL, $EXTRA_TEXT, etc...
  81  // arg1: for reminders how many minutes before event should reminder
  82  //       for multi-line text, how many columns to display in the form
  83  //         as in <textarea rows="XX" cols="XX"
  84  //       for text (single line), how many columns to display
  85  //         as in <input size="XX"
  86  //    for selection list, contains an array of possible values
  87  // arg2: for reminders, this specifies options such as
  88  //         $EXTRA_REMINDER_WITH_DATE or $EXTRA_REMINDER_WITH_OFFSET.
  89  //       for multi-line text, how many rows to display in the form
  90  //         as in <textarea rows="XX" cols="XX"
  91  
  92  // Example 1:
  93  //   You want to add an URL, a reminder, an email address,
  94  //   an event contact (from list of calendar users), and some driving
  95  //   directions.
  96  //
  97  // $site_extras = array (
  98  //   array (
  99  //     "URL",        // unique name of this extra field (used in db)
 100  //     "Event URL",  // how this field will be described to users
 101  //     $EXTRA_URL,   // type of field
 102  //     0,            // arg 1
 103  //     0             // arg 2
 104  //   ),
 105  //   array (
 106  //     "Email",         // unique name of this extra field (used in db)
 107  //     "Event Email",   // how this field will be described to users
 108  //     $EXTRA_EMAIL,    // type of field
 109  //     0,               // arg 1 (unused)
 110  //     0                // arg 2 (unused)
 111  //   ),
 112  //   array (
 113  //     "Contact",       // unique name of this extra field (used in db)
 114  //     "Event Contact", // how this field will be described to users
 115  //     $EXTRA_USER,     // type of field
 116  //     0,               // arg 1 (unused)
 117  //     0                // arg 2 (unused)
 118  //   ),
 119  //   array (
 120  //     "Directions",         // unique name of this extra field (used in db)
 121  //     "Driving Directions", // how this field will be described to users
 122  //     $EXTRA_MULTILINETEXT, // type of field
 123  //     50,                   // width of text entry
 124  //     8                     // height of text entry
 125  //   ),
 126  //   array (
 127  //     "Reminder",          // unique name of this extra field (used in db)
 128  //     "Send Reminder",     // how this field will be described to users
 129  //     $EXTRA_REMINDER,     // type of field
 130  //     21 * (24 * 60),      // how many minutes before event should reminder
 131  //                          // be sent (21 days in this case)
 132  //     $EXTRA_REMINDER_WITH_OFFSET | $EXTRA_REMINDER_DEFAULT_YES
 133  //                          // specifies reminder options bit-or
 134  //   ),
 135  //   array (
 136  //     "RoomLocation",       // unique name of this extra field (used in db)
 137  //     "Location",           // how this field will be described to users
 138  //     $EXTRA_SELECTLIST,    // type of field
 139  //                           // List of options (first will be default)
 140  //     array ( "None", "Room 101", "Room 102", "Conf Room 8", "Conf Room 12" ),
 141  //     0                     // arg 2 (unused)
 142  //   )
 143  // );
 144  
 145  // END EXAMPLES
 146  
 147  // Define your stuff here...
 148  // Below translate calls are here so they get picked up by check_translation.pl.
 149  // They are never executed in PHP.
 150  // Make sure you add translations in the translations file for anything
 151  // you need to translate to another language.
 152  // Use tools/check_translation.pl to verify you have all your translations.
 153  //
 154  // Kludge for picking up translations:
 155  //    translate("Send Reminder")
 156  $site_extras = array (
 157    array (
 158      "Reminder",          // unique name of this extra field (used in db)
 159      "Send Reminder",     // how this field will be described to users
 160      $EXTRA_REMINDER,     // type of field
 161      240,                 // arg 1: how many minutes before event should
 162                           // reminder be sent (however, this option is just
 163                           // the default when used with the
 164                           // EXTRA_REMINDER_WITH_OFFSET option) since the user
 165                           // can override this.
 166      $EXTRA_REMINDER_WITH_OFFSET
 167                           // arg 2: specifies reminder options bit-or
 168    )
 169  );
 170  ?>


Généré le : Fri Nov 30 19:09:19 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics