<?php

// Connessione al database (assumendo che tu abbia già configurato la connessione)

include('include/headscript2.php');



$conn = new mysqli($servername, $username, $password, $dbname);



// Controlla la connessione al database

if ($conn->connect_error) {

    die("Connessione al database fallita: " . $conn->connect_error);

}



// Recupera l'IDTRF dalla richiesta GET

$idtrf = $_GET['idtrf'];



// Esegui l'aggiornamento nella tabella trf-details

$sql = "UPDATE `trf-details` SET revcs = 'N' WHERE idtrfdetails = '$idtrf'";





if ($conn->query($sql) === TRUE) {

    // Chiudi la finestra corrente e aggiorna la finestra padre



} else {

    echo "Errore nell'aggiornamento del database: " . $conn->error;

}



$conn->close();

?>

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



</head>



<body>



    <!-- Top Bar Start -->

    <?php include('include/topbar.php'); ?>

    <!-- Top Bar End -->





    <!-- Left Sidenav -->

    <?php include('include/leftsidenavnocheckstep.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);">CIMAC 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-xl-12">

                        <div class="card">

                            <div class="card-body">

                                <div class="media">

                                    <img src="upload/users/<?php echo $avatarname; ?>" alt="" class="thumb-md rounded-circle mr-2">

                                    <div class="media-body align-self-center">

                                        <h4 class="mt-0 mb-1"><?php echo $welcomeuser; ?><?php echo $nameuser; ?></h4>

                                        <p class="text-muted mb-0 font-14 pr-5">Questo è il pannello amministrazione</p>

                                    </div><!--end media-body-->

                                </div><!--end media-->



                            </div><!--end card-body-->

                        </div><!--end card-->

                        <div class="card">

                            <div class="card-body">

                                <h4 class="header-title mt-0">Invio al cliente avvenuto con successo!</h4>

                                <div id="CrmDashChart" class=""></div>





                                <br><br>

                            </div><!--end card-body-->

                        </div><!--end card-->











                        <!--end row-->



                    </div>



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