[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Reports/ -> ChangeFolder.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 ('include/database/PearDatabase.php');
  14  $folderid = $_REQUEST['folderid'];
  15  
  16  if(isset($_REQUEST['idlist']) && $_REQUEST['idlist']!= '')
  17  {
  18      $id_array = Array();
  19      $id_array = explode(':',$_REQUEST['idlist']);
  20      for($i = 0;$i < count($id_array)-1;$i++)
  21      {
  22          ChangeFolder($id_array[$i],$folderid);    
  23      }
  24      header("Location: index.php?action=ReportsAjax&file=ListView&mode=ajaxdelete&module=Reports");
  25  }elseif(isset($_REQUEST['record']) && $_REQUEST['record']!= '')
  26  {
  27      $id = $_REQUEST["record"];
  28      ChangeFolder($id,$folderid);    
  29      header("Location: index.php?action=ReportsAjax&file=ListView&mode=ajaxdelete&module=Reports");
  30  }
  31  
  32  
  33  /** To Change the Report to another folder
  34    * @param $reportid -- The report id
  35    * @param $folderid -- The folderid the which the report to be moved
  36    * @returns nothing 
  37   */
  38  function ChangeFolder($reportid,$folderid)
  39  {
  40      global $adb;
  41      $imovereportsql = "update vtiger_report set folderid=".$folderid." where reportid=".$reportid;
  42      $imovereportsqlresult = $adb->query($imovereportsql);
  43  }
  44  ?>


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