[ Index ]
 

Code source de SugarCRM 5.0.0beta1

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

title

Body

[fermer]

/ -> campaign_tracker.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  /*********************************************************************************

  35  

  36   * Description:  Defines the English language pack for the base application.

  37   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.

  38   * All Rights Reserved.

  39   * Contributor(s): ______________________________________..

  40   ********************************************************************************/
  41  require_once ('include/entryPoint.php');
  42  
  43  // logic will be added here at a later date to track campaigns

  44  // this script; currently forwards to site_URL variable of $sugar_config

  45  // redirect URL will also be added so specified redirect URL can be used

  46  
  47  // additionally, another script using fopen will be used to call this

  48  // script externally

  49  
  50  require_once ('modules/Campaigns/utils.php');
  51  
  52  if(!empty($_REQUEST['identifier'])) {
  53      $keys=log_campaign_activity($_REQUEST['identifier'],'link');
  54  }
  55  
  56  if(empty($_REQUEST['track'])) {
  57      $track = "";
  58  } else {
  59      $track = $_REQUEST['track'];
  60  }
  61  $track = $db->quote($track);
  62  
  63  if(ereg('^[0-9A-Za-z\-]*$', $track))
  64  {
  65      $query = "SELECT refer_url FROM campaigns WHERE tracker_key='$track'";
  66      $res = $db->query($query);
  67  
  68      $row = $db->fetchByAssoc($res);
  69  
  70      $redirect_URL = $row['refer_url'];
  71      sugar_cleanup();
  72      header("Location: $redirect_URL");
  73  }
  74  else
  75  {
  76      sugar_cleanup();
  77  }
  78  exit;
  79  ?>


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