<?php include_once "./Configs.php"; ?>
<!DOCTYPE html>
<html lang="en">
<?php
$titulo="Settings & Backups";    
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">
        
                                        <h5 class="mt-0">Settings</h5>
                                        <p class="sub-header">Inline edit like a spreadsheet, just click the cell, type and click somewhere else or press enter (image update requires a refresh).</p>
                                        <div class="table-responsive">
                                            <table class="tabla-ajax table table-centered mb-0 tabla-ajax" pagina="settings.php">
                                                <thead>
                                                    <tr>
                                                        <th>#</th>
                                                        <th>User Type</th>                                                       <th>Name</th>
                                                        <th>Email</th>
                                                        <th>Password</th>
                                                        <th>Image</th>
                                                    </tr>
                                                </thead>
                                            
                                                <tbody>
                                                    <tr>
                                                        <th><?php echo $_SESSION['user']; ?></th>
                                                        <th><?php echo $usuario["type"]; ?></th>                              
                                                        <td fila="<?php echo $_SESSION['user']; ?>" columna="name"><?php echo $usuario["name"]; ?></td>
                                                        <td fila="<?php echo $_SESSION['user']; ?>" columna="email"><?php echo $usuario["email"]; ?></td>
                                                        <td fila="<?php echo $_SESSION['user']; ?>" columna="pwd"><?php echo $usuario["pwd"]; ?>
                                                            <!--<select class="form-select" fila="<?php echo $_SESSION['user']; ?>" columna="pwd">
                                                                <option disabled selected>def</option>
                                                                <option value="1">o1</option>
                                                                <option value="2">o2</option>
                                                                <option value="3">o3</option>
                                                                <option value="4">o4</option>
                                                                <option value="5">o5</option>
                                                            </select>-->
                                                        </td>
                                                        <td fila="<?php echo $_SESSION['user']; ?>" columna="img"><?php echo $usuario["img"]; ?></td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div> <!-- end .table-responsive-->
                                    </div>
                                </div>
                                <div class="card">
                                    <div class="card-body">                                        
                                        <h5 class="mt-0">Backups</h5>
                                        <p class="sub-header">Here you can save all your data and restore it to any point in time.</p>
                                        <p><?php if(isset($warning) ){echo $warning;} ?></p>
                                        <form method="post" enctype="multipart/form-data">
                                            <button type="submit" name="botonbackup" class="btn btn-success waves-effect waves-light btn-xs" value="">Create backup</button><br /><br />
                                        </form>
                                        <div class="table-responsive">
                                            <table class="tabla-ajax table table-centered mb-0 tabla-ajax" pagina="settings.php">
                                                <thead>
                                                    <tr>
                                                        <th>#</th>
                                                        <th>Delete</th>
                                                        <th>Restore</th>
                                                        <th>Date</th>
                                                    </tr>
                                                </thead>
                                            <form method="post">
                                                <tbody>
                                                    <tr>
<?php echo listabackups("./backups");?>
                                                    </tr>
                                                </tbody>
                                                </form>
                                            </table>
                                        </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"; ?>
            </div>
        </div>        
    </body>
</html>