Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
- <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
- <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 - Tables</title>
- <!-- Custom fonts for this template-->
- <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
- <!-- Page level plugin CSS-->
- <link href="vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet">
- <!-- Custom styles for this template-->
- <link href="css/sb-admin.css" rel="stylesheet">
- </head>
- <body id="page-top">
- <nav class="navbar navbar-expand navbar-dark bg-dark static-top">
- <a class="navbar-brand mr-1" href="index.php">Panel Administracji zgłoszeniami</a>
- <button class="btn btn-link btn-sm text-white order-1 order-sm-0" id="sidebarToggle" href="#">
- <i class="fas fa-bars"></i>
- </button>
- </nav>
- <div id="wrapper">
- <!-- Sidebar -->
- <ul class="sidebar navbar-nav">
- <li class="nav-item">
- <a class="nav-link" href="index.php">
- <i class="fas fa-fw fa-tachometer-alt"></i>
- <span>Strona główna</span>
- </a>
- </li>
- <li class="nav-item active">
- <a class="nav-link" href="tables.php">
- <i class="fas fa-fw fa-table"></i>
- <span>Zgłoszenia</span></a>
- </li>
- <li class="nav-item active">
- <a class="nav-link" href="zatrudnieni.php">
- <i class="fas fa-fw fa-table"></i>
- <span>Lista zatrudnionych</span></a>
- </li>
- </ul>
- <div id="content-wrapper">
- <div class="container-fluid">
- <!-- Breadcrumbs-->
- <ol class="breadcrumb">
- <li class="breadcrumb-item">
- <a href="#">Zgłoszenia</a>
- </li>
- <li class="breadcrumb-item active">Tabela</li>
- </ol>
- <!-- DataTables Example -->
- <div class="card mb-3">
- <div class="card-header">
- <i class="fas fa-table"></i>
- Zgłoszenia</div>
- <div class="card-body">
- <div class="table-responsive">
- <div class="container">
- <div class="row clearfix">
- <div class="col-md-12 table-responsive">
- <table class="table table-bordered table-hover table-sortable" id="tab_logic">
- <thead>
- </thead>
- <tbody>
- <?php
- require_once "connect.php";
- // $wynik = mysqli_query($connect,"SELECT imie FROM zgloszenia");
- // $takoooo = mysqli_fetch_assoc($wynik);
- // foreach ($takoooo as $row)
- //{
- //echo "<tr><td>".$row['imie']."</td></tr>";
- // print_r($takoooo);
- // }
- $wynik = mysqli_query($connect,"SELECT * FROM zgloszenia") or die('Błąd zapytania');
- if(mysqli_num_rows($wynik) > 0) {
- echo "<table class='table table-bordered table-hover table-sortable' id='tab_logic' >
- <th class='text-center'> ID </th><th class='text-center'> Imie </th> <th class='text-center'>Nazwisko</th> <th class='text-center'>Wiadomosc</th> <th class='text-center'>Numer Telefonu</th><th class='text-center'>Stanowisko</th><th class='text-center'>Status</th>
- </td> ";
- while($r = mysqli_fetch_assoc($wynik)) {
- echo "<tr>";
- echo "<td>".$r['id']."</td>" ;
- echo "<td>".$r['imie']."</td>" ;
- echo "<td>".$r['nazwisko']."</td>";
- echo "<td>".$r['text']."</td>";
- echo "<td>".$r['tel']."</td>";
- echo "<td>".$r['stanowisko']."</td>";
- echo "<td data-name='sel'>
- <form method='POST'>
- <select name='status1'>
- <option value=''>Czeka</option>
- <option value='1'>Przyjęty</option>
- <option value='2'>Odrzucone</option>
- <option value='3'>W rezerwie</option>
- </select></form>
- <button type='submit' name='wykonaj' class='btn btn-primary pull-right'>Wykonaj!</button>";
- echo "</tr>";
- }}
- echo "</table>";
- $id = ['id'];
- if (isset($_POST['wykonaj'])){
- $status = $_POST['status1'];
- if (isset($_POST['wykonaj'])){
- if ($status == 2)
- {
- //$usun = mysqli_query($connect, "DELETE FROM `zgloszenia` WHERE `id` = '".$id."'");
- echo "odrzucony";
- }elseif ($status == 1) {
- echo "przyjety";
- } elseif ($status == 3) {
- echo "w rezerwie";
- }
- }
- }
- ?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- /.container-fluid -->
- <!-- Sticky Footer -->
- <footer class="sticky-footer">
- <div class="container my-auto">
- <div class="copyright text-center my-auto">
- <span>Copyright © Brajan Kowal 2019</span>
- </div>
- </div>
- </footer>
- </div>
- <!-- /.content-wrapper -->
- </div>
- <!-- /#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>
- <!-- Page level plugin JavaScript-->
- <script src="vendor/datatables/jquery.dataTables.js"></script>
- <script src="vendor/datatables/dataTables.bootstrap4.js"></script>
- <!-- Custom scripts for all pages-->
- <script src="js/sb-admin.min.js"></script>
- <!-- Demo scripts for this page-->
- <script src="js/demo/datatables-demo.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement