WebCalendar PHP Cross Reference Groupware Applications

Source: /export.php - 122 lines - 3480 bytes - Summary - Text - Print

   1  <?php
   2  /* $Id: export.php,v 1.51.2.3 2008/02/17 20:21:21 cknudsen Exp $
   3   * Page Description:
   4   * This page will present the user with forms for exporting calendar events.
   5   *
   6   * Input Parameters:
   7   * None
   8   */
   9  include_once  'includes/init.php';
  10  include_once  'includes/xcal.php';
  11  
  12  if ( empty ( $login ) || $login == '__public__' ) {
  13    // do not allow public access
  14    do_redirect ( empty ( $STARTVIEW ) ? 'month.php' : "$STARTVIEW" );
  15    exit;
  16  }
  17  
  18  load_user_categories ();
  19  
  20  $datem = date ( 'm' );
  21  $dateY = date ( 'Y' );
  22  $selected = ' selected="selected" ';
  23  
  24  print_header ( array ( 'js/export_import.php', 'js/visible.php' ) );
  25  
  26  ob_start ();
  27  
  28  echo '
  29      <h2>' . translate ( 'Export' ) . '</h2>
  30      <form action="export_handler.php" method="post" name="exportform" id="exportform">
  31        <table>
  32          <tr>
  33            <td><label for="exformat">' . translate ( 'Export format' )
  34   . ':</label></td>
  35            <td>' . generate_export_select ( 'toggel_catfilter' ) . '
  36            </td>
  37          </tr>';
  38  
  39  if ( is_array ( $categories ) ) {
  40    echo '
  41          <tr id="catfilter">
  42            <td><label for="cat_filter">' . translate ( 'Categories' )
  43     . ':</label></td>
  44            <td>
  45              <select name="cat_filter" id="cat_filter">
  46                <option value=""' . $selected . '>' . translate ( 'All' )
  47     . '</option>';
  48  
  49    foreach ( $categories as $K => $V ) {
  50      if ( $K > 0 )
  51        echo '
  52                <option value="' . $K . '">' . $V['cat_name'] . '</option>';
  53    }
  54  
  55    echo '
  56              </select>
  57            </td>
  58          </tr>';
  59  }
  60  // Only include layers if they are enabled.
  61  $dateYmd = date ( 'Ymd' );
  62  echo ( ! empty ( $LAYERS_STATUS ) && $LAYERS_STATUS == 'Y' ? '
  63          <tr>
  64            <td>&nbsp;</td>
  65            <td>
  66              <input type="checkbox" name="include_layers" id="include_layers" '
  67     . 'value="y" />
  68              <label for="include_layers">' . translate ( 'Include all layers' )
  69     . '</label>
  70            </td>
  71          </tr>'
  72    : '' ) . '
  73          <tr>
  74            <td>&nbsp;</td>
  75            <td>
  76              <input type="checkbox" name="include_deleted" id="include_deleted" '
  77   . 'value="y" />
  78              <label for="include_deleted">'
  79   . translate ( 'Include deleted entries' ) . '</label>
  80            </td>
  81          </tr>
  82          <tr>
  83            <td>&nbsp;</td>
  84            <td>
  85              <input type="checkbox" name="use_all_dates" id="exportall" '
  86   . 'value="y" onclick="toggle_datefields( \'dateArea\', this );" />
  87              <label for="exportall">' . translate ( 'Export all dates' )
  88   . '</label>
  89            </td>
  90          </tr>
  91          <tr>
  92            <td colspan="2">
  93              <table id="dateArea">
  94                <tr>
  95                  <td><label>' . translate ( 'Start date' ) . ':</label></td>
  96                  <td>' . date_selection ( 'from', $dateYmd ) . '</td>
  97                </tr>
  98                <tr>
  99                  <td><label>' . translate ( 'End date' ) . ':</label></td>
 100                  <td>' . date_selection ( 'end', $dateYmd ) . '</td>
 101                </tr>
 102                <tr>
 103                  <td><label>' . translate ( 'Modified since' ) . ':</label></td>
 104                  <td>' . date_selection ( 'mod', mktime ( 0, 0, 0,
 105                    $datem, date ( 'd' ) - 7, $dateY ) ) . '</td>
 106                </tr>
 107              </table>
 108            </td>
 109          </tr>
 110          <tr>
 111            <td colspan="2"><input type="submit" value="'
 112   . translate ( 'Export' ) . '" /></td>
 113          </tr>
 114        </table>
 115      </form>
 116      ';
 117  
 118  ob_end_flush ();
 119  
 120  echo print_trailer ();
 121  
 122  ?>

title

Description

title

Description

title

Description

title

title

Body