



<?php



 include('include/headscript.php'); ?>



<?php

if (isset($_POST["idcertificationtype"])) {

       $idcertificationtype=$_POST["idcertificationtype"];

   }

if (isset($_POST["formnameedit"])) {

       $formnameedit=$_POST["formnameedit"];

   }

if (isset($_POST["formnameadd"])) {

       $formnameadd=$_POST["formnameadd"];

   }



?>



<?php

if (isset($formnameedit))  {

  $UpdateQuery = new WA_MySQLi_Query($cmctrfdb);

  $UpdateQuery->Action = "update";

  $UpdateQuery->Table = "certificationtype";

  $UpdateQuery->bindColumn("name_certification", "s", "".((isset($_POST["name_certification"]))?$_POST["name_certification"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("description", "s", "".((isset($_POST["description"]))?$_POST["description"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("rev", "s", "".((isset($_POST["rev"]))?$_POST["rev"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("date", "s", "".((isset($_POST["date"]))?$_POST["date"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("descriptionm30", "s", "".((isset($_POST["descriptionm30"]))?$_POST["descriptionm30"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("m30namecert", "s", "".((isset($_POST["m30namecert"]))?$_POST["m30namecert"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("revm30", "s", "".((isset($_POST["revm30"]))?$_POST["revm30"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("datem30", "s", "".((isset($_POST["datem30"]))?$_POST["datem30"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("description_en", "s", "".((isset($_POST["description_en"]))?$_POST["description_en"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->bindColumn("descriptionm30_en", "s", "".((isset($_POST["descriptionm30_en"]))?$_POST["descriptionm30_en"]:"")  ."", "WA_DEFAULT");

  $UpdateQuery->addFilter("idcertificationtype", "=", "i", "".($idcertificationtype)  ."");

  $UpdateQuery->execute();

  $UpdateGoTo = "";

  if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";

  $UpdateQuery->redirect($UpdateGoTo);

}







?>

<?php

$certlist = new WA_MySQLi_RS("certlist",$cmctrfdb,0);

$certlist->setQuery("SELECT * FROM certificationtype");

$certlist->execute();

?>



<!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" />



	

	<!-- submit form with button -->

<script>

function formSubmit() {

    document.forms["myForm"].submit();

}

</script>





</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">

							

							

							

						  <!-- card for additional info gloves -->

							

                          <!--end card-body-->

							

						  <!-- card for show requirements -->

							<div class="card">

                              <div class="card-body">

                                    <h4 class="mt-0 header-title">Gestione Tipi di Certificazione</h4>

                                <p class="text-muted mb-3">Riferimenti certificazione</p> 

                             

							

							 <br><br>

								 

								  <table class="table table-striped mb-0">

									    <thead>

									      <tr>

											  <th>Nome prima certificazione (No M30)</th>

                                              <th>flusso checkbox</th>

									        <th>Descrizione (No M30)</th>

											  <th>Revisione (No M30)</th>

											  <th>Data (No M30)</th>

											  <th>Nome M30</th>

											  <th>Descrizione M30</th>

											  <th>Revisione M30</th>

											  <th>Data M30</th>

											  

									        

									        <th><?php echo $action; ?></th>

								          </tr>

							        </thead>

									    <tbody>

                                                <?php

$wa_startindex = 0;

while(!$certlist->atEnd()) {

  $wa_startindex = $certlist->Index;

?>

        <tr>

                <td><?php echo($certlist->getColumnVal("name_certification")); ?></td>

                <td><?php echo($certlist->getColumnVal("certificationname")); ?></td>

                <td><?php echo($certlist->getColumnVal("description")); ?></td>

                <td><?php echo($certlist->getColumnVal("rev")); ?></td>

				<td><?php echo($certlist->getColumnVal("date")); ?></td>

				<td><?php echo($certlist->getColumnVal("m30namecert")); ?></td>

				<td><?php echo($certlist->getColumnVal("descriptionm30")); ?></td>

				<td><?php echo($certlist->getColumnVal("revm30")); ?></td>

				<td><?php echo($certlist->getColumnVal("datem30")); ?></td>



                

                

                <td>                                                       

                        <a href="edit-certtype.php?idcertificationtype=<?php echo($certlist->getColumnVal("idcertificationtype")); ?>" class="mr-2"><i class="fas fa-edit text-info font-16"></i></a>

                        

                        

                       

                </td>

        </tr>

        <?php

  $certlist->moveNext();

}

$certlist->moveFirst(); //return RS to first record

unset($wa_startindex);

unset($wa_repeatcount);

?>

                                        </tbody>

							    </table>

									   

								

                              </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>

        

    </body>



</html>