<?php
session_start();
?>
<!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">
    <meta name="description" content="Mouldifi - A fully responsive, HTML5 based admin theme">
    <meta name="keywords" content="Responsive, HTML5, admin theme, business, professional, Mouldifi, web design, CSS3">
    <title>بیمه توانا-مدیریت سطوح دسترسی</title>
    <!-- Site favicon -->
    <link rel='shortcut icon' type='image/x-icon' href='images/favicon.ico' />
    <!-- /site favicon -->
    <!-- Entypo font stylesheet -->
    <link href="css/entypo.css" rel="stylesheet">
    <!-- /entypo font stylesheet -->
    <!-- Font awesome stylesheet -->
    <link href="css/font-awesome.min.css" rel="stylesheet">
    <!-- /font awesome stylesheet -->
    <!-- CSS3 Animate It Plugin Stylesheet -->
    <link href="css/plugins/css3-animate-it-plugin/animations.css" rel="stylesheet">
    <!-- /css3 animate it plugin stylesheet -->
    <!-- Bootstrap stylesheet min version -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- /bootstrap stylesheet min version -->
    <!-- Mouldifi core stylesheet -->
    <link href="css/mouldifi-core.css" rel="stylesheet">
    <!-- /mouldifi core stylesheet -->

    <link href="css/mouldifi-forms.css" rel="stylesheet">

    <link href="css/plugins/datatables/jquery.dataTables.css" rel="stylesheet">
    <link href="js/plugins/datatables/extensions/Buttons/css/buttons.dataTables.css" rel="stylesheet">

    <!-- Bootstrap RTL stylesheet min version -->
    <link href="css/bootstrap-rtl.min.css" rel="stylesheet">
    <!-- /bootstrap rtl stylesheet min version -->
    <!-- Mouldifi RTL core stylesheet -->
    <link href="css/mouldifi-rtl-core.css" rel="stylesheet">
    <!-- /mouldifi rtl core stylesheet -->
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <!--[if lte IE 8]>
    <script src="js/plugins/flot/excanvas.min.js"></script>
    <![endif]-->
</head>
<body>

<!-- Page container -->
<div class="page-container">

    <!-- Page Sidebar -->
    <?php

    include "include/slider_menu.php";

    ?>
    <!-- /page sidebar -->
    <!-- Main container -->
    <div class="main-container gray-bg">

        <!-- Main header -->
        <?php

        include "include/header.php";

        ?>
        <!-- /main header -->
        <!-- Main content -->
        <div class="main-content">
            <h1 class="page-title"> مدیریت سطوح دسترسی</h1>
            <div class="row">
                <div class="col-lg-12 animatedParent animateOnce z-index-50">
                    <div class="panel panel-default animated fadeInUp">
                        <div class="panel-heading clearfix">
                            <h3 class="panel-title">فهرست سطوح دسترسی</h3>
                            <ul class="panel-tool-options">
                                <li><a data-rel="collapse" href="#"><i class="icon-down-open"></i></a></li>
                                <li><a data-rel="reload" href="#"><i class="icon-arrows-ccw"></i></a></li>
                                <li><a data-rel="close" href="#"><i class="icon-cancel"></i></a></li>
                            </ul>
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-border table-hover dataTables-example" >
                                    <thead>
                                    <tr>
                                        <th>کد</th>
                                        <th>نام سطح دسترسی</th>
                                    </tr>
                                    </thead>
                                    <tbody>



                                    <?php

                                    $sql = "SELECT * FROM   tbl_role ";

                                    $rs_result = mysqli_query($db, $sql);
                                    //print_r($row = mysqli_fetch_array($rs_result));
                                    //exit();

                                    while ($row = mysqli_fetch_array($rs_result)) {

                                    ?>

                                    <tr class="gradeX">
                                        <td><?php echo $row["id"]; ?></td>
                                        <td><?php echo $row["name"]; ?></td>


                                    </tr>

                                        <?php

                                    };
                                    ?>


                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <th>کد</th>
                                        <th>نام سطح دسترسی</th>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Footer -->
            <?php

            include 'include/footer.php';

            ?>
            <!-- /footer -->

        </div>
        <!-- /main content -->

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

</div>
<!-- /page container -->
<!--Load JQuery-->

<!--Load JQuery-->
<script src="js/jquery.min.js"></script>
<!-- Load CSS3 Animate It Plugin JS -->
<script src="js/plugins/css3-animate-it-plugin/css3-animate-it.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/plugins/metismenu/jquery.metisMenu.js"></script>
<script src="js/plugins/blockui-master/jquery-ui.js"></script>
<script src="js/plugins/blockui-master/jquery.blockUI.js"></script>
<script src="js/functions.js"></script>

<script src="js/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="js/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="js/plugins/datatables/extensions/Buttons/js/dataTables.buttons.min.js"></script>
<script src="js/plugins/datatables/jszip.min.js"></script>
<script src="js/plugins/datatables/pdfmake.min.js"></script>
<script src="js/plugins/datatables/vfs_fonts.js"></script>
<script src="js/plugins/datatables/extensions/Buttons/js/buttons.html5.js"></script>
<script src="js/plugins/datatables/extensions/Buttons/js/buttons.colVis.js"></script>
<script>
    $(document).ready(function () {
        $('.dataTables-example').DataTable({
            dom: '<"html5buttons" B>lTfgitp',
            buttons: [
                {
                    extend: 'copyHtml5',
                    exportOptions: {
                        columns: [ 0, ':visible' ]
                    }
                },
                {
                    extend: 'excelHtml5',
                    exportOptions: {
                        columns: ':visible'
                    }
                },
                {
                    extend: 'pdfHtml5',
                    exportOptions: {
                        columns: [ 0, 1, 2, 3, 4 ]
                    }
                },
                'colvis'
            ]
        });
    });


</body>
</html>
