Untitled
unknown
plain_text
3 years ago
6.1 kB
5
Indexable
<?php require "../classi/Required.php"; $session = $_COOKIE[$session_name]; if(!($Aut->VerificaUtenteLoggato($session))){ header ("location: login/login_gui.php"); exit; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content=""> <meta name="author" content=""> <title>SB Admin 2 - Tables</title> <!-- Custom fonts for this template --> <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet"> <!-- Custom styles for this template --> <link href="css/sb-admin-2.min.css" rel="stylesheet"> <!-- Custom styles for this page --> <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet"> </head> <body id="page-top"> <?php require "../classi/nav_item_backend.php"; //ELEMENTI A SCHERMO CHE NON CAMBIANO TRA PAGINE ?> <?php $tab = new Create_table(14); $tab->free_elements("<div class='container-fluid' style='margin-top : 50px';><h1 class='h3 mb-2 text-gray-800'>Gestione Anagrafica</h1> <div class='card shadow mb-4'><div class='card-header py-3'><h6 class='m-0 font-weight-bold text-primary'>Visualizza gli ospiti</h6> </div><div class='card-body'>"); $info = new information(); if(isset($_GET['code']) && strlen($_GET['code']) > 0){ $tab->free_elements($info->print_info($_GET['code'], htmlentities(base64_decode($_GET['info'])))); } try{ $tab->th_row("Id","Appuntamento","Modifica","Elimina","Nome","Cognome","Email","Telefono",'Note'); }catch (Exception $e) { ($e->getMessage()); } $q = "SELECT * FROM ".$GLOBALS['DB_NAME'].$GLOBALS['TABLE_PREFIX']."utenti"; $rq = $PDO->prepare($q); $rq->execute(); while($record = $rq->fetch(PDO::FETCH_ASSOC)){ try{ $tab->push_row($record['id'], "<a href='./gestione_utenti/assegna_prenotazione_gui.php?id=".$record['id']."'><button type='button' class='btn btn-success btn-block'><i class='fas fa-bed'></i></button></a>", "<a href='./gestione_utenti/modifica_ospite_gui.php?id=".$record['id']."'><button type='button' class='btn btn-info btn-block'><i class='fas fa-cog'></i></button></a>", "<button onclick=DeleteUser(".$record['id'].") type='button' class='btn btn-danger' data-toggle='modal' data-target='#exampleModalCenter'><i class='fas fa-cog'></i></button>",$record['nome'],$record['cognome'],$record['email'] , $record['cellulare'], $record['note']); }catch (Exception $e) { echo ($e->getMessage()); } } $tab->end_table(); $result = $tab->end_div(4); echo $result; ?> <script language='javascript'> function DeleteUser(id_utente){ var id_delete = id_utente; } </script> <!-- Modal --> <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLongTitle">Elimina Utente<?php $record['id'] ?> </h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> ... </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Chiudi</button> <?php echo("<a href='./gestione_utenti/modifica_ospite_gui.php?id=".$id_delete."'><button type='button' class='btn btn-danger'>Elimina</button></a>"); ?> </div> </div> </div> </div> <!-- End of Content Wrapper --> <!-- Footer --> <footer class="sticky-footer bg-white"> <div class="container my-auto"> <div class="copyright text-center my-auto"> <span>Copyright © Your Website 2019</span> </div> </div> </footer> <!-- End of Footer --> </div> <!-- End of Content Wrapper --> </div> <!-- End of Page Wrapper --> <!-- Scroll to Top Button--> <a class="scroll-to-top rounded" href="#page-top"> <i class="fas fa-angle-up"></i> </a> <!-- Logout Modal--> <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5> <button class="close" type="button" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div> <div class="modal-footer"> <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button> <a class="btn btn-primary" href="login.html">Logout</a> </div> </div> </div> </div> <!-- Bootstrap core JavaScript--> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- Core plugin JavaScript--> <script src="vendor/jquery-easing/jquery.easing.min.js"></script> <!-- Custom scripts for all pages--> <script src="js/sb-admin-2.min.js"></script> <!-- Page level plugins --> <script src="vendor/datatables/jquery.dataTables.min.js"></script> <script src="vendor/datatables/dataTables.bootstrap4.min.js"></script> <!-- Page level custom scripts --> <script src="js/demo/datatables-demo.js"></script> </body> </html>
Editor is loading...