[ Index ]
 

Code source de SugarCRM 5.0.0beta1

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

title

Body

[fermer]

/ -> pdf.php (source)

   1  <?php
   2   if(!defined('sugarEntry'))define('sugarEntry', true);
   3  /*********************************************************************************

   4   * SugarCRM is a customer relationship management program developed by

   5   * SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.

   6   * 

   7   * This program is free software; you can redistribute it and/or modify it under

   8   * the terms of the GNU General Public License version 3 as published by the

   9   * Free Software Foundation.

  10   * 

  11   * This program is distributed in the hope that it will be useful, but WITHOUT

  12   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

  13   * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more

  14   * details.

  15   * 

  16   * You should have received a copy of the GNU General Public License along with

  17   * this program; if not, see http://www.gnu.org/licenses or write to the Free

  18   * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA

  19   * 02110-1301 USA.

  20   * 

  21   * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,

  22   * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.

  23   * 

  24   * The interactive user interfaces in modified source and object code versions

  25   * of this program must display Appropriate Legal Notices, as required under

  26   * Section 5 of the GNU General Public License version 3.

  27   * 

  28   * In accordance with Section 7(b) of the GNU General Public License version 3,

  29   * these Appropriate Legal Notices must retain the display of the "Powered by

  30   * SugarCRM" logo. If the display of the logo is not reasonably feasible for

  31   * technical reasons, the Appropriate Legal Notices must display the words

  32   * "Powered by SugarCRM".

  33   ********************************************************************************/
  34  require_once ('include/entryPoint.php');
  35  global $beanList, $beanFiles;
  36  
  37  session_start();
  38  
  39  ///////////////////////////////////////////////////////////////////////////////

  40  ////    HANDLE SESSION SECURITY

  41  $user_unique_key = (isset($_SESSION['unique_key'])) ? $_SESSION['unique_key'] : '';
  42  $server_unique_key = (isset($sugar_config['unique_key'])) ? $sugar_config['unique_key'] : '';
  43  
  44  if($user_unique_key != $server_unique_key) {
  45      session_destroy();
  46      header("Location: index.php?action=Login&module=Users");
  47      exit();
  48  } elseif(!isset($_SESSION['authenticated_user_id'])) {
  49      // TODO change this to a translated string.

  50      session_destroy();
  51      die("An active session is required to export content");
  52  }
  53  
  54  $current_user = new User();
  55  $result = $current_user->retrieve($_SESSION['authenticated_user_id']);
  56  if($result == null) {
  57      session_destroy();
  58      die("An active session is required");
  59  }
  60  
  61  if(isset($_REQUEST['module']) && isset($_REQUEST['action']) && isset($_REQUEST['record'])) {
  62      $currentModule = clean_string($_REQUEST['module']);
  63      $action = clean_string($_REQUEST['action']);
  64      $record = clean_string($_REQUEST['record']);
  65  } else {
  66      die ("module, action, and record id all are required");
  67  }
  68  ////    END SECURITY HANDLING

  69  ///////////////////////////////////////////////////////////////////////////////

  70  
  71  // if the language is not set yet, then set it to the default language.

  72  if(isset($_SESSION['authenticated_user_language']) && $_SESSION['authenticated_user_language'] != '') {
  73      $current_language = $_SESSION['authenticated_user_language'];
  74  } else {
  75      $current_language = $sugar_config['default_language'];
  76  }
  77  $GLOBALS['log']->debug('current_language is: '.$current_language);
  78  
  79  //set module and application string arrays based upon selected language

  80  $app_strings = return_application_language($current_language);
  81  $app_list_strings = return_app_list_strings_language($current_language);
  82  $mod_strings = return_module_language($current_language, $currentModule);
  83  
  84  $entity = $beanList[$currentModule];
  85  require_once($beanFiles[$entity]);
  86  $focus = new $entity();
  87  $focus->retrieve(clean_string($_REQUEST['record']));
  88  
  89  include("modules/$currentModule/$action.php");
  90  sugar_cleanup();
  91  exit;
  92  ?>


Généré le : Tue Sep 11 10:48:47 2007 par Balluche grâce à PHPXref 0.7