From a14aa6eb98ddcb3b06b4945586325fce1a1b3512 Mon Sep 17 00:00:00 2001 From: Claudio Date: Mon, 18 Aug 2025 09:14:19 +0200 Subject: [PATCH] gitignore --- .gitignore | 4 + ...apping_template_xls_scheme2bck31072025.php | 464 ++++++++++++++++++ 2 files changed, 468 insertions(+) create mode 100644 public/userarea/mapping_template_xls_scheme2bck31072025.php diff --git a/.gitignore b/.gitignore index 3d68b13..a316c4a 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,7 @@ auth.json # File XLSX temporanei importati /public/userarea/imported_trf/*.xlsx /public/userarea/xlstemplates/*.xlsx + +# Ignora cartelle di foto generate +/public/photostrf/ +/public/photostrf/qrcodes/ diff --git a/public/userarea/mapping_template_xls_scheme2bck31072025.php b/public/userarea/mapping_template_xls_scheme2bck31072025.php new file mode 100644 index 0000000..eee1224 --- /dev/null +++ b/public/userarea/mapping_template_xls_scheme2bck31072025.php @@ -0,0 +1,464 @@ +getConnection(); +$stmt = $pdo->prepare("SELECT name, header_row, start_column, target_table, sample_xlsx, idclient, clientname, idschema, schemaname, schemajson, xls_headers FROM excel_templates WHERE id = ?"); +$stmt->execute([$id]); +$template = $stmt->fetch(PDO::FETCH_ASSOC); + +if (!$template) { + die("Template not found"); +} + +$clientName = $template['clientname'] ?: ''; +$schemaName = $template['schemaname'] ?: ''; +$schemajson = $template['schemajson'] ? json_decode($template['schemajson'], true) : []; +$isSchemajsonEmpty = empty(trim($template['schemajson'])); + +// Recupera i campi dalla tabella template_mapping +$stmt = $pdo->prepare("SELECT id, field_id, excel_column, is_manual, manual_default, data_type, is_required, default_value, has_list, length, decimals, min_value, max_value, default_curr_date, tablename, field_label FROM template_mapping WHERE template_id = ?"); +$stmt->execute([$id]); +$mappings = $stmt->fetchAll(PDO::FETCH_ASSOC); + +// Recupera le colonne già associate nel database +$usedColumnsFromDB = array_filter(array_column($mappings, 'excel_column')); + +// Decodifica l'header XLS salvato, se presente +$xlsHeaders = $template['xls_headers'] ? json_decode($template['xls_headers'], true) : []; +?> + + + + + + + + + + Configure Template <?= htmlspecialchars($template['name'], ENT_QUOTES, 'UTF-8'); ?> + + + + +
+ + +
+
+ + +
+
+
+
+
Configure Template:
+

+ Client: | + Schema: | + Header Row: | + Start Column: +

+
+
+
+
+
+ + + + + ✅ Current file: + + No file uploaded yet. + + +
+ +
+
+
+
Schema Fields Configuration
+ +
+ + + + + + + + + + + + + + + + + + + + + +
TitleIDTypeMappingDefault Value
+ + + + + + + + +
+
+
+ + +
+
+
+
+
+ + +
+ + + + + + \ No newline at end of file