[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/Calendar/ -> new_calendar.php (source)

   1  <?php
   2  /*********************************************************************************
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9  *
  10   ********************************************************************************/
  11  
  12  global $theme,$current_user;
  13  $theme_path = "themes/".$theme."/";
  14  $image_path = $theme_path."images/";
  15  require_once($theme_path."layout_utils.php");
  16  require_once ("modules/Calendar/calendarLayout.php");
  17  require_once ("modules/Calendar/Calendar.php");
  18  $mysel= $_REQUEST['view'];
  19  $subtab = $_REQUEST['subtab'];
  20  $viewBox = $_REQUEST['viewOption'];
  21  if(empty($viewBox))
  22  {
  23      $viewBox = 'listview';
  24  }
  25  if(empty($subtab))
  26  {
  27      $subtab = 'event';
  28  }
  29  $calendar_arr = Array();
  30  $calendar_arr['IMAGE_PATH'] = $image_path;
  31  /* fix (for Ticket ID:2259 GA Calendar Default View not working) given by dartagnanlaf START --integrated by Minnie */
  32  if(empty($mysel)){
  33      if($current_user->activity_view == "This Year"){
  34          $mysel = 'year';
  35      }else if($current_user->activity_view == "This Month"){
  36          $mysel = 'month';
  37      }else if($current_user->activity_view == "This Week"){
  38          $mysel = 'week';
  39      }else{
  40          $mysel = 'day';
  41      }
  42  }
  43  /* fix given by dartagnanlaf END --integrated by Minnie */
  44  $date_data = array();
  45  if ( isset($_REQUEST['day']))
  46  {
  47  
  48          $date_data['day'] = $_REQUEST['day'];
  49  }
  50  
  51  if ( isset($_REQUEST['month']))
  52  {
  53          $date_data['month'] = $_REQUEST['month'];
  54  }
  55  
  56  if ( isset($_REQUEST['week']))
  57  {
  58          $date_data['week'] = $_REQUEST['week'];
  59  }
  60  
  61  if ( isset($_REQUEST['year']))
  62  {
  63          if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970)
  64          {
  65                  print("<font color='red'>Sorry, Year must be between 1970 and 2037</font>");
  66                  exit;
  67          }
  68          $date_data['year'] = $_REQUEST['year'];
  69  }
  70  
  71  
  72  if(empty($date_data))
  73  {
  74      $data_value=date('Y-m-d H:i:s');
  75      preg_match('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/',$data_value,$value);
  76      $date_data = Array(
  77          'day'=>$value[3],
  78          'month'=>$value[2],
  79          'year'=>$value[1],
  80          'hour'=>$value[4],
  81          'min'=>$value[5],
  82      );
  83      
  84  }
  85  $calendar_arr['calendar'] = new Calendar($mysel,$date_data); 
  86  if ($mysel == 'day' || $mysel == 'week' || $mysel == 'month' || $mysel == 'year')
  87  {
  88          $calendar_arr['calendar']->add_Activities($current_user);
  89  }
  90  $calendar_arr['view'] = $mysel;
  91  calendar_layout($calendar_arr,$viewBox,$subtab);
  92  ?>
  93  


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7