[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Contacts/ -> DelImage.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  
  13  
  14  function DelImage($id)
  15  {
  16          
  17      global $adb;
  18      $query="delete from vtiger_attachments where attachmentsid=(select attachmentsid from vtiger_seattachmentsrel where crmid=".$id.")";
  19      $adb->query($query);
  20  
  21      $query="delete from vtiger_seattachmentsrel where crmid=".$id;
  22      $adb->query($query);
  23  }
  24  
  25  function DelAttachment($id)
  26  {
  27      global $adb;
  28      $selresult = $adb->query("select name,path from vtiger_attachments where attachmentsid=$id");
  29      unlink($adb->query_result($selresult,0,'path').$id."_".$adb->query_result($selresult,0,'name'));
  30      $query="delete from vtiger_seattachmentsrel where attachmentsid=".$id;
  31      $adb->query($query);
  32      $query="delete from vtiger_attachments where attachmentsid=".$id.")";
  33      $adb->query($query);
  34  
  35  }
  36  $id = $_REQUEST["recordid"];
  37  if(isset($_REQUEST["attachmodule"]) && $_REQUEST["attachmodule"]=='Emails')
  38  {
  39      DelAttachment($id);
  40  }
  41  else
  42  {
  43      DelImage($id);
  44  }
  45  echo 'SUCESS';
  46  ?>


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