fixed declaration
This commit is contained in:
@@ -3,24 +3,32 @@ include('include/headscript.php');
|
||||
include('languages/' . $_SESSION['langselect'] . '/tdgen.php');
|
||||
?>
|
||||
<?php
|
||||
// pickup the get variable
|
||||
if (isset($_GET["idtrf"])) {
|
||||
$idtrf = $_GET["idtrf"];
|
||||
}
|
||||
?>
|
||||
<?php if (isset($_GET['idtrftd'])) {
|
||||
$idtrftd = $_GET['idtrftd'];
|
||||
}
|
||||
if (isset($_POST['idtrftd'])) {
|
||||
$idtrftd = $_POST['idtrftd'];
|
||||
}
|
||||
if (isset($_POST['iddata_td'])) {
|
||||
$idtd = $_POST['iddata_td'];
|
||||
}
|
||||
if (isset($_GET['idtd'])) {
|
||||
$idtd = $_GET['idtd'];
|
||||
$idtd = (int)($_GET['idtd'] ?? $_POST['iddata_td'] ?? 0);
|
||||
if ($idtd <= 0) {
|
||||
die('ID dossier mancante');
|
||||
}
|
||||
|
||||
$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();
|
||||
|
||||
if (!$rowtd) {
|
||||
die('Dossier non trovato');
|
||||
}
|
||||
|
||||
$idtrftd = (int)$rowtd['idtrf'];
|
||||
$idcompany = (int)$rowtd['idcompany'];
|
||||
|
||||
// descrizione articolo (dal TRF) per il titolo
|
||||
$stmt = $conn->prepare("SELECT sample_description FROM `trf-details` WHERE idtrfdetails = ?");
|
||||
$stmt->bind_param("i", $idtrftd);
|
||||
$stmt->execute();
|
||||
$description = $stmt->get_result()->fetch_assoc()['sample_description'] ?? '';
|
||||
$stmt->close();
|
||||
$conn->close();
|
||||
?>
|
||||
<?php
|
||||
// query data_td
|
||||
@@ -138,15 +146,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($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">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php // documents
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user