added charts and fixed analysis component
This commit is contained in:
@@ -42,12 +42,12 @@
|
||||
|
||||
<body class="fixed-left">
|
||||
|
||||
<!-- Loader -->
|
||||
<!-- Loader
|
||||
<div id="preloader">
|
||||
<div id="status">
|
||||
<div class="spinner"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- Begin page -->
|
||||
<div id="wrapper">
|
||||
@@ -132,52 +132,75 @@
|
||||
}
|
||||
?>
|
||||
<?php $idanalysis = $_GET['idanalysis']; ?><?php $tablequery = new WA_MySQLi_RS("analysis", $repnew, 0);
|
||||
$tablequery->setQuery("SELECT * FROM `analysis` WHERE analysis.idanalysis='$idanalysis'");
|
||||
$tablequery->setQuery("SELECT * FROM `analysisvocabulary` WHERE analysisvocabulary.idanalysisvocabulary='$idanalysis'");
|
||||
$tablequery->execute();
|
||||
?>
|
||||
<?php
|
||||
$componentlist = new WA_MySQLi_RS("componentlist", $repnew, 0);
|
||||
$componentlist->setQuery("SELECT * FROM component WHERE component.company_id='$idcompany' ORDER BY component.name_component");
|
||||
$componentlist->setQuery("SELECT * FROM compundsvocabulary WHERE preferred='Y' ORDER BY compundsvocabulary.namecompoundsvocabulary");
|
||||
$componentlist->execute();
|
||||
?>
|
||||
<?php
|
||||
$companalysis = new WA_MySQLi_RS("companalysis", $repnew, 0);
|
||||
$companalysis->setQuery("SELECT * FROM analysis_component LEFT JOIN component ON analysis_component.idcomponent=component.idcomponent WHERE analysis_component.idanalysis=$idanalysis ORDER BY component.name_component");
|
||||
$companalysis->setQuery("SELECT * FROM analysis_component LEFT JOIN compundsvocabulary ON analysis_component.idcomponent=compundsvocabulary.idcompoundsvocabulary WHERE analysis_component.idanalysis=$idanalysis ORDER BY compundsvocabulary.namecompoundsvocabulary");
|
||||
$companalysis->execute();
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="header-title pb-3 mt-0">EasySpec: <?php echo $dashboard; ?></h5>
|
||||
|
||||
|
||||
<div>
|
||||
<a class="btn btn-danger" href="update-analysis.php?idanalysis=<?php echo ($tablequery->getColumnVal("idanalysis")); ?>" role="button">Edit</a> <a class="btn btn-danger" href="analysis.php" role="button"><?php echo $analysis; ?></a> <a class="btn btn-danger" href="rsl.php" role="button">RSL</a><br><br>
|
||||
<h4 class="card-title">Analysis: <?php echo ($tablequery->getColumnVal("name_analysis")); ?> </h4>
|
||||
<h6 class="card-subtitle"><?php echo $textaddcomplist; ?><code></code></h6>
|
||||
</div><!--end table-responsive-->
|
||||
|
||||
<form method="post" id="addcomp">
|
||||
<div class="mb-3 row">
|
||||
<div class="col-sm-4">
|
||||
<?php echo $yourcomponentstitle; ?>
|
||||
<select name="component" class="selectpicker m-b-20 m-r-10" id="component" data-style="btn-primary" data-live-search="true">
|
||||
<?php while (!$componentlist->atEnd()) { ?>
|
||||
<option value="<?php echo $componentlist->getColumnVal("idcomponent"); ?>">
|
||||
<?php echo $componentlist->getColumnVal("name_component"); ?>
|
||||
</option>
|
||||
<?php $componentlist->moveNext();
|
||||
}
|
||||
$componentlist->moveFirst(); ?>
|
||||
</select>
|
||||
<input name="idanalysis" type="hidden" id="idanalysis" value="<?php echo $idanalysis; ?>">
|
||||
<input name="Add" type="submit" id="Add" class="btn btn-primary">
|
||||
</div>
|
||||
<!-- Action Buttons -->
|
||||
<div class="d-flex flex-wrap mb-3">
|
||||
<a class="btn btn-danger" href="update-analysis.php?idanalysis=<?php echo ($tablequery->getColumnVal("idanalysis")); ?>" role="button" style="margin-right: 5px;">Edit</a>
|
||||
<a class="btn btn-danger" href="analysis.php" role="button" style="margin-right: 5px;"><?php echo $analysis; ?></a>
|
||||
<a class="btn btn-danger" href="rsl.php" role="button" style="margin-right: 5px;">RSL</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<a onclick="window.open('searchengine.php?idanalysis=<?php echo ($tablequery->getColumnVal("idanalysis")); ?>', '_blank', 'location=yes,height=720,width=1000,scrollbars=yes,status=yes');"><button type="button" class="btn btn-danger waves-effect waves-light"><?php echo $clickaddcomponentstitle; ?></button></a>
|
||||
<br><br>
|
||||
|
||||
|
||||
|
||||
<!-- Title with Badge -->
|
||||
<h4 class="mt-3">
|
||||
Analysis: <span class="badge bg-info text-dark"><?php echo $tablequery->getColumnVal("nameanalysisvoc"); ?></span>
|
||||
</h4>
|
||||
|
||||
<p class="text-muted"><?php echo $textaddcomplist; ?></p>
|
||||
|
||||
<!-- Add Component Form -->
|
||||
<form method="post" id="addcomp" class="my-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="component" class="form-label fw-bold">
|
||||
<?php echo $yourcomponentstitle; ?>
|
||||
</label>
|
||||
<select name="component" class="form-select selectpicker" id="component" data-style="btn-primary" data-live-search="true">
|
||||
<?php while (!$componentlist->atEnd()) { ?>
|
||||
<option value="<?php echo $componentlist->getColumnVal("idcompoundsvocabulary"); ?>">
|
||||
<?php echo $componentlist->getColumnVal("namecompoundsvocabulary"); ?> - <?php echo $componentlist->getColumnVal("cascompoundvocabulary"); ?>
|
||||
</option>
|
||||
<?php $componentlist->moveNext();
|
||||
}
|
||||
$componentlist->moveFirst(); ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input name="idanalysis" type="hidden" id="idanalysis" value="<?php echo $idanalysis; ?>">
|
||||
<input name="Add" type="submit" id="Add" class="btn btn-primary w-100" value="Add Component">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Add Components Button -->
|
||||
<div class="text-end">
|
||||
<button type="button" class="btn btn-danger" onclick="window.open('searchengine.php?idanalysis=<?php echo ($tablequery->getColumnVal("idanalysis")); ?>', '_blank', 'location=yes,height=720,width=1000,scrollbars=yes,status=yes');">
|
||||
<?php echo $clickaddcomponentstitle; ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table table-striped table-sm sm-0">
|
||||
@@ -185,7 +208,7 @@
|
||||
<tr>
|
||||
|
||||
<th><?php echo $name_component_lang; ?></th>
|
||||
<th><?php echo $description_component_lang; ?></th>
|
||||
<th>CAS</th>
|
||||
<th></th>
|
||||
|
||||
|
||||
@@ -199,13 +222,18 @@
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><?php echo $companalysis->getColumnVal("name_component"); ?></td>
|
||||
<td><?php echo $companalysis->getColumnVal("description_component"); ?></td>
|
||||
<td><?php echo $companalysis->getColumnVal("namecompoundsvocabulary"); ?></td>
|
||||
<td><?php echo $companalysis->getColumnVal("cascompoundvocabulary"); ?></td>
|
||||
<?php
|
||||
|
||||
?>
|
||||
|
||||
<td><a class="btn btn-danger" href="cancel-componentanalysis.php?idanalysiscomponent=<?php echo ($companalysis->getColumnVal("idanalysiscomponent")); ?>&idanalysis=<?php echo $idanalysis; ?>" role="button">C</a></td>
|
||||
<td>
|
||||
<a class="btn btn-danger" onclick="confirmDeletion(<?php echo $companalysis->getColumnVal('idanalysiscomponent'); ?>, <?php echo $idanalysis; ?>);" role="button">
|
||||
<i class="bx bx-trash" style="color: white;"></i> <!-- Forza l'icona ad essere bianca -->
|
||||
</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
$companalysis->moveNext();
|
||||
@@ -247,6 +275,25 @@
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function confirmDeletion(idAnalysisComponent, idAnalysis) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "This component will be removed permanently!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Yes, delete it!',
|
||||
cancelButtonText: 'Cancel'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
// Redirige all'URL di cancellazione
|
||||
window.location.href = `cancel-componentanalysis.php?idanalysiscomponent=${idAnalysisComponent}&idanalysis=${idAnalysis}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- plugin JS -->
|
||||
<script src="../assets/js/jquery.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user