[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Import/ -> ImportAjax.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 ('Smarty_setup.php');
  13  include ('modules/Import/ImportMap.php');
  14  include ('modules/Import/Forms.php');
  15  
  16  //This is to delete the map
  17  if($_REQUEST['delete_map'] != '')
  18  {
  19      $query = "update vtiger_import_maps set deleted=1 where id = ".$_REQUEST['mapping'];
  20      $adb->query($query);
  21  }
  22  
  23  $mapping_file = new ImportMap();
  24  $mapping_arr = $mapping_file->getSavedMappingContent($_REQUEST['mapping']);
  25  
  26  $importable_fields = $_SESSION['import_module_object_column_fields'];
  27  $field_count = $_SESSION['import_module_field_count'];
  28  $required_fields = $_SESSION['import_module_object_required_fields'];
  29  $translated_column_fields = $_SESSION['import_module_translated_column_fields'];
  30  
  31  $tablename = '';
  32  $has_header = $_SESSION['import_has_header'];
  33  $firstrow = $_SESSION['import_firstrow'];
  34  $field_map = &$mapping_arr;//$_SESSION['import_field_map'];
  35  $smarty_array1 = array();
  36  
  37  for($i=0;$i<$field_count;$i++)
  38  {
  39      $suggest = '';
  40      if ($has_header && isset( $field_map[$firstrow[$i]] ) )
  41      {
  42          $suggest = $field_map[$firstrow[$i]];
  43      }
  44      else if (isset($field_map[$i]))
  45      {
  46          $suggest = $field_map[$i];
  47      }
  48  
  49      $smarty_array1[$i+1] = getFieldSelect(    $importable_fields,
  50                                                  $i,
  51                                                  $required_fields,
  52                                                  $suggest,
  53                                                  $translated_column_fields,
  54                                                  $tablename
  55                                                );
  56  }
  57  
  58  $smarty =  new vtigerCRM_Smarty;
  59  $smarty->assign("FIRSTROW",$firstrow);
  60  $smarty->assign("SELECTFIELD",$smarty_array1);
  61  
  62  $smarty->display('ImportMap.tpl');
  63  
  64  
  65  
  66  ?>


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