iTx Technologies offre gratuitement
cet espace pour SugarCRM !

title

Body

[fermer]

/include/ -> entryPoint.php (source)

   1  <?php
   2  if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
   3  /*********************************************************************************
   4   * SugarCRM is a customer relationship management program developed by
   5   * SugarCRM, Inc. Copyright (C) 2004 - 2009 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 with the addition of the following permission added
  10   * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
  11   * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
  12   * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
  13   * 
  14   * This program is distributed in the hope that it will be useful, but WITHOUT
  15   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  16   * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  17   * details.
  18   * 
  19   * You should have received a copy of the GNU General Public License along with
  20   * this program; if not, see http://www.gnu.org/licenses or write to the Free
  21   * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  22   * 02110-1301 USA.
  23   * 
  24   * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
  25   * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
  26   * 
  27   * The interactive user interfaces in modified source and object code versions
  28   * of this program must display Appropriate Legal Notices, as required under
  29   * Section 5 of the GNU General Public License version 3.
  30   * 
  31   * In accordance with Section 7(b) of the GNU General Public License version 3,
  32   * these Appropriate Legal Notices must retain the display of the "Powered by
  33   * SugarCRM" logo. If the display of the logo is not reasonably feasible for
  34   * technical reasons, the Appropriate Legal Notices must display the words
  35   * "Powered by SugarCRM".
  36   ********************************************************************************/
  37  /*********************************************************************************
  38  
  39   * Description:
  40   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. All Rights
  41   * Reserved. Contributor(s): ______________________________________..
  42   * *******************************************************************************/
  43  
  44  /**
  45   * Known Entry Points as of 4.5
  46   * acceptDecline.php
  47   * campaign_tracker.php
  48   * campaign_trackerv2.php
  49   * cron.php
  50   * dictionary.php
  51   * download.php
  52   * emailmandelivery.php
  53   * export_dataset.php
  54   * export.php
  55   * image.php
  56   * index.php
  57   * install.php
  58   * json.php
  59   * json_server.php
  60   * leadCapture.php
  61   * maintenance.php
  62   * metagen.php
  63   * oc_convert.php
  64   * pdf.php
  65   * phprint.php
  66   * process_queue.php
  67   * process_workflow.php
  68   * removeme.php
  69   * schedulers.php
  70   * soap.php
  71   * su.php
  72   * sugar_version.php
  73   * TreeData.php
  74   * tree_level.php
  75   * tree.php
  76   * vcal_server.php
  77   * vCard.php
  78   * zipatcher.php
  79   * WebToLeadCapture.php
  80   * HandleAjaxCall.php */
  81   /*
  82    * for 50, added:
  83    * minify.php
  84    */
  85    /*
  86    * for 510, added:
  87    * dceActionCleanup.php
  88    */
  89  $GLOBALS['starttTime'] = microtime(true);
  90  
  91  set_include_path(
  92      dirname(__FILE__) . '/..' . PATH_SEPARATOR .
  93      get_include_path()
  94  );
  95  
  96  if(empty($GLOBALS['installing']) && !file_exists('config.php'))
  97  {
  98      header('Location: install.php');
  99      exit ();
 100  }
 101  
 102  
 103  // config|_override.php
 104  if(is_file('config.php')) {
 105      require_once ('config.php'); // provides $sugar_config
 106  }
 107  // load up the config_override.php file.  This is used to provide default user settings
 108  if(is_file('config_override.php')) {
 109      require_once('config_override.php');
 110  }
 111  if(empty($GLOBALS['installing']) &&empty($sugar_config['dbconfig']['db_host_name']))
 112  {
 113          header('Location: install.php');
 114          exit ();
 115  }
 116  
 117  // make sure SugarConfig object is available
 118  require_once  'include/SugarObjects/SugarConfig.php';
 119  
 120  ///////////////////////////////////////////////////////////////////////////////
 121  ////    DATA SECURITY MEASURES
 122  require_once ('include/utils.php');
 123  clean_special_arguments();
 124  clean_incoming_data();
 125  ////    END DATA SECURITY MEASURES
 126  ///////////////////////////////////////////////////////////////////////////////
 127  
 128  // cn: set php.ini settings at entry points
 129  setPhpIniSettings();
 130  
 131  require_once ('sugar_version.php'); // provides $sugar_version, $sugar_db_version, $sugar_flavor
 132  require_once ('include/database/DBManagerFactory.php');
 133  require_once ('include/dir_inc.php');
 134  
 135  require_once ('include/Localization/Localization.php');
 136  require_once ('include/javascript/jsAlerts.php');
 137  require_once ('include/TimeDate.php');
 138  require_once ('include/modules.php'); // provides $moduleList, $beanList, $beanFiles, $modInvisList, $adminOnlyList, $modInvisListActivities
 139  
 140  require ('include/utils/autoloader.php');
 141  spl_autoload_register(array('SugarAutoLoader', 'autoload'));
 142  require_once ('data/SugarBean.php');
 143  require_once ('include/utils/mvc_utils.php');
 144  require ('include/SugarObjects/LanguageManager.php');
 145  require ('include/SugarObjects/VardefManager.php');
 146  
 147  require ('modules/DynamicFields/templates/Fields/TemplateText.php');
 148  
 149  require_once ('include/utils/file_utils.php');
 150  
 151  require_once ('include/SugarEmailAddress/SugarEmailAddress.php');
 152  require_once ('include/SugarLogger/LoggerManager.php');
 153  require_once ('modules/Trackers/BreadCrumbStack.php');
 154  require_once ('modules/Trackers/Tracker.php');
 155  require_once ('modules/Trackers/TrackerManager.php');
 156  require_once ('modules/ACL/ACLController.php');
 157  require_once ('modules/Administration/Administration.php');
 158  require_once ('modules/Administration/updater_utils.php');
 159  require_once ('modules/Users/User.php');
 160  require_once ('modules/Users/authentication/AuthenticationController.php');
 161  require_once ('include/utils/LogicHook.php');
 162  require_once ('include/SugarTheme/SugarTheme.php');
 163  //require_once('include/MVC/SugarApplication.php');
 164  require ('modules/Currencies/Currency.php');
 165  //
 166  //SugarApplication::startSession();
 167  
 168  ///////////////////////////////////////////////////////////////////////////////
 169  ////    Handle loading and instantiation of various Sugar* class
 170  if (!defined('SUGAR_PATH')) {
 171      define('SUGAR_PATH', realpath(dirname(__FILE__) . '/..'));
 172  }
 173  require_once  SUGAR_PATH . '/include/SugarObjects/SugarRegistry.php';
 174  if(empty($GLOBALS['installing'])){
 175  ///////////////////////////////////////////////////////////////////////////////
 176  ////    SETTING DEFAULT VAR VALUES
 177  $GLOBALS['log'] = LoggerManager::getLogger('SugarCRM');
 178  $error_notice = '';
 179  $use_current_user_login = false;
 180  $module_menu = array();
 181  // Allow for the session information to be passed via the URL for printing.
 182  if(isset($_GET['PHPSESSID'])){
 183      if(!empty($_COOKIE['PHPSESSID']) && strcmp($_GET['PHPSESSID'],$_COOKIE['PHPSESSID']) == 0) {
 184          session_id($_REQUEST['PHPSESSID']);
 185      }else{
 186          unset($_GET['PHPSESSID']);
 187      }
 188  }
 189  if(!empty($sugar_config['session_dir'])) {
 190      session_save_path($sugar_config['session_dir']);
 191  }
 192  
 193  $timedate = new TimeDate();
 194  $db = DBManagerFactory::getInstance();
 195  $db->resetQueryCount();
 196  $locale = new Localization();
 197  
 198  // Emails uses the REQUEST_URI later to construct dynamic URLs.
 199  // IIS does not pass this field to prevent an error, if it is not set, we will assign it to ''.
 200  if (!isset ($_SERVER['REQUEST_URI'])) {
 201      $_SERVER['REQUEST_URI'] = '';
 202  }
 203  
 204  $current_user = new User();
 205  $current_entity = null;
 206  $system_config = new Administration();
 207  $system_config->retrieveSettings();
 208  
 209  $GLOBALS['sugar_version'] = $sugar_version;
 210  $GLOBALS['sugar_flavor'] = $sugar_flavor;
 211  $GLOBALS['timedate'] = $timedate;
 212  $GLOBALS['js_version_key'] = md5($GLOBALS['sugar_config']['unique_key'].$GLOBALS['sugar_version']);
 213  }
 214  ////    END SETTING DEFAULT VAR VALUES
 215  ///////////////////////////////////////////////////////////////////////////////
 216  
 217  ?>


Generé en: Thu Mar 4 09:44:50 2010 | Cross-referenced par PHPXref 0.7