Exemple #1
0
               for ($i = 0; $i < count($data_array); $i++){
                  /*
                   * skip empty cvs lines
                   */
                  if(trim(str_replace(',','',$data_array[$i])) == '') continue;

                  if ($i == 0){
                     $temp_data = str_replace('"','',$data_array[$i]);
                     $data_header_array = explode($separator,$temp_data);
                  }else{
                     $temp_data = str_replace('"','',$data_array[$i]);
                     $temp_data_array = explode($separator,$temp_data);
                     for ($j = 0; $j < count($data_header_array); $j++){
                        if ( isset($temp_data_array[$j]) ){
                           include_once('functions/text_functions.php');
                           $dates_data_array[$i-1][$data_header_array[$j]] = cs_utf8_encode($temp_data_array[$j]);
                        }
                     }
                  }
               }
               $session->setvalue('date_array', $dates_data_array);
               $params['selection']= true;
               redirect($environment->getCurrentContextID(),CS_DATE_TYPE, 'import',$params);
            }
         }

         // display form
         $class_params = array();
         $class_params['environment'] = $environment;
         $class_params['with_modifying_actions'] = true;
         $form_view = $class_factory->getClass(FORM_VIEW,$class_params);
Exemple #2
0
 function getDisplayName()
 {
     $temp_display_name = rawurldecode($this->_getValue('filename'));
     include_once 'functions/text_functions.php';
     return cs_utf8_encode($temp_display_name);
 }