/* Decoded by unphp.net */ ?> MAX_SIZE ) { $error = "Fichier trop gros"; } else { if ( @move_uploaded_file($tmpName, $targetFile) ) { $row = 1; if (($handle = fopen($targetFile, "r")) !== FALSE) { while (($data = fgetcsv($handle, 99000, ",")) !== FALSE) { $num = count($data); $row++; for ($c=0; $c < $num; $c++) { $tabcsv[] = utf8_encode($data[$c]); } } // while (($data = fgetcsv($handle, 99000, ",")) !== FALSE) csv( $obj, $table, $targetFile, $delimit, $tabcsv ); fclose($handle); } // if (($handle = fopen($targetFile, "r")) !== FALSE) } // if ( @move_uploaded_file($tmpName, $targetFile) ) else { $error = "Échec de l'Upload !"; } } } } // if ( isset($_FILES['uploadFile']) && $_FILES['uploadFile']['error'] === 0 ) else { $error = "Aucun fichier reçu ou fichier volumineux"; } function csv( $obj, $table, $targetFile, $delimit, $tabcsv ) { $arHead = explode($delimit, $tabcsv[0]); $nbLgn = count($arHead); $dbName = $obj->getConfigs('DATA'); if ( $nbLgn > 0 ) : $sql = "SELECT name FROM sys.columns WHERE OBJECT_ID = OBJECT_ID('[{$table}]') "; $sttCol = $obj->showData($sql); ?>
0 ) : } // function csv( $obj, $table, $targetFile, $delimit, $tabcsv ) echo "{$error}