[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Users/ -> massdelete.php (source)

   1  <?php
   2  
   3  
   4  /*********************************************************************************
   5  ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
   6   * ("License"); You may not use this file except in compliance with the License
   7   * The Original Code is:  vtiger CRM Open Source
   8   * The Initial Developer of the Original Code is vtiger.
   9   * Portions created by vtiger are Copyright (C) vtiger.
  10   * All Rights Reserved.
  11  *
  12   ********************************************************************************/
  13  
  14  
  15  require_once ('include/database/PearDatabase.php');
  16  require_once ('include/utils/UserInfoUtil.php');
  17  require_once ('include/utils/CommonUtils.php');
  18  $idlist = $_REQUEST['idlist'];
  19  $viewid = $_REQUEST['viewname'];
  20  $returnmodule=$_REQUEST['return_module'];
  21  $return_action = $_REQUEST['return_action'];
  22  //split the string and store in an array
  23  $storearray = explode(";",$idlist);
  24  array_filter($storearray);
  25  $ids_list = array();
  26  foreach($storearray as $id)
  27  {
  28          if(isPermitted($returnmodule,'Delete',$id) == 'yes')
  29          {
  30          global $current_user;
  31                  require_once ('include/freetag/freetag.class.php');
  32                  $freetag=new freetag();
  33                  $freetag->delete_all_object_tags_for_user($current_user->id,$id);
  34                  $sql="update vtiger_crmentity set deleted=1 where crmid='" .$id ."'";
  35                  $result = $adb->query($sql);
  36          }
  37          else
  38          {
  39                  $ids_list[] = $id;
  40          }
  41  }
  42  $ret = getEntityName($returnmodule,$ids_list);
  43  if(count($ret) > 0)
  44  {
  45         $errormsg = implode(',',$ret);
  46  }else
  47  {
  48         $errormsg = '';
  49  }
  50  
  51  if(isset($_REQUEST['smodule']) && ($_REQUEST['smodule']!=''))
  52  {
  53      $smod = "&smodule=".$_REQUEST['smodule'];
  54  }
  55  if($returnmodule == 'Emails')
  56  {
  57      if(isset($_REQUEST['folderid']) && $_REQUEST['folderid'] != '')
  58      {
  59          $folderid = $_REQUEST['folderid'];
  60      }else
  61      {
  62          $folderid = 1;
  63      }
  64      header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&folderid=".$folderid."&ajax=delete&file=ListView&errormsg=".$errormsg);
  65  }
  66  elseif($return_action == 'ActivityAjax')
  67  {
  68      $subtab = $_REQUEST['subtab'];
  69      header("Location: index.php?module=".$returnmodule."&action=".$return_action."&view=".$_REQUEST['view']."&hour=".$_REQUEST['hour']."&day=".$_REQUEST['day']."&month=".$_REQUEST['month']."&year=".$_REQUEST['year']."&type=".$_REQUEST['type']."&viewOption=".$_REQUEST['viewOption']."&subtab=".$subtab);
  70  }
  71              
  72  elseif($returnmodule!='Faq')
  73  {
  74      header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete&file=ListView&viewname=".$viewid."&errormsg=".$errormsg);
  75  }
  76  else
  77  {
  78      header("Location: index.php?module=".$returnmodule."&action=".$returnmodule."Ajax&ajax=delete&file=ListView&errormsg=".$errormsg);
  79  }
  80  ?>
  81  


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