[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/ -> graph.php (source)

   1  <?php
   2  /*********************************************************************************
   3   * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
   4   * ("License"); You may not use this file except in compliance with the 
   5   * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
   6   * Software distributed under the License is distributed on an  "AS IS"  basis,
   7   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
   8   * the specific language governing rights and limitations under the License.
   9   * The Original Code is:  SugarCRM Open Source
  10   * The Initial Developer of the Original Code is SugarCRM, Inc.
  11   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
  12   * All Rights Reserved.
  13   * Contributor(s): ______________________________________.
  14   ********************************************************************************/
  15  /*********************************************************************************
  16   * $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/graph.php,v 1.1 2004/08/18 12:22:54 gjayakrishnan Exp $
  17   * Description: Main file and starting point for the application.  Calls the 
  18   * theme header and footer files defined for the user as well as the module as 
  19   * defined by the input parameters.
  20   ********************************************************************************/
  21   
  22  require_once ('config.php');
  23  require_once ('include/logging.php');
  24  require_once ('include/utils/utils.php');
  25  
  26  global $default_language;
  27  
  28  $log =& LoggerManager::getLogger('graph');
  29  $log->debug($_REQUEST);
  30  
  31  if(isset($_REQUEST['action']) && isset($_REQUEST['module']))
  32  {
  33      $action = $_REQUEST['action']; 
  34      $current_module_file = 'modules/'.$_REQUEST['module'].'/'.$action.'.php';
  35      $current_module = $_REQUEST['module'];
  36  }
  37  elseif(isset($_REQUEST['module']))
  38  {
  39      $current_module = $_REQUEST['module'];
  40      $current_module_file = 'modules/'.$_REQUEST['module'].'/Charts.php';
  41  }
  42  else {
  43      exit();
  44  }
  45  
  46  $current_language = $default_language;
  47  if(isset($_REQUEST['current_language']))
  48  {
  49      $current_language = $_REQUEST['current_language'];
  50  }
  51  
  52  // retrieve the translated strings.
  53  $app_strings = return_application_language($current_language);
  54  
  55  if(isset($app_strings['LBL_CHARSET']))
  56  {
  57      $charset = $app_strings['LBL_CHARSET'];
  58  }
  59  else
  60  {
  61      $charset = $default_charset;    
  62  }
  63  
  64  $log->info("current langugage is $current_language");
  65  $log->info("current module is $current_module ");    
  66  $log->info("including $current_module_file");    
  67  
  68  require_once($current_module_file);
  69  $draw_this = new jpgraph();
  70  
  71  if (isset($_REQUEST['graph'])) $graph = $_REQUEST['graph']; 
  72  else $graph = 'default';
  73  
  74  if (isset($_REQUEST['flat_array1'])) $flat_array1 = $_REQUEST['flat_array1']; 
  75  else $flat_array1="foo,bar";
  76  if (isset($_REQUEST['flat_array2'])) $flat_array2 = $_REQUEST['flat_array2']; 
  77  else $flat_array2="1,2";
  78  if (isset($_REQUEST['title'])) $title = $_REQUEST['title']; 
  79  else $title="the title";
  80  if (isset($_REQUEST['subtitle'])) $subtitle = $_REQUEST['subtitle']; 
  81  else $subtitle="the subtitle";
  82  
  83  $log->debug("draw_this->$graph");
  84  $log->debug("flat_array1 is ".$flat_array1);
  85  $log->debug("flat_array2 is ".$flat_array2);
  86  $log->debug("title is ".$title);
  87  $log->debug("subtitle is ".$subtitle);
  88  
  89  $array1 = explode(",", $flat_array1);
  90  $array2 = explode(",", $flat_array2);
  91  
  92  $draw_this->$graph($array1, $array2, $title, $subtitle);
  93  ?>


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