[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Contacts/ -> DetailViewAjax.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/logging.php');
  13  require_once ('modules/Contacts/Contacts.php');
  14  require_once ('include/database/PearDatabase.php');
  15  global $adb;
  16  
  17  $local_log =& LoggerManager::getLogger('ContactsAjax');
  18  
  19  $ajaxaction = $_REQUEST["ajxaction"];
  20  if($ajaxaction == "DETAILVIEW")
  21  {
  22       $crmid = $_REQUEST["recordid"];
  23       $tablename = $_REQUEST["tableName"];
  24       $fieldname = $_REQUEST["fldName"];
  25       $fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]); 
  26       if($crmid != "")
  27       {
  28           $cntObj = new Contacts();
  29           $cntObj->retrieve_entity_info($crmid,"Contacts");
  30           $cntObj->column_fields[$fieldname] = $fieldvalue;
  31           $cntObj->id = $crmid;
  32           $cntObj->mode = "edit";
  33           $cntObj->save("Contacts");
  34           if($fieldname =='email')
  35           {
  36               $sql = "update vtiger_portalinfo set user_name='".$fieldvalue."' where id=".$crmid;
  37               $adb->query($sql);
  38           }
  39           if($cntObj->id != "")
  40           {
  41               echo ":#:SUCCESS";
  42           }else
  43           {
  44               echo ":#:FAILURE";
  45           }   
  46       }else
  47       {
  48           echo ":#:FAILURE";
  49       }
  50  }
  51  ?>


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