<?php include_once "./Configs.php"; ?>
<!DOCTYPE html>
<html lang="en">
<?php
$titulo="Attributes";    
include_once "./Head.php"; ?>
    <!-- body start AQUI va el theme mode-->
<?php 
if($usuario["layout"] == 'horizontal'){
?>    
    <body class="loading" data-layout-mode="horizontal" data-layout='{"mode": "<?php echo $usuario["theme"]; ?>", "width": "fluid", "menuPosition": "fixed", "topbar": {"color": "dark"}, "showRightSidebarOnPageLoad": false}'>    
<?php 
}else{
?>    
    <body class="loading" data-layout='{"mode": "<?php echo $usuario["theme"]; ?>", "width": "fluid", "menuPosition": "fixed", "sidebar": { "color": "<?php echo $usuario["theme"]; ?>", "size": "default", "showuser": true}, "topbar": {"color": "light"}, "showRightSidebarOnPageLoad": true}'>
<?php 
}
?>    
        <div id="wrapper">
<?php  include_once "./Header.php"; ?>
<?php  include_once "./Menu.php"; ?>
            <div class="content-page">
                <div class="content">

                    <!-- Start Content-->
                    <div class="container-fluid">

                        <!-- start page title -->
<div class="row">
    <div class="col-12">
        <div class="page-title-box page-title-box-alt">
            <div class="page-title-right">
                <ol class="breadcrumb m-0">
                    <li class="breadcrumb-item"><a href="javascript: void(0);">Adminto</a></li>
                    <li class="breadcrumb-item"><a href="javascript: void(0);">Tables</a></li>
                    <li class="breadcrumb-item active">Editable</li>
                </ol>
            </div>
            <h4 class="page-title"><?php echo $titulo; ?></h4>
        </div>
    </div>
</div>     
<!-- end page title --> 
                        
                                                                  
                        <div class="row">
                            <div class="col-12">
                                <div class="card">
                                    <div class="card-body">
        
                                        <?php if(isset($_GET['search']) ){?><h4>(filter for single item is active, to view all go to this tab via the menu)</h4><?php }?>
                                        <p class="sub-header">Inline edit like a spreadsheet, just click the cell, type and click somewhere else or press enter.</p>
                                        <p><?php if(isset($warning) ){echo $warning;} ?></p>                                        <style>/**/.table-responsive .row { width: 99% !important; }</style>
                                        <div class="table-responsive">
                                        <!--<table id="selection-datatable" class="table table-bordered dt-responsive nowrap tabla-ajax" pagina="product-view.php">-->
                                        <!--<table id="datatable-buttons" class="table table-centered mb-0 tabla-ajax" pagina="product-view.php">Con botones de copy y PDF...-->
                                            <table id="responsive-datatable" class="table table-bordered table-bordered dt-responsive nowrap tabla-ajax" pagina="product-attr.php">                                            
                                                <thead>
                                                    <tr>
                                                        <th>#</th>
                                                        <th>Delete</th>                                                       
                                                        <th>Name</th>
                                                        <th>Applies to</th>
                                                        <th>Adjustment</th>
                                                    </tr>
                                                </thead>
                                            
                                                <tbody>
    <?php echo tablaBDD("atributo"); ?>
                                                </tbody>
                                            </table>
    <script>jQuery(document).ready(function ($) { 
    
    });</script>
                                        </div> <!-- end .table-responsive-->
                                    </div> <!-- end card-body -->
                                </div> <!-- end card -->
                            </div> <!-- end col -->
                        </div> <!-- end row -->

                                
                    </div> <!-- container -->

                </div> <!-- content -->
<?php  include_once "./Footer.php"; ?>
        <!-- Table Editable plugin-->
        <script src="./assets/libs/jquery-tabledit/jquery.tabledit.min.js"></script>
        <!-- Table editable init-->
        <!--<script src="./assets/js/pages/tabledit.init.js"></script>-->


        <!-- third party js - Para las tablas que hacen el PDF-->
        <script src="./assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
        <script src="./assets/libs/datatables.net-bs5/js/dataTables.bootstrap5.min.js"></script>
        <script src="./assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
        <script src="./assets/libs/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js"></script>
        <script src="./assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
        <script src="./assets/libs/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"></script>
        <script src="./assets/libs/datatables.net-buttons/js/buttons.html5.min.js"></script>
        <script src="./assets/libs/datatables.net-buttons/js/buttons.flash.min.js"></script>
        <script src="./assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
        <script src="./assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
        <script src="./assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
        <script src="./assets/libs/pdfmake/build/pdfmake.min.js"></script>
        <script src="./assets/libs/pdfmake/build/vfs_fonts.js"></script>
        <!-- third party js ends -->

        <!-- Datatables init -->
        <script src="./assets/js/pages/datatables.init.js"></script>
                
            </div>
        </div>        
    </body>
</html>