change clienti to datadb and fixed column pages

This commit is contained in:
2025-10-09 15:30:44 +02:00
parent a9827e4e81
commit 68c867a3f4
6 changed files with 435 additions and 82 deletions
+4 -1
View File
@@ -108,7 +108,7 @@ try {
}
// Recupera routine dal template
$stmt = $pdo->prepare("SELECT idroutine FROM excel_templates WHERE id = ?");
$stmt = $pdo->prepare("SELECT idroutine, idclient FROM excel_templates WHERE id = ?");
$stmt->execute([$template_id]);
$template = $stmt->fetch(PDO::FETCH_ASSOC);
@@ -133,6 +133,9 @@ try {
error_log("Nessuna routine associata al template {$template_id}");
}
// Aggiungi idclient alla risposta
$response['idclient'] = $template['idclient'] ?? null;
// Salva i dati in sessione
$_SESSION['excel_data'] = $excelData;
$_SESSION['template_id'] = $template_id;