[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Users/ -> SaveSharingRule.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  global $adb;
  14  
  15  
  16  $sharing_module=$_REQUEST['sharing_module'];
  17  $tabid=getTabid($sharing_module);
  18  $sharedby = explode('::',$_REQUEST[$sharing_module.'_share']);
  19  $sharedto = explode('::',$_REQUEST[$sharing_module.'_access']);
  20  $share_entity_type = $sharedby[0];
  21  $to_entity_type = $sharedto[0];
  22  
  23  $share_entity_id= $sharedby[1];
  24  $to_entity_id=$sharedto[1];
  25  
  26  $module_sharing_access=$_REQUEST['share_memberType'];
  27  
  28  $mode=$_REQUEST['mode'];
  29  
  30  
  31  
  32  $relatedShareModuleArr=getRelatedSharingModules($tabid);
  33  if($mode == 'create')
  34  {
  35      $shareId=addSharingRule($tabid,$share_entity_type,$to_entity_type,$share_entity_id,$to_entity_id,$module_sharing_access);
  36  
  37      //Adding the Related ModulePermission Sharing
  38      foreach($relatedShareModuleArr as $reltabid=>$ds_rm_id)
  39      {
  40          $reltabname=getTabModuleName($reltabid);
  41          $relSharePermission=$_REQUEST[$reltabname.'_accessopt'];    
  42          addRelatedModuleSharingPermission($shareId,$tabid,$reltabid,$relSharePermission);    
  43      }
  44      
  45  }
  46  elseif($mode == 'edit')
  47  {
  48      $shareId=$_REQUEST['shareId'];
  49      updateSharingRule($shareId,$tabid,$share_entity_type,$to_entity_type,$share_entity_id,$to_entity_id,$module_sharing_access);
  50      //Adding the Related ModulePermission Sharing
  51      foreach($relatedShareModuleArr as $reltabid=>$ds_rm_id)
  52      {
  53          $reltabname=getTabModuleName($reltabid);
  54          $relSharePermission=$_REQUEST[$reltabname.'_accessopt'];    
  55          updateRelatedModuleSharingPermission($shareId,$tabid,$reltabid,$relSharePermission);    
  56      }    
  57  }
  58  
  59  
  60  
  61  $loc = "Location: index.php?action=OrgSharingDetailView&module=Users&parenttab=Settings";
  62  header($loc);
  63  ?>


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