|
@@ -32,16 +32,10 @@ if (core::ifPost("from") AND core::getPost("from") == $name["files"]) {
|
|
|
if (file_exists($_FILES[$name["files"]]['tmp_name'])) {
|
|
if (file_exists($_FILES[$name["files"]]['tmp_name'])) {
|
|
|
|
|
|
|
|
$fileType = ($_FILES[$name["files"]]['type'] == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") ? "xlsx" : "csv";
|
|
$fileType = ($_FILES[$name["files"]]['type'] == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") ? "xlsx" : "csv";
|
|
|
-
|
|
|
|
|
-// if($fileType == "xlsx"){
|
|
|
|
|
- $simpleXLSX = new simpleXLSX();
|
|
|
|
|
- $dataExcel = $simpleXLSX->parse($_FILES[$name["files"]]['tmp_name']);
|
|
|
|
|
- $returnData = $dataExcel->rows();
|
|
|
|
|
-// } else {
|
|
|
|
|
-// $simpleCSV = new simpleCSV();
|
|
|
|
|
-// $returnData = $simpleCSV->import($_FILES[$name["files"]]['tmp_name']);
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $simpleXLSX = new simpleXLSX();
|
|
|
|
|
+ $dataExcel = $simpleXLSX->parse($_FILES[$name["files"]]['tmp_name']);
|
|
|
|
|
+ $returnData = $dataExcel->rows();
|
|
|
|
|
|
|
|
db::query("TRUNCATE TABLE ". DB_T_SALARIES_PROWEB);
|
|
db::query("TRUNCATE TABLE ". DB_T_SALARIES_PROWEB);
|
|
|
db::execute();
|
|
db::execute();
|
|
@@ -79,7 +73,6 @@ if (core::ifPost("from") AND core::getPost("from") == $name["files"]) {
|
|
|
|
|
|
|
|
$final = proweb::archiveExcelValues($excelValues);
|
|
$final = proweb::archiveExcelValues($excelValues);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
db::query("INSERT INTO ". DB_T_SALARIES_PROWEB ." "
|
|
db::query("INSERT INTO ". DB_T_SALARIES_PROWEB ." "
|
|
|
. "(idProweb, loginId, loginIdRH, nom, prenom, sexe, contrat, jourEntree, jourEntreeRH, jourSortie, lieu, actif, RHBase, error, errorJson) "
|
|
. "(idProweb, loginId, loginIdRH, nom, prenom, sexe, contrat, jourEntree, jourEntreeRH, jourSortie, lieu, actif, RHBase, error, errorJson) "
|
|
|
. "VALUES (:idProweb, :loginId, :loginIdRH, :nom, :prenom, :sexe, :contrat, :jourEntree, :jourEntreeRH, :jourSortie, :lieu, :actif, :RHBase, :error, :errorJson)");
|
|
. "VALUES (:idProweb, :loginId, :loginIdRH, :nom, :prenom, :sexe, :contrat, :jourEntree, :jourEntreeRH, :jourSortie, :lieu, :actif, :RHBase, :error, :errorJson)");
|
|
@@ -135,7 +128,6 @@ if (core::ifPost("from") AND core::getPost("from") == $name["files"]) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
json::create("excel-proweb");
|
|
json::create("excel-proweb");
|
|
|
-
|
|
|
|
|
json::create($name["json"]);
|
|
json::create($name["json"]);
|
|
|
alert::recSuccess("Le fichier " . $_FILES[$name["files"]]['name'] . " a été chargé avec succès");
|
|
alert::recSuccess("Le fichier " . $_FILES[$name["files"]]['name'] . " a été chargé avec succès");
|
|
|
header("Location: /".$name["returnOk"] . ".html");
|
|
header("Location: /".$name["returnOk"] . ".html");
|
|
@@ -144,7 +136,6 @@ if (core::ifPost("from") AND core::getPost("from") == $name["files"]) {
|
|
|
alert::recError("Erreur lors du chargement du fichier : " . $_FILES[$name["files"]]['name']);
|
|
alert::recError("Erreur lors du chargement du fichier : " . $_FILES[$name["files"]]['name']);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
header("Location: /".$name["returnKo"] . ".html");
|
|
header("Location: /".$name["returnKo"] . ".html");
|
|
|
exit();
|
|
exit();
|
|
|
} else {
|
|
} else {
|