ppeasy/public/typeofcertificatenew.php
2025-05-16 18:46:16 +02:00

1003 lines
64 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
include('include/headscript.php');
include('db-connect.php');
?>
<?php
// pickup the current time and add the userid to have a temporary code
?>
<!DOCTYPE html>
<html lang="en">
<!-- recover variables from form or link -->
<?php
$varcertificate = "";
if (isset($_GET['varcertificate'])) {
$varcertificate = $_GET['varcertificate'];
}
?>
<?php
$idcertificate = 0;
if (isset($_GET['idcertificate'])) {
$idcertificate = $_GET['idcertificate'];
}
?>
<?php //pickup variable post
if (isset($_POST["formname"])) {
$formname = $_POST["formname"];
}
if (isset($_POST["kindofcontacts"])) {
$kindofcontacts = $_POST["kindofcontacts"];
}
if (isset($_POST["companyname"])) {
$companyname = $_POST["companyname"];
}
if (isset($_POST["piva"])) {
$piva = $_POST["piva"];
}
if (isset($_POST["companyaddress"])) {
$companyaddress = $_POST["companyaddress"];
}
if (isset($_POST["city"])) {
$city = $_POST["city"];
}
if (isset($_POST["cap"])) {
$cap = $_POST["cap"];
}
if (isset($_POST["country"])) {
$country = $_POST["country"];
}
if (isset($_POST["telephone"])) {
$telephone = $_POST["telephone"];
}
if (isset($_POST["email"])) {
$email = $_POST["email"];
}
if (isset($_POST["contactname"])) {
$contactname = $_POST["contactname"];
}
if (isset($_POST["contactsurname"])) {
$contactsurname = $_POST["contactsurname"];
}
if (isset($_POST["tempcode"])) {
$tempcode = $_POST["tempcode"];
}
if (isset($_GET["formnameme"])) {
$formnameme = $_GET["formnameme"];
}
if (isset($_GET["kindofcontacts"])) {
$kindofcontacts = $_GET["kindofcontacts"];
}
if (isset($_GET["certotherclient"])) {
$_SESSION["certotherclientsession"] = $_GET["certotherclient"];
}
?>
<?php //redirect based on certificate
if ($idcertificate == 5) {
header("location: inserttrf.php?idcertificate=$idcertificate");
} ?>
<?php
if (isset($formname)) {
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "contacts";
$InsertQuery->bindColumn("kindofcontacts", "s", "$kindofcontacts", "WA_DEFAULT");
$InsertQuery->bindColumn("companyname", "s", "$companyname", "WA_DEFAULT");
$InsertQuery->bindColumn("piva", "s", "$piva", "WA_DEFAULT");
$InsertQuery->bindColumn("address", "s", "$companyaddress", "WA_DEFAULT");
$InsertQuery->bindColumn("city", "s", "$city", "WA_DEFAULT");
$InsertQuery->bindColumn("cap", "s", "$cap", "WA_DEFAULT");
$InsertQuery->bindColumn("country", "s", "$country", "WA_DEFAULT");
$InsertQuery->bindColumn("telephone", "s", "$telephone", "WA_DEFAULT");
$InsertQuery->bindColumn("email", "s", "$email", "WA_DEFAULT");
$InsertQuery->bindColumn("contactname", "s", "$contactname", "WA_DEFAULT");
$InsertQuery->bindColumn("contactsurname", "s", "$contactsurname", "WA_DEFAULT");
$InsertQuery->bindColumn("tempcode", "s", "$tempcode", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo ? rel2abs($InsertGoTo, dirname(__FILE__)) : "";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php
if (isset($formnameme)) {
$InsertQuery = new WA_MySQLi_Query($cmctrfdb);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "contacts";
$InsertQuery->bindColumn("kindofcontacts", "s", "$kindofcontacts", "WA_DEFAULT");
$InsertQuery->bindColumn("companyid", "s", "$idcompany", "WA_DEFAULT");
$InsertQuery->bindColumn("tempcode", "s", "$tempcode", "WA_DEFAULT");
$InsertQuery->saveInSession("");
$InsertQuery->execute();
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo ? rel2abs($InsertGoTo, dirname(__FILE__)) : "";
$InsertQuery->redirect($InsertGoTo);
}
?>
<?php // inline edit query
$idtrfdetails = '160';
$row1 = mysqli_query($con, "SELECT *,trfstandards.iddpicategory as iddpicategoryid,trfstandards.idprotectioncategory as idprotectioncategoryid,trfstandards.idstandards as idstandardsid FROM trfstandards LEFT JOIN standards ON trfstandards.idstandards=standards.idstandards LEFT JOIN dpicategory ON trfstandards.iddpicategory=dpicategory.iddpicategory LEFT JOIN protectioncategory ON trfstandards.idprotectioncategory=protectioncategory.idprotectioncategory WHERE trfstandards.idtrfdetails='$idtrfdetails'");
$idstandards = mysqli_query($con, "SELECT idstandards ,standardname FROM standards");
//query list protectioncategory
$proteccategorylist = mysqli_query($con, "SELECT idprotectioncategory ,name_protectioncategory FROM protectioncategory");
$idproteccategorylistRecord = array();
while ($idprotectioncategoryrow = mysqli_fetch_assoc($proteccategorylist)) {
$idproteccategorylistRecord[$idprotectioncategoryrow['idprotectioncategory']] = $idprotectioncategoryrow['name_protectioncategory'];
}
$idprotectioncategoryJson = json_encode($idproteccategorylistRecord);
//query list protectioncategory
$dpicategroylist = mysqli_query($con, "SELECT iddpicategory ,value_dpicategory FROM dpicategory");
$iddpicategorylistRecord = array();
while ($iddpicategoryrow = mysqli_fetch_assoc($dpicategroylist)) {
$iddpicategorylistRecord[$iddpicategoryrow['iddpicategory']] = $iddpicategoryrow['value_dpicategory'];
}
$iddpicategoryJson = json_encode($iddpicategorylistRecord);
?>
<head>
<meta charset="utf-8" />
<title><?php echo $titlepage; ?></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" />
<script>
function formSubmit() {
document.forms["myForm"].submit();
}
</script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<script>
function showshow1() {
document.getElementById('div1').style.display = 'none';
}
function show2() {
document.getElementById('div1').style.display = 'block';
}
function show3() {
document.getElementById('div3').style.display = 'none';
}
function show4() {
document.getElementById('div3').style.display = 'block';
}
function show5() {
document.getElementById('div5').style.display = 'none';
}
function show6() {
document.getElementById('div5').style.display = 'block';
}
</script>
<script>
$(document).ready(function() {
$("#alertcertification").modal('show');
});
</script>
<link rel="stylesheet" href="../webassist/jq_validation/Serene.css" />
<style>
.btn-custom-dark {
background-color: #1E40AF;
/* Blu scuro */
border: none;
transition: background-color 0.3s ease;
padding: 20px 15px;
/* Aumentato il padding verticale */
}
.btn-custom-dark:hover {
background-color: rgb(37, 70, 160);
}
.btn-custom-light {
background-color: #3B82F6;
/* Blu chiaro */
border: none;
transition: background-color 0.3s ease;
padding: 20px 15px;
/* Aumentato il padding verticale */
}
.btn-custom-light:hover {
background-color: #60A5FA;
}
.btn-custom-darkbl {
background-color: rgb(9, 0, 61);
/* Verde */
border: none;
transition: background-color 0.3s ease;
padding: 20px 15px;
/* Aumentato il padding verticale */
}
.btn-custom-lightbl {
background-color: rgb(134, 182, 255);
/* Verde */
border: none;
transition: background-color 0.3s ease;
padding: 20px 15px;
/* Aumentato il padding verticale */
}
.btn-custom-green {
background-color: #10B981;
/* Verde */
border: none;
transition: background-color 0.3s ease;
padding: 20px 15px;
/* Aumentato il padding verticale */
}
.btn-custom-green:hover {
background-color: #34D399;
}
.btn-custom-orange {
background-color: rgb(211, 137, 9);
/* Arancione */
border: none;
transition: background-color 0.3s ease;
padding: 20px 15px;
/* Aumentato il padding verticale */
}
.btn-custom-orange:hover {
background-color: #D97706;
}
.btn-custom-gray {
background-color: rgb(28, 83, 192);
/* Grigio */
border: none;
transition: background-color 0.3s ease;
padding: 20px 15px;
/* Aumentato il padding verticale */
}
.btn-custom-gray:hover {
background-color: #4B5563;
}
.uniform-height {
min-height: 80px;
/* Altezza minima uniforme */
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
@media (max-width: 767.98px) {
.uniform-height {
min-height: 60px;
/* Altezza ridotta su mobile per adattarsi */
}
}
</style>
</head>
<body>
<!-- Alert certificate routine -->
<?php if ($varcertificate != 'md') {
include('include/alertcert.php');
} ?>
<!-- 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);"><?php echo $titlepage; ?> <?php //echo $tempcode;
?></a></li>
<li class="breadcrumb-item active">Starter</li>
</ol>
</div>
<h3 class="page-title"><?php echo $titlewb; ?></h3>
</div><!--end page-title-box-->
</div><!--end col-->
</div>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<!-- certificate 1st question-->
<?php if ($varcertificate == "md") { ?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 5%;" aria-valuenow="5" aria-valuemin="0" aria-valuemax="100">5%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $insertintermediatecontact; ?></h4>
<?php echo $fabbricantehelp; ?><br><br>
<form action="typeofcertificate.php?varcertificate=0" method="post" class="was-validated">
<!-- intermediate means that the certificate is request for the intermediate -->
<?php $kindofcontacts = "intermediate";
include('include/contactform.php'); ?>
</form>
</div>
<?php } ?>
<!-- certificate 1st questioon-->
<?php if ($varcertificate == "0") { ?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 5%;" aria-valuenow="5" aria-valuemin="0" aria-valuemax="100">5%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $questionm16m30s; ?></h4>
<p><?php echo $questionm16m30s_help; ?></p>
<a href="typeofcertificate.php?varcertificate=1"> <button type="button" class="btn btn-success waves-effect waves-light"><?php echo $yes; ?></button></a>
<a href="typeofcertificate.php?varcertificate=m"><button type="button" class="btn btn-danger waves-effect waves-light"><?php echo $no; ?></button></a>
</div>
<?php } ?>
<!-- certificate m16 + m30s -->
<?php if ($varcertificate == "1") { ?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 20%;" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem16m30svar; ?> <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">&times;</span>
</button>
</div>
<div class="modal-body">
<p><?php echo $variationhelp_ia; ?><br><br>
<?php echo $variationhelp_ib; ?><br><br>
<?php echo $variationhelp_ic; ?>
</p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<p><?php echo $certificatem16m30s_help; ?></p>
<a href="typeofcertificate.php?varcertificate=1b&idcertificate=7"> <button type="button" class="btn btn-success waves-effect waves-light"><?php echo $yes; ?></button></a>
<a href="inserttrf.php?varcertificate=1a&idcertificate=1&tempcode=<?php echo $tempcode; ?>"><button type="button" class="btn btn-danger waves-effect waves-light"><?php echo $no; ?></button></a>
</div>
<?php } ?>
<!-- certificate multiple certificate -->
<?php if ($varcertificate == "m") { ?>
<div class="row">
<div class="col-sm-12">
<div class="card">
<div class="card-body">
<h3 class="mt-0"><?php echo $selectnewrequest; ?></h3>
<br>
<form action="inserttrf.php" method="get" name="myForm" id="myForm">
<div class="form-group row">
<div class="col-md-12">
<div class="row">
<!-- Tasto 1: Nuovo Modulo -->
<div class="col-12 col-md-4 mb-3">
<a href="typeofcertificate.php?varcertificate=1" class="btn btn-custom-darkbl btn-lg btn-block text-white uniform-height">
<?php echo $newmoduleb; ?>
</a>
<p class="mb-1 font-weight-bold"><?php echo $button1help; ?></p>
<div class="modal fade bs-example-modal-center2" 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 $m15Bm30Stitle; ?></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 $m15Bm30Stitle_help; ?></p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
<!-- Tasto 1: Revisione Certificato (Blu Scuro) M15B+M30S-->
<div class="col-12 col-md-4 mb-3">
<a href="inserttrf.php?idcertificate=3" class="btn btn-custom-lightbl btn-lg btn-block text-white uniform-height">
<?php echo $revisecertificate; ?>
</a>
<p class="mb-1 font-weight-bold"><?php echo $button2help; ?> </p>
<div class="modal fade bs-example-modal-center2" 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 $m15Bm30Stitle; ?></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 $m15Bm30Stitle_help; ?></p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
<!-- Tasto 2: Certificato con Modifica (Blu Chiaro) M15D+M30S -->
<div class="col-12 col-md-4 mb-3">
<a href="inserttrf.php?idcertificate=8" class="btn btn-custom-light btn-lg btn-block text-white uniform-height">
<?php echo $m15dtitle; ?>
</a>
<p class="mb-1 font-weight-bold "><?php echo $button3help; ?> </p>
<div class="modal fade bs-example-modal-center2" 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 $m15dm30Stitle; ?></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 $m15dm30Stitle_help; ?></p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
<!-- Dopo il terzo tasto -->
<div class="col-12 my-4"></div>
<!-- Tasto 3: Estensione Certificato (Verde) M15A+M30S -->
<div class="col-12 col-md-4 mb-3">
<a href="inserttrf.php?idcertificate=4" class="btn btn-custom-gray btn-lg btn-block text-white uniform-height">
<?php echo $extendcertificate; ?>
</a>
<p class="mb-1 font-weight-bold"><?php echo $button4help; ?> </p>
<div class="modal fade bs-example-modal-center3" 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 $m15am30stitle; ?></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 $m15am30stitle_help; ?></p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
<!-- Tasto 4: Sorveglianza Modulo C (Arancione) M18A-->
<div class="col-12 col-md-4 mb-3">
<a href="inserttrf.php?idcertificate=5" class="btn btn-custom-green btn-lg btn-block text-white uniform-height">
<?php echo $surveillancemodulec; ?>
</a>
<p class="mb-1 font-weight-bold "><?php echo $button5help; ?> </p>
<div class="modal fade bs-example-modal-center4" 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 $m18atitle; ?></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 $m18atitle_help; ?></p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
<!-- Tasto 5: Sorveglianza Modulo D (Grigio) M18B-->
<div class="col-12 col-md-4 mb-3">
<a href="inserttrf.php?idcertificate=6" class="btn btn-custom-orange btn-lg btn-block text-white uniform-height">
<?php echo $surveillancemoduled; ?>
</a>
<p class="mb-1 font-weight-bold"><?php echo $button6help; ?> </p>
<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 $m18btitle_help; ?></p>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
</div>
</div>
</div>
</div>
</form>
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<?php } ?>
<!-- section confirm certificate -->
<!-- certificate m16 + m30s -->
<?php if ($idcertificate == "1") { ?>
<?php
$certtype = new WA_MySQLi_RS("certtype", $cmctrfdb, 1);
$certtype->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certtype->execute();
?>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem16m30s; ?></h4>
<p><?php echo $certificatem16m30s_help; ?></p>
<form action="trfdetails.php" method="get" name="myForm">
<input name="certtype" type="hidden" id="certtype" value="<?php echo ($certtype->getColumnVal("idcertificationtype")); ?>">
<input name="tempcode" type="hidden" id="tempcode" value="<?php echo $tempcode; ?>">
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">
</form>
</div>
<?php } ?> <!-- close confirm -->
<!-- certificate m16 + m30s var -->
<?php if ($idcertificate == "7") { ?>
<?php
$certtype = new WA_MySQLi_RS("certtype", $cmctrfdb, 1);
$certtype->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certtype->execute();
?>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem16m30sb; ?></h4>
<p><?php echo $certificatem16m30sb_help; ?></p>
<form action="trfdetails.php" method="get" name="myForm" class="needs-validation" novalidate>
<input name="certtype" type="hidden" id="certtype" value="<?php echo ($certtype->getColumnVal("idcertificationtype")); ?>">
<input name="tempcode" type="hidden" id="tempcode" value="<?php echo $tempcode; ?>">
<?php echo $prevcertificatehelp; ?><br>
<br>
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo $previosurepnumbertitle; ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="previousrepnumber" name="previousrepnumber" required>
</div>
</div>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">
</form>
</div>
<?php } ?> <!-- close confirm -->
<!-- confirm certificate M15C -->
<?php if ($idcertificate == "2") { ?>
<?php
$certtype = new WA_MySQLi_RS("certtype", $cmctrfdb, 1);
$certtype->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certtype->execute();
?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 20%;" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem15c; ?></h4>
<p><?php echo $certificatem15c_help; ?></p>
<form action="trfdetails.php" method="get" name="myForm" enctype="multipart/form-data">
<input name="certtype" type="hidden" id="certtype" value="<?php echo ($certtype->getColumnVal("idcertificationtype")); ?>">
<input name="tempcode" type="hidden" id="tempcode" value="<?php echo $tempcode; ?>">
<br>
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo $previosurepnumbertitlem15c; ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="previousrepnumber" name="previousrepnumber">
</div>
</div>
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo $notificatedorganismtitle; ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="notificatedorganismname" name="notificatedorganismname" value="CIMAC"><br>
</div>
</div>
<input type="hidden" id="filedescription" name="filedescription" value="certificate">
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo $selectfilecertificate; ?></label>
<div class="col-sm-3">
<input type="file" name="doc[]" id="fileInput">
</div>
</div>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">
</form>
</div>
<?php } ?> <!-- close confirm -->
<!-- confirm certificate M15B + M30S -->
<?php if ($idcertificate == "3") { ?>
<?php
$certtype = new WA_MySQLi_RS("certtype", $cmctrfdb, 1);
$certtype->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certtype->execute();
?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 20%;" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem15bm30s; ?></h4>
<p><?php echo $certificatem15bm30s_help; ?></p>
<form action="trfdetails.php" method="get" name="myForm">
<input name="certtype" type="hidden" id="certtype" value="<?php echo ($certtype->getColumnVal("idcertificationtype")); ?>">
<input name="tempcode" type="hidden" id="tempcode" value="<?php echo $tempcode; ?>">
<?php echo $prevcertificatehelp; ?><br>
<br>
<div class="form-group row">
<label for="example-text-input" class="col-sm-5 col-form-label text-right"><?php echo $previosurepnumbertitlem15bm30s; ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="previousrepnumber" name="previousrepnumber">
</div>
</div>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">
</form>
</div>
<?php } ?> <!-- close confirm -->
<!-- confirm certificate M15A +M30S -->
<?php if ($idcertificate == "4") { ?>
<?php
$certtype = new WA_MySQLi_RS("certtype", $cmctrfdb, 1);
$certtype->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certtype->execute();
?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 20%;" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem15am30s; ?></h4>
<p><?php echo $certificatem15am30s_help; ?></p>
<form action="trfdetails.php" method="get" name="myForm">
<input name="certtype" type="hidden" id="certtype" value="<?php echo ($certtype->getColumnVal("idcertificationtype")); ?>">
<input name="tempcode" type="hidden" id="tempcode" value="<?php echo $tempcode; ?>">
<?php echo $prevcertificatehelp; ?><br>
<br>
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo $previosurepnumbertitlem15am30s; ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="previousrepnumber" name="previousrepnumber">
</div>
</div>
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo $previosurepnumbertitlem15am30s_ext; ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="toextend" name="toextend" value="<?php echo $companyname; ?>"><br>
</div>
</div>
<label for="example-text-input" class="col-sm-7 col-form-label text-right"><?php echo $authorizetitle; ?></label><br>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $yestitle; ?>">
<a href="typeofcertificate.php?varcertificate=0" class="btn btn-danger"><?php echo $notitle; ?></a>
</form>
</div>
<?php } ?> <!-- close confirm -->
<!-- confirm certificate M18A -->
<?php if ($idcertificate == "5") { ?>
<?php
$certtype = new WA_MySQLi_RS("certtype", $cmctrfdb, 1);
$certtype->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certtype->execute();
?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 20%;" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem18a; ?></h4>
<p><?php echo $certificatem18a_help; ?></p>
<form action="trfdetails.php" method="get" class="was-validated" name="myForm">
<input name="certtype" type="hidden" id="certtype" value="<?php echo ($certtype->getColumnVal("idcertificationtype")); ?>">
<input name="tempcode" type="hidden" id="tempcode" value="<?php echo $tempcode; ?>">
<?php echo $prevcertificatehelp; ?><br>
<br>
<p><?php echo $auditcompanylocation; ?></p>
<input type="radio" name="tab" value="igotnone" onclick="show1();" checked />
<?php echo $tometitle; ?>
<input type="radio" name="tab" value="igottwo" onclick="show2();" />
<?php echo $toothertitle; ?>
<div id="div3" class="hide">
<hr>
<p><?php echo $modifydatacontact; ?></p>
<?php $kindofcontacts = ""; ?>
<?php include('include/contactformaudit.php'); ?>
</div>
<br>
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo $dpinumbersurveillance; ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="previousrepnumber" name="previousrepnumber">
</div>
</div>
<div class="form-group mb-0 row">
<label class="col-md-3 my-1 control-label"><?php echo $issuebycimac; ?></label>
<div class="col-md-9">
<div class="form-check-inline my-1">
<div class="custom-control custom-radio">
<input type="radio" id="customRadio7" name="issuebycimac" class="custom-control-input" value="Y" checked="checked">
<label class="custom-control-label" for="customRadio7"><?php echo $yestitle; ?></label>
</div>
</div>
<div class="form-check-inline my-1">
<div class="custom-control custom-radio">
<input type="radio" id="customRadio8" name="issuebycimac" class="custom-control-input" value="N">
<label class="custom-control-label" for="customRadio8"><?php echo $notitle; ?></label>
</div>
</div>
</div>
</div><br>
<div class="form-group">
<label for="surveillanceoption"><?php echo $surveillancec2option; ?></label>
<select class="form-control col-md-6" id="surveillanceoption" name="surveillanceoption">
<option selected value="option1"><?php echo $surveillancec2option1; ?></option>
<option value="option2"><?php echo $surveillancec2option2; ?></option>
<option value="option3"><?php echo $surveillancec2option3; ?></option>
</select>
</div><br>
<div class="form-group mb-0 row">
<label class="col-md-6 my-1 control-label"><?php echo $samplestoredtitle; ?></label>
<div class="col-md-2">
<div class="form-check-inline my-1">
<div class="custom-control custom-radio">
<input type="radio" id="samplestorey" name="samplestore" class="custom-control-input" value="Y" checked="checked">
<label class="custom-control-label" for="samplestorey"><?php echo $yestitle; ?></label>
</div>
</div>
<div class="form-check-inline my-1">
<div class="custom-control custom-radio">
<input type="radio" id="samplestoren" name="samplestore" class="custom-control-input" value="N">
<label class="custom-control-label" for="samplestoren"><?php echo $notitle; ?></label>
</div>
</div>
</div>
</div><br>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $nextsteptitle; ?>">
</form>
</div>
<div class="col-lg-12">
<div class="card">
<div class="card-body">
<h5><?php echo $assignedstd; ?></h4>
<p class="text-muted mb-3">
<?php //echo $assignedstd_help;
?>.
</p>
<div class="table-responsive">
<?php
$row1 = mysqli_query($con, "SELECT * FROM auditdpi WHERE auditdpi.idtrfdetails='$idtrfdetails'");
$idstandards = mysqli_query($con, "SELECT idstandards ,standardname FROM standards");
//query list protectioncategory
$proteccategorylist = mysqli_query($con, "SELECT idprotectioncategory ,name_protectioncategory FROM protectioncategory");
$idproteccategorylistRecord = array();
while ($idprotectioncategoryrow = mysqli_fetch_assoc($proteccategorylist)) {
$idproteccategorylistRecord[$idprotectioncategoryrow['idprotectioncategory']] = $idprotectioncategoryrow['name_protectioncategory'];
}
$idprotectioncategoryJson = json_encode($idproteccategorylistRecord);
?>
<button type="button" class="btn btn-dark waves-effect waves-light" onclick="history.back()"><?php echo $backstep; ?></button>
<!--end /table-->
</div><!--end /tableresponsive-->
</div><!--end card-body-->
</div><!--end card-->
</div>
<?php } ?> <!-- close confirm -->
<!-- confirm certificate M18B -->
<?php if ($idcertificate == "6") { ?>
<?php
$certtype = new WA_MySQLi_RS("certtype", $cmctrfdb, 1);
$certtype->setQuery("SELECT * FROM certificationtype WHERE certificationtype.idcertificationtype='$idcertificate'");
$certtype->execute();
?>
<div class="progress mb-4">
<div class="progress-bar" role="progressbar" style="width: 20%;" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">20%</div>
</div>
<div name="1stquestion" class="alert alert-light text-muted mb-0" role="alert">
<h4 class="alert-heading font-18 text-dark"><?php echo $certificatem18b; ?></h4>
<p><?php echo $certificatem18b_help; ?></p>
<form action="trfdetails.php" method="get" name="myForm">
<input name="certtype" type="hidden" id="certtype" value="<?php echo ($certtype->getColumnVal("idcertificationtype")); ?>">
<input name="tempcode" type="hidden" id="tempcode" value="<?php echo $tempcode; ?>">
<?php echo $prevcertificatehelp; ?><br>
<br>
<div class="form-group row">
<label for="example-text-input" class="col-sm-4 col-form-label text-right"><?php echo nl2br($previosurepnumbertitlem18b); ?></label>
<div class="col-sm-3">
<input class="form-control" type="text" id="previousrepnumber" name="previousrepnumber">
</div>
</div><br>
<div class="form-group mb-0 row">
<label class="col-md-3 my-1 control-label"><?php echo $issuebycimac; ?></label>
<div class="col-md-9">
<div class="form-check-inline my-1">
<div class="custom-control custom-radio">
<input type="radio" id="customRadio7" name="issuebycimac" class="custom-control-input" value="Y" checked="checked">
<label class="custom-control-label" for="customRadio7"><?php echo $yestitle; ?></label>
</div>
</div>
<div class="form-check-inline my-1">
<div class="custom-control custom-radio">
<input type="radio" id="customRadio8" name="issuebycimac" class="custom-control-input" value="N">
<label class="custom-control-label" for="customRadio8"><?php echo $notitle; ?></label>
</div>
</div>
</div>
</div><br>
<div class="form-group">
<label for="surveillanceoptiond"><?php echo $surveillancedoption; ?></label>
<select class="form-control col-md-6" id="surveillanceoptiond" name="surveillanceoption">
<option selected value="optiond1"><?php echo $surveillancedoption1; ?></option>
<option value="optiond2"><?php echo $surveillancedoption2; ?></option>
<option value="optiond3"><?php echo $surveillancedoption3; ?></option>
<option value="optiond4"><?php echo $surveillancedoption4; ?></option>
</select>
</div><br>
<input type="button" onclick="formSubmit()" class="btn btn-gradient-success waves-effect waves-light" value="<?php echo $confirmcertificate; ?>">
</form>
</div>
<?php } ?> <!-- close confirm -->
</div>
<!--end form-->
</div><!--end card-body-->
</div><!--end card-->
</div><!--end col-->
</div>
<!-- end page title end breadcrumb -->
</div><!-- container -->
<!-- footer start -->
<?php include('include/footer.php'); ?>
</footer><!--end footer-->
</div>
<!-- end page content -->
</div>
<!-- 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>
<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>
<!-- Parsley js -->
<script src="../../plugins/parsleyjs/parsley.min.js"></script>
<script src="../assets/pages/jquery.validation.init.js"></script>
</body>
</html>