699 lines
36 KiB
PHP
699 lines
36 KiB
PHP
<?php
|
|
include('include/headscript.php'); ?>
|
|
<?php
|
|
$codeposition='7';
|
|
// pickup the get variable
|
|
if (isset($_GET["idtrf"])) {
|
|
$idtrf=$_GET["idtrf"];
|
|
}
|
|
if (isset($_POST["idtrf"])) {
|
|
$idtrf=$_POST["idtrf"];
|
|
}
|
|
if (isset($_POST["descriptionpartvalue"])) {
|
|
$descriptionpartvalue=$_POST["descriptionpartvalue"];
|
|
} else {
|
|
$descriptionpartvalue="";
|
|
}
|
|
if (isset($_POST["articlepartvalue"])) {
|
|
$articlepartvalue=$_POST["articlepartvalue"];
|
|
} else {
|
|
$articlepartvalue="";
|
|
}
|
|
if (isset($_POST["materialpartvalue"])) {
|
|
$materialpartvalue=$_POST["materialpartvalue"];
|
|
} else {
|
|
$materialpartvalue="";
|
|
}
|
|
if (isset($_POST["colorvalue"])) {
|
|
$colorvalue=$_POST["colorvalue"];
|
|
} else {
|
|
$colorvalue="";
|
|
}
|
|
if (isset($_POST["cmcreportnumber"])) {
|
|
$cmcreportnumber=$_POST["cmcreportnumber"];
|
|
} else {
|
|
$cmcreportnumber="";
|
|
}
|
|
if (isset($_POST["cmcdatereport"])) {
|
|
$cmcdatereport=$_POST["cmcdatereport"];
|
|
} else {
|
|
$cmcdatereport="";
|
|
}
|
|
if (isset($_POST["reportof"])) {
|
|
$reportof=$_POST["reportof"];
|
|
} else {
|
|
$reportof="";
|
|
}
|
|
if (isset($_POST["trdreportnumber"])) {
|
|
$trdreportnumber=$_POST["trdreportnumber"];
|
|
} else {
|
|
$trdreportnumber="";
|
|
}
|
|
if (isset($_POST["trddatereport"])) {
|
|
$trddatereport=$_POST["trddatereport"];
|
|
} else {
|
|
$trddatereport="";
|
|
}
|
|
if (isset($_POST["kindoftest"])) {
|
|
$kindoftest=$_POST["kindoftest"];
|
|
} else {
|
|
$kindoftest="";
|
|
}
|
|
if (isset($_POST["arttypeid"])) {
|
|
$arttypeid=$_POST["arttypeid"];
|
|
} else {
|
|
$arttypeid="";
|
|
}
|
|
if (isset($_POST["partid"])) {
|
|
$partid=$_POST["partid"];
|
|
} else {
|
|
$partid=""; }
|
|
if (isset($_POST["useridn"])) {
|
|
$useridn=$_POST["useridn"];
|
|
} else {
|
|
$useridn=""; }
|
|
if (isset($_POST["companyidn"])) {
|
|
$companyidn=$_POST["companyidn"];
|
|
} else {
|
|
$companyidn="";
|
|
}
|
|
if (isset($_POST["addpart"])) {
|
|
$addpart=$_POST["addpart"];
|
|
} else {
|
|
$addpart="";
|
|
}
|
|
|
|
|
|
$todaydate=date("Y-m-d");
|
|
|
|
if (isset($_GET["codestep"])) {
|
|
$code="7";
|
|
|
|
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
|
|
$InsertQuery->Action = "insert";
|
|
$InsertQuery->Table = "wheretrfstep";
|
|
$InsertQuery->bindColumn("idtrf", "i", "$idtrf", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("code", "i", "$code", "WA_DEFAULT");
|
|
$InsertQuery->saveInSession("");
|
|
$InsertQuery->execute();
|
|
$InsertGoTo = "";
|
|
|
|
$InsertQuery->redirect($InsertGoTo);
|
|
}
|
|
?>
|
|
<?php
|
|
$trfnumberfinal = new WA_MySQLi_RS("trfnumberfinal", $cmctrfdb, 1);
|
|
$trfnumberfinal->setQuery("SELECT * FROM `trf-details` WHERE `trf-details`.idtrfdetails='$idtrf'");
|
|
$trfnumberfinal->execute();
|
|
$idcertn=$trfnumberfinal->getColumnVal("idcertification");
|
|
$idarticletype=$trfnumberfinal->getColumnVal("idarticletype");
|
|
?>
|
|
<?php $idcert=$trfnumberfinal->getColumnVal("idcertification") ?>
|
|
<?php
|
|
$certname = new WA_MySQLi_RS("certname", $cmctrfdb, 1);
|
|
$certname->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcert'");
|
|
$certname->execute();?>
|
|
<?php
|
|
if ($addpart=="Y") {
|
|
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
|
|
$InsertQuery->Action = "insert";
|
|
$InsertQuery->Table = "identificationparts";
|
|
$InsertQuery->bindColumn("description_identificationparts", "s", "$descriptionpartvalue", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("article_identificationparts", "s", "$articlepartvalue", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("material_identificationparts", "s", "$materialpartvalue", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("color_identificationparts", "s", "$colorvalue", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("cmcreportnumber_identificationparts", "s", "$cmcreportnumber", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("cmcreportdate_identificationparts", "t", "$cmcdatereport", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("reportof", "s", "$reportof", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("idtrfdetails", "i", "$idtrf", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("kindoftest", "s", "$kindoftest", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("partsidnumber", "i", "$partid", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("arttypeid", "i", "$arttypeid", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("useridn", "i", "$useridn", "WA_DEFAULT");
|
|
$InsertQuery->bindColumn("companyidn", "i", "$companyidn", "WA_DEFAULT");
|
|
$InsertQuery->saveInSession("");
|
|
$InsertQuery->execute();
|
|
$InsertGoTo = "";
|
|
|
|
$InsertQuery->redirect($InsertGoTo);
|
|
}
|
|
?>
|
|
<?php
|
|
$listinsertedpart = new WA_MySQLi_RS("listinsertedpart", $cmctrfdb, 0);
|
|
$listinsertedpart->setQuery("SELECT * FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf' ORDER BY identificationparts.partsidnumber ");
|
|
$listinsertedpart->execute();
|
|
?>
|
|
<?php
|
|
// Definisci la variabile $conn come connessione al database
|
|
$connpart = mysqli_connect($hostname_cmctrfdb, $username_cmctrfdb, $password_cmctrfdb, $database_cmctrfdb);
|
|
|
|
// Esegui la query SQL per selezionare i dati
|
|
$searchhighlightpart = "SELECT DISTINCT partsidnumber FROM identificationparts WHERE identificationparts.idtrfdetails='$idtrf'";
|
|
$resultpart = mysqli_query($connpart, $searchhighlightpart);
|
|
|
|
// Crea un array vuoto per contenere i dati
|
|
//$partids = array();
|
|
|
|
?>
|
|
|
|
|
|
<?php
|
|
// Scansiona i risultati della query e aggiungi i valori della colonna "partid" all'array
|
|
while ($row = mysqli_fetch_assoc($resultpart)) {
|
|
$partids[] = $row['partsidnumber'];
|
|
}
|
|
$partids[]='0';
|
|
// Stampa l'array per verificare i valori
|
|
|
|
|
|
?>
|
|
|
|
|
|
<?php if ($idcertn=='2') {
|
|
header("Location: adddocument.php?idtrf=$idtrf");
|
|
} elseif ($idcertn=='4' ) {
|
|
header("Location: adddocument.php?idtrf=$idtrf");
|
|
}
|
|
?>
|
|
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>TRF CIMAC </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
<meta content="CIMAC TRF Portal" name="description" />
|
|
<meta content="" name="author" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<!-- App favicon -->
|
|
<link rel="shortcut icon" href="../images/favicon.ico">
|
|
<!--Form Wizard-->
|
|
<link href="../plugins/jquery-steps/jquery.steps.css" rel="stylesheet" type="text/css">
|
|
<!-- App css -->
|
|
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="assets/css/jquery-ui.min.css" rel="stylesheet">
|
|
<link href="assets/css/icons.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="assets/css/metisMenu.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="assets/css/app.min.css" rel="stylesheet" type="text/css" />
|
|
<!-- Sweet Alert -->
|
|
<link href="../plugins/sweet-alert2/sweetalert2.min.css" rel="stylesheet" type="text/css">
|
|
<link href="../plugins/animate/animate.css" rel="stylesheet" type="text/css">
|
|
<link href="../plugins/spectrum/spectrum.min.css" rel="stylesheet" type="text/css">
|
|
<!-- Plugins css -->
|
|
<link href="../plugins/daterangepicker/daterangepicker.css" rel="stylesheet" />
|
|
<link href="../plugins/select2/select2.min.css" rel="stylesheet" type="text/css" />
|
|
<link href="../plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.css" rel="stylesheet" type="text/css" />
|
|
<link href="../plugins/timepicker/bootstrap-material-datetimepicker.css" rel="stylesheet">
|
|
<link href="../plugins/bootstrap-touchspin/css/jquery.bootstrap-touchspin.min.css" rel="stylesheet" />
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.6/dist/sweetalert2.min.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10.16.6/dist/sweetalert2.min.js"></script>
|
|
|
|
<!-- submit form with button -->
|
|
<script>
|
|
function formSubmit() {
|
|
document.forms["myFormone"].submit();
|
|
}
|
|
function setInputVal(id, value) {
|
|
let input = document.getElementById(id);
|
|
input.value = value;
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
img[usemap] {
|
|
border: none;
|
|
height: auto;
|
|
max-width: 90%;
|
|
width: auto;}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<!-- Top Bar Start -->
|
|
<?php include('include/topbar.php'); ?>
|
|
<!-- Top Bar End -->
|
|
<!-- Left Sidenav -->
|
|
<?php include('include/leftsidenav.php'); ?>
|
|
<!-- end left-sidenav-->
|
|
<div class="page-wrapper">
|
|
<!-- Page Content-->
|
|
<div class="page-content">
|
|
<div class="container-fluid">
|
|
<!-- Page-Title -->
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="page-title-box">
|
|
<div class="float-right">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item"><a href="javascript:void(0);">TRF</a></li>
|
|
<li class="breadcrumb-item active">Starter</li>
|
|
</ol>
|
|
</div>
|
|
<h4 class="page-title"><?php echo $titlewb; ?></h4>
|
|
</div>
|
|
<!--end page-title-box-->
|
|
</div>
|
|
<!--end col-->
|
|
</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-->
|
|
<div class="progress mb-4">
|
|
<div class="progress-bar" role="progressbar" style="width: 90%;" aria-valuenow="90" aria-valuemin="0" aria-valuemax="100">90%</div>
|
|
</div>
|
|
<!-- card for additional info gloves -->
|
|
<!-- card for show requirements -->
|
|
|
|
|
|
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h4 class="mt-0 header-title"><?php echo $newtesttitle; ?> <i class="fas fa-info-circle" data-toggle="modal" data-animation="bounce" data-target=".bs-example-modal-center5"></i></h4>
|
|
|
|
<div class="modal fade bs-example-modal-center5" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title mt-0" id="exampleModalLabel"><?php echo $m18btitle; ?></h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p><?php echo nl2br($newtestparthelp); ?>
|
|
</p>
|
|
</div>
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div><!-- /.modal -->
|
|
|
|
<p class="text-muted mb-3"><?php echo $newtesttitle_help; ?>
|
|
</p>
|
|
<form class="was-validated" action="" method="post" name="myFormone">
|
|
<!-- image section -->
|
|
<?php include('include/maparticle.php'); ?>
|
|
<!-- div new parts -->
|
|
<div class="form-row">
|
|
<div class="col-md-4 mb-3">
|
|
<label for="validationServer01"><?php echo $whichkindofpart; ?></label>
|
|
<select class="form-control" name="kindoftest" id ="combo">
|
|
<option value="new"><?php echo $newpartlist; ?></option>
|
|
<option value="cmc"><?php echo $cmctesttitle; ?></option>
|
|
<option value="trd" ><?php echo $trdpartlist; ?></option>
|
|
</select>
|
|
</div></div>
|
|
<div class="form-row">
|
|
<div class="col-md-4 mb-3">
|
|
<label for="validationServer01"><?php echo $reportnumbercmctitle; ?></label>
|
|
<input type="text" class="form-control is-valid" id="cmcreportnumber" name="cmcreportnumber" placeholder="<?php echo $reportnumbercmctitle; ?>"disabled >
|
|
</div>
|
|
<div class="col-md-4 mb-3">
|
|
<label for="validationServerUsername"><?php echo $datereporttitle; ?></label>
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
</div>
|
|
<input type="date" required="" onkeydown="return false" class="form-control" id="cmcdatereport" name="cmcdatereport" onchange="validateDate(this.value)" min="2000-01-01" max="<?php echo $todaydate; ?>" disabled value="">
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 mb-3">
|
|
<label for="validationServer01"><?php echo $reportoftitle; ?></label>
|
|
<input type="text" class="form-control is-valid" id="reportof" name="reportof" placeholder="<?php echo $reportoftitle; ?>" value="<?php echo $companyData["companyname_company"]; ?>" disabled>
|
|
</div>
|
|
</div>
|
|
<div class="form-row">
|
|
<div class="col-md-3 mb-2">
|
|
<label for="validationServer01"><?php echo $descriptionpart; ?> </label>
|
|
|
|
<input type="text" class="form-control is-valid" id="descriptionpartvalue" name="descriptionpartvalue" placeholder="<?php echo $descriptionpart; ?>" required="">
|
|
|
|
</div>
|
|
|
|
<div class="col-md-3 mb-2">
|
|
<label for="validationServer02"><?php echo $articlepart; ?></label>
|
|
<i class="fas fa-info-circle" data-toggle="modal" data-animation="bounce" data-target=".bs-example-modal-center5"></i>
|
|
<input type="text" class="form-control is-valid" id="articlepartvalue" name="articlepartvalue" placeholder="<?php echo $articlepart; ?>" required="">
|
|
<b>Ex: </b><i><?php echo $searchsentence; ?></i>
|
|
</div>
|
|
|
|
<input type="hidden" id="partid" name="partid">
|
|
<input type="hidden" id="arttypeid" name="arttypeid" value="<?php echo $idarticletype; ?>">
|
|
<input type="hidden" id="useridn" name="useridn" value="<?php echo $iduserlog; ?>">
|
|
<input type="hidden" id="companyidn" name="companyidn" value="<?php echo $idcompany; ?>">
|
|
<div class="col-md-3 mb-2">
|
|
<label for="validationServer01"><?php echo $descriptionitem; ?> </label>
|
|
<i class="fas fa-info-circle" data-toggle="modal" data-animation="bounce" data-target=".bs-example-modal-center5"></i>
|
|
<input type="text" class="form-control is-valid" id="materialpartvalue" name="materialpartvalue" placeholder="<?php echo $descriptionitem; ?>" required="">
|
|
</div>
|
|
<div class="modal fade bs-example-modal-center5" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title mt-0" id="exampleModalLabel"><?php echo $m18btitle; ?></h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p><?php echo $articlealert; ?><br><br>
|
|
|
|
</p>
|
|
</div>
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-dialog -->
|
|
</div><!-- /.modal -->
|
|
|
|
<div class="col-md-3 mb-2">
|
|
<label for="validationServerUsername"><?php echo $colorpart; ?></label>
|
|
|
|
<div class="input-group">
|
|
<div class="input-group-prepend">
|
|
</div>
|
|
<input id="colorvalue" name="colorvalue" class="form-control" type="text" placeholder="<?php echo $colorpart; ?>" aria-describedby="inputGroupPrepend3" required="">
|
|
<!-- <script>
|
|
|
|
setTimeout(function(){
|
|
$("#colorvalue").spectrum({
|
|
showPalette: true,
|
|
showPaletteOnly: true,
|
|
palette: [
|
|
["Red","Cyan","Blue","DarkBlue","LightBlue","Purple"],
|
|
["Yellow","Lime","Magenta","Pink","White","Silver"],
|
|
["Gray","Black","Orange","Brown","Green"],
|
|
["Olive","Aquamarine"]
|
|
]
|
|
});
|
|
}, 1000);
|
|
</script> -->
|
|
|
|
|
|
|
|
<input type="hidden" name="idtrf" id="idtrf" value="<?php echo($trfnumberfinal->getColumnVal("idtrfdetails")); ?>">
|
|
|
|
<input type="hidden" name="addpart" id="addpart" value="Y">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="display"></div>
|
|
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $addpartbutton; ?>">
|
|
</form>
|
|
|
|
</div>
|
|
<!--end card-body-->
|
|
</div>
|
|
|
|
<!-- end -->
|
|
<script>
|
|
function formSubmit2() {
|
|
document.forms["myFormtwo"].submit();
|
|
}
|
|
</script>
|
|
<!-- div CMC parts -->
|
|
|
|
<!--end card-->
|
|
</div>
|
|
<!--end col-->
|
|
<!-- show the parts -->
|
|
<div class="col-lg-12">
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h4 class="mt-0 header-title"><?php echo $assignedparts; ?></h4>
|
|
<p class="text-muted mb-6"><?php echo $assignedparts_help; ?>
|
|
</p>
|
|
<style media="screen">
|
|
.hidden-x {
|
|
display: none!important;
|
|
}
|
|
</style>
|
|
<div id="datatable_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<table id="datatable" class="table table-bordered dt-responsive nowrap dataTable no-footer dtr-inline" style="border-collapse: collapse; border-spacing: 0px; width: 100%;" role="grid" aria-describedby="datatable_info">
|
|
<thead>
|
|
<tr role="row">
|
|
<th class="sorting_asc" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 149px" aria-sort="ascending" aria-label="Name: activate to sort column descending">
|
|
N.
|
|
</th>
|
|
<th class="sorting_asc" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 149px" aria-sort="ascending" aria-label="Name: activate to sort column descending">
|
|
<?php echo $kindpart; ?>
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 230px" aria-label="Position: activate to sort column ascending">
|
|
Parte
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 108px" aria-label="Office: activate to sort column ascending">
|
|
<?php echo $articlepartlist; ?>
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 108px" aria-label="Office: activate to sort column ascending">
|
|
Descrizione
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 45px" aria-label="Age: activate to sort column ascending">
|
|
<?php echo $colorpartlist; ?>
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 97px" aria-label="Start date: activate to sort column ascending">
|
|
<?php echo $reportlist; ?>
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 75px" aria-label="Salary: activate to sort column ascending">
|
|
<?php echo $datereportlist; ?>
|
|
</th>
|
|
<th class="sorting" tabindex="0" aria-controls="datatable" rowspan="1" colspan="1" style="width: 75px" aria-label="Salary: activate to sort column ascending">
|
|
<?php echo $action; ?>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$wa_startindex = 0;
|
|
while (!$listinsertedpart->atEnd()) {
|
|
$wa_startindex = $listinsertedpart->Index; ?>
|
|
<tr role="row" class="odd">
|
|
<td tabindex="0" class="sorting_1" style="width:5%">
|
|
<span class="text-x"><?php echo($listinsertedpart->getColumnVal("partsidnumber")); ?></span>
|
|
<span class="input-x hidden-x">
|
|
<input type="text" class="form-control" name="partsidnumber" value="<?php echo($listinsertedpart->getColumnVal("partsidnumber")); ?>">
|
|
</span>
|
|
</td>
|
|
<td tabindex="0" class="sorting_1">
|
|
<span class="text-x"><?php if (($listinsertedpart->getColumnVal("kindoftest"))=='new') { echo $newpartlist; }
|
|
if (($listinsertedpart->getColumnVal("kindoftest"))=='cmc') { echo $cmcpartlist; }
|
|
if (($listinsertedpart->getColumnVal("kindoftest"))=='trd') { echo $trdpartlist; } ?> </span>
|
|
<span class="input-x hidden-x">
|
|
|
|
<input type="text" class="form-control" name="kindoftest" value="<?php echo($listinsertedpart->getColumnVal("kindoftest")); ?>">
|
|
|
|
|
|
<input type="hidden" class="form-control" name="ididentificationparts" value="<?php echo($listinsertedpart->getColumnVal("ididentificationparts")); ?>">
|
|
<input type="hidden" class="form-control" name="idtrfdetails" value="<?php echo($listinsertedpart->getColumnVal("idtrfdetails")); ?>">
|
|
</span>
|
|
</td>
|
|
|
|
<td tabindex="0" class="sorting_1">
|
|
<span class="text-x"><?php echo($listinsertedpart->getColumnVal("description_identificationparts")); ?></span>
|
|
<span class="input-x hidden-x">
|
|
<input type="text" class="form-control" name="description_identificationparts" value="<?php echo($listinsertedpart->getColumnVal("description_identificationparts")); ?>">
|
|
</span>
|
|
</td>
|
|
<td tabindex="0" class="sorting_1">
|
|
<span class="text-x"><?php echo($listinsertedpart->getColumnVal("article_identificationparts")); ?></span>
|
|
<span class="input-x hidden-x">
|
|
<input type="text" class="form-control" name="article_identificationparts" value="<?php echo($listinsertedpart->getColumnVal("article_identificationparts")); ?>">
|
|
</span>
|
|
</td>
|
|
<td tabindex="0" class="sorting_1">
|
|
<span class="text-x"><?php echo($listinsertedpart->getColumnVal("material_identificationparts")); ?></span>
|
|
<span class="input-x hidden-x">
|
|
<input type="text" class="form-control" name="material_identificationparts" value="<?php echo($listinsertedpart->getColumnVal("material_identificationparts")); ?>">
|
|
</span>
|
|
</td>
|
|
<td tabindex="0" class="sorting_1">
|
|
<span class="text-x"><?php echo($listinsertedpart->getColumnVal("color_identificationparts")); ?></span>
|
|
<span class="input-x hidden-x">
|
|
<input type="text" class="form-control" name="color_identificationparts" value="<?php echo($listinsertedpart->getColumnVal("color_identificationparts")); ?>">
|
|
</span>
|
|
</td>
|
|
<td tabindex="0" class="sorting_1">
|
|
<span class="text-x"><?php echo($listinsertedpart->getColumnVal("cmcreportnumber_identificationparts")); ?></span>
|
|
<span class="input-x hidden-x">
|
|
<input type="text" class="form-control" name="cmcreportnumber_identificationparts" value="<?php echo($listinsertedpart->getColumnVal("cmcreportnumber_identificationparts")); ?>">
|
|
</span>
|
|
|
|
<span class="input-x hidden-x">
|
|
|
|
</span>
|
|
</td>
|
|
|
|
<td tabindex="0" class="sorting_1">
|
|
<span class="text-x"><?php echo($listinsertedpart->getColumnVal("cmcreportdate_identificationparts")); ?></span>
|
|
<span class="input-x hidden-x">
|
|
<input type="date" class="form-control" name="cmcreportdate_identificationparts" value="<?php echo($listinsertedpart->getColumnVal("cmcreportdate_identificationparts")); ?>">
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<a href="deleteidentparts.php?ididentpart=<?php echo($listinsertedpart->getColumnVal("ididentificationparts")); ?>&idtrf=<?php echo $idtrf; ?>"><i class="fas fa-trash-alt text-danger font-16"></i></a>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
$listinsertedpart->moveNext();
|
|
}
|
|
$listinsertedpart->moveFirst(); //return RS to first record
|
|
unset($wa_startindex);
|
|
unset($wa_repeatcount);
|
|
?>
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
|
|
<?php
|
|
$totalparthighlight=array(1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20);
|
|
|
|
$diffparts = array_diff($totalparthighlight, $partids);
|
|
|
|
if (!empty($diffparts)) {
|
|
$partList = implode(", ", $diffparts);
|
|
|
|
echo '<button onclick="checkParts()" class="btn btn-success waves-effect waves-light">' . $nextsteptitle . '</button>';
|
|
|
|
echo '<script>
|
|
function checkParts() {
|
|
Swal.fire({
|
|
icon: "warning",
|
|
title: "Attenzione!",
|
|
text: "Le seguenti parti non sono state trovate: ' . $partList . '",
|
|
confirmButtonText: "Prosegui comunque",
|
|
showCancelButton: true,
|
|
cancelButtonText: "Aggiungi parti mancanti"
|
|
}).then((result) => {
|
|
if (result.isConfirmed) {
|
|
window.location.href = "adddocument.php?idtrf=' . $idtrf . '&codestep=7";
|
|
} else if (result.dismiss === Swal.close) {
|
|
alert("Aggiungi le parti mancanti");
|
|
}
|
|
});
|
|
}
|
|
</script>';
|
|
} else {
|
|
// Se non ci sono parti mancanti, non viene fatto un reindirizzamento automatico
|
|
// ma viene mostrato un bottone per procedere alla pagina "adddocument.php"
|
|
echo '<button onclick="goToNextPage()">Procedi alla prossima pagina</button>';
|
|
echo '<script>
|
|
function goToNextPage() {
|
|
window.location.href = "adddocument.php?idtrf=' . $idtrf . '&codestep=7";
|
|
}
|
|
</script>';
|
|
} ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-dark waves-effect waves-light" onclick="history.back()"><?php echo $backstep; ?></button>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- end page title end breadcrumb -->
|
|
</div>
|
|
<!-- container -->
|
|
<!-- footer start -->
|
|
|
|
</div>
|
|
<!-- end page content -->
|
|
</div>
|
|
<?php include('include/footer.php'); ?>
|
|
</footer><!--end footer-->
|
|
</div>
|
|
<!-- end page content -->
|
|
</div>
|
|
<!-- end page-wrapper -->
|
|
<script type="text/javascript">
|
|
function validateDate(date) {
|
|
var five_years_before_from_current = moment().subtract(5, 'years');
|
|
var selected_date = moment(date);
|
|
|
|
if (selected_date < five_years_before_from_current) {
|
|
alert('<?php echo $alertdate; ?>');
|
|
window.location.reload();
|
|
{
|
|
$("#newpart").addClass('show');
|
|
$("#cmcpart").removeClass('show');
|
|
$("#thirdpart").removeClass('show');
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
<!-- end page-wrapper -->
|
|
<!-- jQuery -->
|
|
|
|
<script src="assets/js/jquery.min.js"></script>
|
|
<script src="assets/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/metismenu.min.js"></script>
|
|
<script src="assets/js/waves.js"></script>
|
|
<script src="assets/js/feather.min.js"></script>
|
|
<script src="assets/js/jquery.slimscroll.min.js"></script>
|
|
<script src="assets/js/jquery-ui.min.js"></script>
|
|
<!-- Plugins js -->
|
|
<script src="../plugins/moment/moment.js"></script>
|
|
<script src="../plugins/daterangepicker/daterangepicker.js"></script>
|
|
<script src="../plugins/select2/select2.min.js"></script>
|
|
<script src="../plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
|
|
<script src="../plugins/timepicker/bootstrap-material-datetimepicker.js"></script>
|
|
<script src="../plugins/bootstrap-maxlength/bootstrap-maxlength.min.js"></script>
|
|
<script src="../plugins/bootstrap-touchspin/js/jquery.bootstrap-touchspin.min.js"></script>
|
|
<script src="../plugins/spectrum/spectrum.min.js"></script>
|
|
<!-- Sweet-Alert -->
|
|
|
|
<script src="assets/pages/jquery.forms-advanced.js"></script>
|
|
<script src="../plugins/jquery-steps/jquery.steps.min.js"></script>
|
|
<script src="assets/pages/jquery.form-wizard.init.js"></script>
|
|
<!-- App js -->
|
|
<script src="assets/js/app.js"></script>
|
|
|
|
<!--image map library -->
|
|
|
|
<!-- <script> src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> -->
|
|
<script src="mapsresize/jquery.rwdImageMaps.min.js"></script>
|
|
|
|
<!-- search on article -->
|
|
<!-- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> -->
|
|
<script type="text/javascript" src="searchengine/scriptsearch.js"></script>
|
|
|
|
<script>
|
|
$(document).ready(function(e) {
|
|
$('img[usemap]').rwdImageMaps();
|
|
|
|
$("#alertcertification").modal('show');
|
|
});
|
|
</script>
|
|
|
|
<script type="text/javascript">//<![CDATA[
|
|
|
|
|
|
$(document).on('change', '#combo', function(){
|
|
var shouldEnable = $(this).val() === 'new' ;
|
|
$('#cmcreportnumber').prop('disabled', shouldEnable);
|
|
$('#reportof').prop('disabled', shouldEnable);
|
|
$('#cmcdatereport').prop('disabled', shouldEnable);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
//]]></script>
|
|
</body>
|
|
</html>
|