[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Potentials/ -> updateRelations.php (source)

   1  <?php
   2  /*********************************************************************************
   3  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   4   * ("License"); You may not use this file except in compliance with the License
   5   * The Original Code is:  vtiger CRM Open Source
   6   * The Initial Developer of the Original Code is vtiger.
   7   * Portions created by vtiger are Copyright (C) vtiger.
   8   * All Rights Reserved.
   9  *
  10   ********************************************************************************/
  11  
  12  require_once ('include/database/PearDatabase.php');
  13  require_once ('user_privileges/default_module_view.php');
  14  global $adb, $singlepane_view;
  15  $idlist = $_REQUEST['idlist'];
  16  $returnmodule = $_REQUEST['return_module'];
  17  if(isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '')
  18  {
  19      //split the string and store in an array
  20      $storearray = explode (";",$idlist);
  21      foreach($storearray as $id)
  22      {
  23          if($id != '')
  24          {
  25          $sql = "insert into vtiger_contpotentialrel values (".$id.",".$_REQUEST["parentid"] .")";
  26          $adb->query($sql);
  27          $sql = "insert into vtiger_seproductsrel values (". $_REQUEST["parentid"] .",".$id.")";
  28          $adb->query($sql);
  29          }
  30      }
  31      if($singlepane_view == 'true')
  32          header("Location: index.php?action=DetailView&module=Potentials&record=".$_REQUEST["parentid"]);
  33      else
  34           header("Location: index.php?action=CallRelatedList&module=Potentials&record=".$_REQUEST["parentid"]);
  35  }
  36  elseif(isset($_REQUEST['entityid']) && $_REQUEST['entityid'] != '')
  37  {
  38          $sql = "insert into vtiger_contpotentialrel values (". $_REQUEST["entityid"] .",".$_REQUEST["parid"] .")";
  39          $adb->query($sql);
  40          $sql = "insert into vtiger_seproductsrel values (". $_REQUEST["parid"] .",".$_REQUEST["entityid"] .")";
  41          $adb->query($sql);
  42          if($singlepane_view == 'true')
  43              header("Location: index.php?action=DetailView&module=Potentials&record=".$_REQUEST["parid"]);
  44          else
  45               header("Location: index.php?action=CallRelatedList&module=Potentials&record=".$_REQUEST["parid"]);
  46  }
  47  
  48  ?>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7