[ Index ]
 

Code source de SugarCRM 5.0.0beta1

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

title

Body

[fermer]

/ -> vCard.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 ('config.php');
  35  require_once ('include/vCard.php');
  36  require_once ('log4php/LoggerManager.php');
  37  require_once ('include/utils.php');
  38  require_once ('include/entryPoint.php');
  39  
  40  //$locale = new Localization();

  41  clean_special_arguments();
  42  
  43  // cn: set php.ini settings at entry points

  44  setPhpIniSettings();
  45  
  46  //$GLOBALS['log'] = LoggerManager::getLogger('vCard');

  47  //$GLOBALS['db'] = DBManager::getInstance();

  48  
  49  // check for old config format.

  50  if(empty($sugar_config) && isset($dbconfig['db_host_name']))
  51  {
  52     make_sugar_config($sugar_config);
  53  }
  54  
  55  $current_user = new User();
  56  
  57  if (!empty($sugar_config['session_dir'])) {
  58      session_save_path($sugar_config['session_dir']);
  59  }
  60  
  61  session_start();
  62  
  63  $user_unique_key = (isset($_SESSION['unique_key'])) ? $_SESSION['unique_key'] : '';
  64  $server_unique_key = (isset($sugar_config['unique_key'])) ? $sugar_config['unique_key'] : '';
  65  
  66  if ($user_unique_key != $server_unique_key) {
  67      session_destroy();
  68      header("Location: index.php?action=Login&module=Users");
  69      exit();
  70  }
  71  
  72  if(isset($_SESSION['authenticated_user_id']))
  73  {
  74      $result = $current_user->retrieve($_SESSION['authenticated_user_id']);
  75      if($result == null)
  76      {
  77          session_destroy();
  78          header("Location: index.php?action=Login&module=Users");
  79      }
  80  
  81  }
  82  
  83  if(isset($_SESSION['authenticated_user_language']) && $_SESSION['authenticated_user_language'] != '')
  84  {
  85      $current_language = $_SESSION['authenticated_user_language'];
  86  }
  87  else
  88  {
  89      $current_language = $sugar_config['default_language'];
  90  }
  91  
  92  
  93  //set module and application string arrays based upon selected language

  94  $app_strings = return_application_language($current_language);
  95  $app_list_strings = return_app_list_strings_language($current_language);
  96  
  97  $vcard = new vCard();
  98  $module = 'Contact';
  99  if(isset($_REQUEST['module']))
 100      $module = clean_string($_REQUEST['module']);
 101  
 102  $vcard->loadContact($_REQUEST['contact_id'], $module);
 103  
 104  $vcard->saveVCard();
 105  sugar_cleanup();
 106  
 107  ?>


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