[ Index ]
 

Code source de SugarCRM 5.0.0beta1

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

title

Body

[fermer]

/ -> acceptDecline.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  require_once ('modules/Contacts/Contact.php');
  36  global $sugar_config, $dbconfig, $beanList, $beanFiles;
  37  
  38  // check for old config format.

  39  if(empty($sugar_config) && isset($dbconfig['db_host_name']))
  40  {
  41     make_sugar_config($sugar_config);
  42  }
  43  
  44  if (!empty($sugar_config['session_dir'])) {
  45      session_save_path($sugar_config['session_dir']);
  46  }
  47  
  48  session_start();
  49  
  50  if ( ! empty($_REQUEST['user_id']))
  51  {
  52   $result = $current_user->retrieve($_REQUEST['user_id']);
  53   if($result == null)
  54   {
  55       session_destroy();
  56       sugar_cleanup();
  57       die("The user id doesn't exist");
  58   }
  59   $current_entity = $current_user;
  60  }
  61  else if ( ! empty($_REQUEST['contact_id']))
  62  {
  63   $current_entity = new Contact();
  64      $current_entity->disable_row_level_security = true;
  65   $result = $current_entity->retrieve($_REQUEST['contact_id']);
  66   if($result == null)
  67   {
  68       session_destroy();
  69       sugar_cleanup();
  70       die("The contact id doesn't exist");
  71   }
  72  }
  73  
  74      $bean = $beanList[clean_string($_REQUEST['module'])];
  75      require_once($beanFiles[$bean]);
  76      $focus = new $bean;
  77      $focus->disable_row_level_security = true;
  78    $result = $focus->retrieve($_REQUEST['record']);
  79  
  80  if($result == null)
  81  {
  82      session_destroy();
  83      sugar_cleanup();
  84      die("The focus id doesn't exist");
  85  }
  86  
  87  // if the language is not set yet, then set it to the default language.

  88  /*

  89  if(isset($_SESSION['authenticated_user_language']) && $_SESSION['authenticated_user_language'] != '')

  90  {

  91    $current_language = $_SESSION['authenticated_user_language'];

  92  }

  93  else

  94  {

  95    $current_language = $sugar_config['default_language'];

  96  }

  97  */
  98  $current_language = $sugar_config['default_language'];
  99  $GLOBALS['log']->debug('current_language is: '.$current_language);
 100  $app_strings = return_application_language($current_language);
 101  $app_list_strings = return_app_list_strings_language($current_language);
 102  
 103  $focus->set_accept_status($current_entity,$_REQUEST['accept_status']);
 104  
 105  print $app_strings['LBL_STATUS_UPDATED']."<BR><BR>";
 106  print $app_strings['LBL_STATUS']. " ". $app_list_strings['dom_meeting_accept_status'][$_REQUEST['accept_status']];
 107  print "<BR><BR>";
 108  $script = <<<EOQ
 109  <SCRIPT language="JavaScript">
 110  <!--
 111  var browserName=navigator.appName;
 112  if (browserName=="Netscape") {
 113  // C.L. fix for Mozilla/Netscape flavors... need a parent window

 114  function closeme()
 115  {
 116  window.open('','_parent','');
 117  window.close();
 118  }
 119  } else {
 120  function closeme()
 121  {
 122  window.close();
 123  }
 124  }
 125  //-->

 126  </SCRIPT>
 127  EOQ;
 128  
 129  print $script;
 130  print "<a href='#' onclick='window.closeme(); return false;'>".$app_strings['LBL_CLOSE_WINDOW']."</a><br>";
 131  sugar_cleanup();
 132  exit;
 133  ?>


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