fixed declaration
This commit is contained in:
+28
-34
@@ -2,24 +2,33 @@
|
||||
include('include/headscript.php'); ?>
|
||||
<?php
|
||||
include('languages/' . $_SESSION['langselect'] . '/tdgen.php');
|
||||
// pickup the get variable
|
||||
if (isset($_POST["idtd"])) {
|
||||
$idtd = $_POST["idtd"];
|
||||
}
|
||||
if (isset($_GET["idtd"])) {
|
||||
$idtd = $_GET["idtd"];
|
||||
$idtd = (int)($_GET['idtd'] ?? $_POST['idtd'] ?? 0);
|
||||
if ($idtd <= 0) {
|
||||
die('ID dossier mancante');
|
||||
}
|
||||
|
||||
if (isset($_GET["tokenresult"])) {
|
||||
$tokenresult = $_GET["tokenresult"];
|
||||
}
|
||||
if (isset($_POST["idtrftd"])) {
|
||||
$idtrf = $_POST["idtrftd"];
|
||||
}
|
||||
if (isset($_GET["idtrftd"])) {
|
||||
$idtrf = $_GET["idtrftd"];
|
||||
|
||||
// query data_td
|
||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||
$stmt = $conn->prepare("SELECT * FROM data_td WHERE iddata_td = ?");
|
||||
$stmt->bind_param("i", $idtd);
|
||||
$stmt->execute();
|
||||
$rowtd = $stmt->get_result()->fetch_assoc();
|
||||
$stmt->close();
|
||||
$conn->close();
|
||||
|
||||
if (!$rowtd) {
|
||||
die('Dossier non trovato');
|
||||
}
|
||||
|
||||
$statustd = $rowtd['statustd'];
|
||||
$trfmod = $rowtd['trfmod'];
|
||||
$idtrftd = (int)$rowtd['idtrf'];
|
||||
$idtrf = $idtrftd; // stesso valore: usato nei form di invio
|
||||
|
||||
|
||||
if (isset($_POST["contactsendmail"])) {
|
||||
$contactsendmail = $_POST["contactsendmail"];
|
||||
@@ -41,21 +50,7 @@ $pdfdomanda = $trfnumberfinal->getColumnVal("pdffilename");
|
||||
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
|
||||
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
|
||||
$certname->execute(); ?>
|
||||
<?php
|
||||
// query data_td
|
||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||
$sql = "SELECT * FROM data_td WHERE iddata_td = ?";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->bind_param("i", $idtd); // "i" indica che l'id è un intero
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
$row = $result->fetch_assoc();
|
||||
$statustd = $row['statustd'];
|
||||
$idtrftd = $row['idtrf'];
|
||||
$trfmod = $row['trfmod'];
|
||||
$stmt->close();
|
||||
$conn->close();
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
// Effettua la connessione al database
|
||||
@@ -292,17 +287,16 @@ $conn->close();
|
||||
</div><!--end page-title-box-->
|
||||
</div><!--end col-->
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card card-body">
|
||||
<h4 class="card-title mt-0"><?php echo $articletd; ?> <?php echo htmlspecialchars($trfnumberfinal->getColumnVal("sample_description")); ?> - TF: <?php echo htmlspecialchars($rowtd['tdnumber']); ?>-Rev.<?php echo (int)$rowtd['td_rev']; ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="media">
|
||||
|
||||
<?php include('include/appform.php'); ?>
|
||||
</div><!--end media-->
|
||||
|
||||
</div><!--end card-body-->
|
||||
</div><!--end card-->
|
||||
|
||||
|
||||
<!-- card for optional TRF -->
|
||||
|
||||
Reference in New Issue
Block a user