Group-Office PHP Cross Reference Groupware Applications

Source: /modules/tasks/export.php - 50 lines - 1509 bytes - Summary - Text - Print

Description: Copyright Intermesh

   1  <?php
   2  /**
   3   * Copyright Intermesh
   4   *
   5   * This file is part of Group-Office. You should have received a copy of the
   6   * Group-Office license along with Group-Office. See the file /LICENSE.TXT
   7   *
   8   * If you have questions write an e-mail to info@intermesh.nl
   9   *
  10   * @version $Id: export.php 7752 2011-07-26 13:48:43Z mschering $
  11   * @copyright Copyright Intermesh
  12   * @author Merijn Schering <mschering@intermesh.nl>
  13   */
  14  
  15  
  16  require_once ("../../Group-Office.php");
  17  
  18  $GLOBALS['GO_SECURITY']->authenticate();
  19  $GLOBALS['GO_MODULES']->authenticate('tasks');
  20  
  21  require_once($GLOBALS['GO_MODULES']->class_path.'tasks.class.inc.php');
  22  $tasks = new tasks();
  23  
  24  require_once($GLOBALS['GO_MODULES']->class_path.'export_tasks.class.inc.php');
  25  $ical = new export_tasks();
  26  $ical->dont_use_quoted_printable=true;
  27  //$ical->line_break="\r\n";
  28  
  29  $tasklist = $tasks->get_tasklist($_REQUEST['tasklist_id']);
  30  $filename = $tasklist['name'].'.ics';
  31  
  32  
  33  $browser = detect_browser();
  34  
  35  header('Content-Type: text/calendar;charset=UTF-8');
  36  //header('Content-Length: '.filesize($path));
  37  header('Expires: '.gmdate('D, d M Y H:i:s') . ' GMT');
  38  if ($browser['name'] == 'MSIE')
  39  {
  40      header('Content-Disposition: attachment; filename="'.$filename.'"');
  41      header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
  42      header('Pragma: public');
  43  }else
  44  {
  45      header('Pragma: no-cache');
  46      header('Content-Disposition: attachment; filename="'.$filename.'"');
  47  }
  48  header('Content-Transfer-Encoding: binary');
  49  
  50  echo $ical->export_tasklist($_REQUEST['tasklist_id']);

title

Description

title

Description

title

Description

title

title

Body