modified pdf1 and tabeldescription

This commit is contained in:
2026-03-17 14:38:43 +01:00
parent 5e5a7483ab
commit 70d39770f8
62 changed files with 1142 additions and 204 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
require_once('../Connections/cmctrfdb.php'); // Database connection
if (isset($_GET['idtrf']) && is_numeric($_GET['idtrf'])) {
$idtrf = intval($_GET['idtrf']);
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connessione al database fallita: " . $conn->connect_error);
}
// Esegui l'aggiornamento per impostare photoone a NULL
$query = "UPDATE `trf-details` SET photoone = NULL WHERE idtrfdetails = ?";
$stmt = $conn->prepare($query);
$stmt->bind_param("i", $idtrf);
$stmt->execute();
if ($stmt->affected_rows > 0) {
error_log("Successfully updated photoone to NULL for idtrfdetails = $idtrf");
} else {
error_log("Failed to update photoone for idtrfdetails = $idtrf");
}
$stmt->close();
$conn->close();
// Reindirizza alla pagina principale
header("Location: adddocument.php?idtrf=$idtrf&t=" . time());
exit;
} else {
// Se idtrf non è valido, reindirizza
header("Location: index.php");
exit;
}