Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php session_start(); include('dbconnection.php'); // Include your database connection ..

Decoded Output download

<?php 
session_start(); 
include('dbconnection.php'); // Include your database connection file 
 
// Check if the form to change an item to Artifak has been submitted 
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_item_validity'])) { 
    // Sanitize and validate the input 
    $itemid = filter_input(INPUT_POST, 'itemid', FILTER_VALIDATE_INT); 
 
    if ($itemid === false) { 
        // Handle invalid input scenario (e.g., if ItemID is not a valid integer) 
        echo "<script>alert('Item ID is invalid. Please try again.'); window.location.href = 'http://localhost/Johor/pages/tables/artefact_table.php';</script>"; 
        exit; 
    } 
 
    // Update the item's validity status to 'artifak' 
    $update_query = "UPDATE item SET ItemValidity = 'artifak' WHERE ItemID = ?"; 
    $stmt_update = mysqli_prepare($con, $update_query); 
    mysqli_stmt_bind_param($stmt_update, "i", $itemid); 
    $update_success = mysqli_stmt_execute($stmt_update); 
 
    if ($update_success) { 
        echo "<script>alert('Koleksi sudah bertukar menjadi Artifak.'); window.location.href = 'http://localhost/Johor/pages/tables/artefact_table.php';</script>"; 
        exit; 
    } else { 
        echo "<script>alert('Kesalahan dalam memindahkan data. Sila cuba lagi.'); window.location.href = 'http://localhost/Johor/pages/tables/artefact_table.php';</script>"; 
        exit; 
    } 
 
    // Close prepared statement 
    mysqli_stmt_close($stmt_update); 
} 
 
// Fetch all items from the database 
$ret = mysqli_query($con, "SELECT * FROM item WHERE ItemValidity = 'antik'"); 
 
// Check if there are rows returned 
if (mysqli_num_rows($ret) > 0) { 
    $items = mysqli_fetch_all($ret, MYSQLI_ASSOC); 
} else { 
    $items = []; 
} 
 
// Close database connection 
mysqli_close($con); 
?> 
     
 
    <!DOCTYPE html> 
    <html lang="en"> 
    <head> 
        <meta charset="utf-8"> 
        <meta name="viewport" content="width=device-width, initial-scale=1"> 
        <title>AdminLTE 3 | DataTables</title> 
 
        <!-- Google Font: Source Sans Pro --> 
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback"> 
        <!-- Font Awesome --> 
        <link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css"> 
        <!-- DataTables --> 
        <link rel="stylesheet" href="../../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css"> 
        <link rel="stylesheet" href="../../plugins/datatables-responsive/css/responsive.bootstrap4.min.css"> 
        <link rel="stylesheet" href="../../plugins/datatables-buttons/css/buttons.bootstrap4.min.css"> 
        <!-- Theme style --> 
        <link rel="stylesheet" href="../../dist/css/adminlte.min.css"> 
    </head> 
    <body class="hold-transition sidebar-mini"> 
    <div class="wrapper"> 
      <!-- Navbar --> 
      <nav class="main-header navbar navbar-expand navbar-light" style="background-color: #c8dfdf"> 
        <!-- Left navbar links --> 
        <ul class="navbar-nav"> 
          <li class="nav-item"> 
            <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a> 
          </li> 
        </ul> 
 
        <!-- Right navbar links --> 
        <ul class="navbar-nav ml-auto"> 
 
 
                <div class="navbar-search-block"> 
                  <form class="form-inline"> 
                    <div class="input-group input-group-sm"> 
                      <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-labx`el="Search"> 
                      <div class="input-group-append"> 
                        <button class="btn btn-navbar" type="submit"> 
                          <i class="fas fa-search"></i> 
                        </button> 
 
                    </div> 
 
          <!-- Messages Dropdown Menu --> 
          <li class="nav-item dropdown"> 
            <a class="nav-link" data-toggle="dropdown" href="#"> 
              <i class="far fa-comments"></i> 
              <span class="badge badge-danger navbar-badge">3</span> 
            </a> 
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right"> 
              <a href="#" class="dropdown-item"> 
                <!-- Message Start --> 
                <div class="media"> 
                  <img src="dist/img/user1-128x128.jpg" alt="User Avatar" class="img-size-50 mr-3 img-circle"> 
                  <div class="media-body"> 
                    <h3 class="dropdown-item-title"> 
                      Brad Diesel 
                      <span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span> 
                    </h3> 
                    <p class="text-sm">Call me whenever you can...</p> 
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p> 
                  </div> 
                </div> 
                <!-- Message End --> 
              </a> 
              <div class="dropdown-divider"></div> 
              <a href="#" class="dropdown-item"> 
                <!-- Message Start --> 
                <div class="media"> 
                  <img src="dist/img/user8-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3"> 
                  <div class="media-body"> 
                    <h3 class="dropdown-item-title"> 
                      John Pierce 
                      <span class="float-right text-sm text-muted"><i class="fas fa-star"></i></span> 
                    </h3> 
                    <p class="text-sm">I got your message bro</p> 
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p> 
                  </div> 
                </div> 
                <!-- Message End --> 
              </a> 
              <div class="dropdown-divider"></div> 
              <a href="#" class="dropdown-item"> 
                <!-- Message Start --> 
                <div class="media"> 
                  <img src="dist/img/user3-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3"> 
                  <div class="media-body"> 
                    <h3 class="dropdown-item-title"> 
                      Nora Silvester 
                      <span class="float-right text-sm text-warning"><i class="fas fa-star"></i></span> 
                    </h3> 
                    <p class="text-sm">The subject goes here</p> 
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p> 
                  </div> 
                </div> 
                <!-- Message End --> 
              </a> 
              <div class="dropdown-divider"></div> 
              <a href="#" class="dropdown-item dropdown-footer">See All Messages</a> 
            </div> 
          </li> 
          <!-- Notifications Dropdown Menu --> 
          <li class="nav-item dropdown"> 
            <a class="nav-link" data-toggle="dropdown" href="#"> 
              <i class="far fa-bell"></i> 
              <span class="badge badge-warning navbar-badge">15</span> 
            </a> 
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right"> 
              <span class="dropdown-item dropdown-header">15 Notifications</span> 
              <div class="dropdown-divider"></div> 
              <a href="#" class="dropdown-item"> 
                <i class="fas fa-envelope mr-2"></i> 4 new messages 
                <span class="float-right text-muted text-sm">3 mins</span> 
              </a> 
              <div class="dropdown-divider"></div> 
              <a href="#" class="dropdown-item"> 
                <i class="fas fa-users mr-2"></i> 8 friend requests 
                <span class="float-right text-muted text-sm">12 hours</span> 
              </a> 
              <div class="dropdown-divider"></div> 
              <a href="#" class="dropdown-item"> 
                <i class="fas fa-file mr-2"></i> 3 new reports 
                <span class="float-right text-muted text-sm">2 days</span> 
              </a> 
              <div class="dropdown-divider"></div> 
              <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a> 
            </div> 
          </li> 
          <li class="nav-item"> 
            <a class="nav-link" data-widget="fullscreen" href="#" role="button"> 
              <i class="fas fa-expand-arrows-alt"></i> 
            </a> 
          </li> 
          <li class="nav-item"> 
            <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button"> 
              <i class="fas fa-th-large"></i> 
            </a> 
          </li> 
        </ul> 
      </nav> 
      <!-- /.navbar --> 
 
      <!-- Main Sidebar Container --> 
       <aside class="main-sidebar sidebar-dark-warning elevation-4" style="background-color: #3d9970;"> 
 
        <!-- Brand Logo --> 
        <a href="http://localhost/Johor/index3d.php" class="brand-link"> 
          <img src= "logokomtar.jpg" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .9"> 
          <span class="brand-text font-weight-light" style="color: #FFFFFF;">Ahli Sejarah</span> 
    </a> 
 
        <!-- Sidebar --> 
          <div class="sidebar"> 
                <!-- Sidebar Menu --> 
                 <nav class="mt-2"> 
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false"> 
              <!-- Add icons to the links using the .nav-icon class 
                   with font-awesome or any other icon font library --> 
              <li class="nav-item"> 
          <a href="http://localhost/Johor/index3d.php" class="nav-link " style="color: black;"> 
            <i class="nav-icon fas fa-tachometer-alt"></i> 
            <p> 
              LAMAN UTAMA 
            </p> 
          </a> 
                </li> 
 
 
               <li class="nav-item"> 
                <a href="#" class="nav-link  " style="color: black;"> 
                  <i class="nav-icon fas fa-tag"></i> 
                  <p> 
                     KOLEKSI 
                    <i class="fas fa-angle-left right"></i> 
                  </p> 
                </a> 
                <ul class="nav nav-treeview">        
              <li class="nav-item"> 
                  <a href="http://localhost/Johor/pages/tables/table1h.php" class="nav-link " style="color: black; padding-left: 52px;"> 
 
 
                  <i class="nav-icon fas fa-edit"></i> 
                  <p> 
                    Pengecaman 
                    <span class="right badge badge-danger"></span> 
                 </p> 
                </a> 
                 </ul> 
              </li> 
            <li class="nav-item"> 
                <a href="#" class="nav-link active " style="color: black;"> 
                    <i class="nav-icon fas fa-box"></i> 
                    <p> 
                        ARTIFAK & ANTIK 
                        <i class="fas fa-angle-left right"></i> 
                    </p> 
                </a> 
                <ul class="nav nav-treeview"> 
            <li class="nav-item"> 
        <a href="http://localhost/Johor/pages/tables/antique_table.php" class="nav-link active " style="color: black; padding-left: 52px;"> 
            <i class="nav-icon fas fa-table"></i> 
            <p> 
                Antik 
                <span class="right badge badge-danger"></span> 
            </p> 
        </a> 
    </li>        <li class="nav-item"> 
                        <a href="http://localhost/Johor/pages/tables/artefact_table.php" class="nav-link " style="color: black; padding-left: 52px;"> 
                            <i class="nav-icon fas fa-plus"></i> 
                            <p> 
                                Artifak 
                                <span class="right badge badge-danger"></span> 
                            </p> 
                        </a> 
                    </li> 
                </ul> 
            </li> 
        </ul> 
    </nav> 
                <!-- /.sidebar-menu --> 
            </div> 
            <!-- /.sidebar --> 
        </aside> 
 
        <!-- Content Wrapper. Contains page content --> 
        <div class="content-wrapper"> 
            <!-- Content Header (Page header) --> 
            <section class="content-header"> 
                <div class="container-fluid"> 
                    <div class="row mb-2"> 
                        <div class="col-sm-6"> 
                            <h1>Antik</h1> 
                        </div> 
                        <div class="col-sm-6"> 
                            <ol class="breadcrumb float-sm-right"> 
                            </ol> 
                        </div> 
                    </div> 
                </div><!-- /.container-fluid --> 
            </section> 
 
            <!-- Main content --> 
      <section class="content"> 
        <div class="container-fluid"> 
            <div class="row"> 
                <div class="col-12">     
                    <div class="card"> 
                        <div class="card-header"> 
                            <h3 class="card-title"></h3> 
                        </div> 
                        <!-- /.card-header --> 
                        <div class="card-body"> 
                            <table class="table table-hover"> 
                                <thead> 
                                    <tr> 
                                        <th style="width: 10%;">Jenis Koleksi</th> 
                                        <th style="width: 15%;">Nama Koleksi</th> 
                                        <th style="width: 20%;">Perincian Koleksi</th> 
                                        <th style="width: 15%;">Lokasi Penemuan</th> 
                                        <th style="width: 10%;">Era Kesultanan</th> 
                                        <th style="width: 15%;">Tarikh Daftar Masuk</th> 
                                        <th style="width: 5%;">Foto</th> 
                                        <th style="width: 20%;">Tindakan</th> 
                                    </tr> 
                                </thead> 
                              <tbody> 
                    <?php foreach ($items as $item): ?> 
                        <tr> 
                            <td><?php echo htmlspecialchars($item['ItemName']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemType']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemDesc']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemLocation']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemPeriod']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemRegDate']); ?></td> 
                            <td><img src="../../images/<?php echo htmlspecialchars($item['Image']); ?>" alt="<?php echo htmlspecialchars($item['ItemName']); ?>" width="100"></td> 
                            <td> 
                                <form method='POST' action=''> 
                                    <input type='hidden' name='itemid' value='<?php echo $item['ItemID']; ?>'> 
                                    <button type='submit' class='btn btn-primary' name='update_item_validity'>Tukar menjadi artifak</button> 
                                </form> 
                            </td> 
                        </tr> 
                    <?php endforeach; ?> 
                </tbody> <tbody> 
                    <?php foreach ($items as $item): ?> 
                        <tr> 
                            <td><?php echo htmlspecialchars($item['ItemName']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemType']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemDesc']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemLocation']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemPeriod']); ?></td> 
                            <td><?php echo htmlspecialchars($item['ItemRegDate']); ?></td> 
                            <td><img src="../../images/<?php echo htmlspecialchars($item['Image']); ?>" alt="<?php echo htmlspecialchars($item['ItemName']); ?>" width="100"></td> 
                            <td> 
                                <form method='POST' action=''> 
                                    <input type='hidden' name='itemid' value='<?php echo $item['ItemID']; ?>'> 
                                    <button type='submit' class='btn btn-primary' name='update_item_validity'>Tukar menjadi artifak</button> 
                                </form> 
                            </td> 
                        </tr> 
                    <?php endforeach; ?> 
                </tbody> 
                            </table> 
                        </div> 
                        <!-- /.card-body --> 
                    </div> 
                    <!-- /.card --> 
                </div> 
                <!-- /.col --> 
            </div> 
            <!-- /.row --> 
        </div> 
        <!-- /.container-fluid --> 
    </section> 
        <!-- /.content --> 
    </div> 
          <footer class="main-footer"> 
            <div class="float-right d-none d-sm-block"> 
                <b>Version</b> 3.2.0 
            </div> 
            <strong>Copyright &copy; 2014-2021 <a href="https://adminlte.io">AdminLTE.io</a>.</strong> All rights reserved. 
        </footer> 
 
    <!-- /.content-wrapper --> 
    <!-- Control Sidebar --> 
    <aside class="control-sidebar control-sidebar-dark"> 
        <!-- Control sidebar content goes here --> 
    </aside> 
    <!-- /.control-sidebar --> 
</div> 
<!-- ./wrapper --> 
<script> 
        $(document).ready(function() { 
            $('#example1').DataTable(); 
        }); 
    </script> 
<!-- jQuery --> 
<script src="../../plugins/jquery/jquery.min.js"></script> 
<!-- Bootstrap 4 --> 
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script> 
<!-- DataTables  & Plugins --> 
<script src="../../plugins/datatables/jquery.dataTables.min.js"></script> 
<script src="../../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script> 
<script src="../../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script> 
<script src="../../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script> 
<script src="../../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script> 
<script src="../../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script> 
<script src="../../plugins/jszip/jszip.min.js"></script> 
<script src="../../plugins/pdfmake/pdfmake.min.js"></script> 
<script src="../../plugins/pdfmake/vfs_fonts.js"></script> 
<script src="../../plugins/datatables-buttons/js/buttons.html5.min.js"></script> 
<script src="../../plugins/datatables-buttons/js/buttons.print.min.js"></script> 
<script src="../../plugins/datatables-buttons/js/buttons.colVis.min.js"></script> 
<!-- AdminLTE App --> 
<script src="../../dist/js/adminlte.min.js"></script> 
<!-- AdminLTE for demo purposes --> 
<!-- Page specific script --> 
 
</body> 
</html> 
 
 

Did this file decode correctly?

Original Code

<?php
session_start();
include('dbconnection.php'); // Include your database connection file

// Check if the form to change an item to Artifak has been submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_item_validity'])) {
    // Sanitize and validate the input
    $itemid = filter_input(INPUT_POST, 'itemid', FILTER_VALIDATE_INT);

    if ($itemid === false) {
        // Handle invalid input scenario (e.g., if ItemID is not a valid integer)
        echo "<script>alert('Item ID is invalid. Please try again.'); window.location.href = 'http://localhost/Johor/pages/tables/artefact_table.php';</script>";
        exit;
    }

    // Update the item's validity status to 'artifak'
    $update_query = "UPDATE item SET ItemValidity = 'artifak' WHERE ItemID = ?";
    $stmt_update = mysqli_prepare($con, $update_query);
    mysqli_stmt_bind_param($stmt_update, "i", $itemid);
    $update_success = mysqli_stmt_execute($stmt_update);

    if ($update_success) {
        echo "<script>alert('Koleksi sudah bertukar menjadi Artifak.'); window.location.href = 'http://localhost/Johor/pages/tables/artefact_table.php';</script>";
        exit;
    } else {
        echo "<script>alert('Kesalahan dalam memindahkan data. Sila cuba lagi.'); window.location.href = 'http://localhost/Johor/pages/tables/artefact_table.php';</script>";
        exit;
    }

    // Close prepared statement
    mysqli_stmt_close($stmt_update);
}

// Fetch all items from the database
$ret = mysqli_query($con, "SELECT * FROM item WHERE ItemValidity = 'antik'");

// Check if there are rows returned
if (mysqli_num_rows($ret) > 0) {
    $items = mysqli_fetch_all($ret, MYSQLI_ASSOC);
} else {
    $items = [];
}

// Close database connection
mysqli_close($con);
?>
    

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title>AdminLTE 3 | DataTables</title>

        <!-- Google Font: Source Sans Pro -->
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
        <!-- Font Awesome -->
        <link rel="stylesheet" href="../../plugins/fontawesome-free/css/all.min.css">
        <!-- DataTables -->
        <link rel="stylesheet" href="../../plugins/datatables-bs4/css/dataTables.bootstrap4.min.css">
        <link rel="stylesheet" href="../../plugins/datatables-responsive/css/responsive.bootstrap4.min.css">
        <link rel="stylesheet" href="../../plugins/datatables-buttons/css/buttons.bootstrap4.min.css">
        <!-- Theme style -->
        <link rel="stylesheet" href="../../dist/css/adminlte.min.css">
    </head>
    <body class="hold-transition sidebar-mini">
    <div class="wrapper">
      <!-- Navbar -->
      <nav class="main-header navbar navbar-expand navbar-light" style="background-color: #c8dfdf">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
          <li class="nav-item">
            <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
          </li>
        </ul>

        <!-- Right navbar links -->
        <ul class="navbar-nav ml-auto">


                <div class="navbar-search-block">
                  <form class="form-inline">
                    <div class="input-group input-group-sm">
                      <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-labx`el="Search">
                      <div class="input-group-append">
                        <button class="btn btn-navbar" type="submit">
                          <i class="fas fa-search"></i>
                        </button>

                    </div>

          <!-- Messages Dropdown Menu -->
          <li class="nav-item dropdown">
            <a class="nav-link" data-toggle="dropdown" href="#">
              <i class="far fa-comments"></i>
              <span class="badge badge-danger navbar-badge">3</span>
            </a>
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
              <a href="#" class="dropdown-item">
                <!-- Message Start -->
                <div class="media">
                  <img src="dist/img/user1-128x128.jpg" alt="User Avatar" class="img-size-50 mr-3 img-circle">
                  <div class="media-body">
                    <h3 class="dropdown-item-title">
                      Brad Diesel
                      <span class="float-right text-sm text-danger"><i class="fas fa-star"></i></span>
                    </h3>
                    <p class="text-sm">Call me whenever you can...</p>
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
                  </div>
                </div>
                <!-- Message End -->
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <!-- Message Start -->
                <div class="media">
                  <img src="dist/img/user8-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">
                  <div class="media-body">
                    <h3 class="dropdown-item-title">
                      John Pierce
                      <span class="float-right text-sm text-muted"><i class="fas fa-star"></i></span>
                    </h3>
                    <p class="text-sm">I got your message bro</p>
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
                  </div>
                </div>
                <!-- Message End -->
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <!-- Message Start -->
                <div class="media">
                  <img src="dist/img/user3-128x128.jpg" alt="User Avatar" class="img-size-50 img-circle mr-3">
                  <div class="media-body">
                    <h3 class="dropdown-item-title">
                      Nora Silvester
                      <span class="float-right text-sm text-warning"><i class="fas fa-star"></i></span>
                    </h3>
                    <p class="text-sm">The subject goes here</p>
                    <p class="text-sm text-muted"><i class="far fa-clock mr-1"></i> 4 Hours Ago</p>
                  </div>
                </div>
                <!-- Message End -->
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item dropdown-footer">See All Messages</a>
            </div>
          </li>
          <!-- Notifications Dropdown Menu -->
          <li class="nav-item dropdown">
            <a class="nav-link" data-toggle="dropdown" href="#">
              <i class="far fa-bell"></i>
              <span class="badge badge-warning navbar-badge">15</span>
            </a>
            <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
              <span class="dropdown-item dropdown-header">15 Notifications</span>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <i class="fas fa-envelope mr-2"></i> 4 new messages
                <span class="float-right text-muted text-sm">3 mins</span>
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <i class="fas fa-users mr-2"></i> 8 friend requests
                <span class="float-right text-muted text-sm">12 hours</span>
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item">
                <i class="fas fa-file mr-2"></i> 3 new reports
                <span class="float-right text-muted text-sm">2 days</span>
              </a>
              <div class="dropdown-divider"></div>
              <a href="#" class="dropdown-item dropdown-footer">See All Notifications</a>
            </div>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-widget="fullscreen" href="#" role="button">
              <i class="fas fa-expand-arrows-alt"></i>
            </a>
          </li>
          <li class="nav-item">
            <a class="nav-link" data-widget="control-sidebar" data-slide="true" href="#" role="button">
              <i class="fas fa-th-large"></i>
            </a>
          </li>
        </ul>
      </nav>
      <!-- /.navbar -->

      <!-- Main Sidebar Container -->
       <aside class="main-sidebar sidebar-dark-warning elevation-4" style="background-color: #3d9970;">

        <!-- Brand Logo -->
        <a href="http://localhost/Johor/index3d.php" class="brand-link">
          <img src= "logokomtar.jpg" alt="AdminLTE Logo" class="brand-image img-circle elevation-3" style="opacity: .9">
          <span class="brand-text font-weight-light" style="color: #FFFFFF;">Ahli Sejarah</span>
    </a>

        <!-- Sidebar -->
          <div class="sidebar">
                <!-- Sidebar Menu -->
                 <nav class="mt-2">
            <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
              <!-- Add icons to the links using the .nav-icon class
                   with font-awesome or any other icon font library -->
              <li class="nav-item">
          <a href="http://localhost/Johor/index3d.php" class="nav-link " style="color: black;">
            <i class="nav-icon fas fa-tachometer-alt"></i>
            <p>
              LAMAN UTAMA
            </p>
          </a>
                </li>


               <li class="nav-item">
                <a href="#" class="nav-link  " style="color: black;">
                  <i class="nav-icon fas fa-tag"></i>
                  <p>
                     KOLEKSI
                    <i class="fas fa-angle-left right"></i>
                  </p>
                </a>
                <ul class="nav nav-treeview">       
              <li class="nav-item">
                  <a href="http://localhost/Johor/pages/tables/table1h.php" class="nav-link " style="color: black; padding-left: 52px;">


                  <i class="nav-icon fas fa-edit"></i>
                  <p>
                    Pengecaman
                    <span class="right badge badge-danger"></span>
                 </p>
                </a>
                 </ul>
              </li>
            <li class="nav-item">
                <a href="#" class="nav-link active " style="color: black;">
                    <i class="nav-icon fas fa-box"></i>
                    <p>
                        ARTIFAK & ANTIK
                        <i class="fas fa-angle-left right"></i>
                    </p>
                </a>
                <ul class="nav nav-treeview">
            <li class="nav-item">
        <a href="http://localhost/Johor/pages/tables/antique_table.php" class="nav-link active " style="color: black; padding-left: 52px;">
            <i class="nav-icon fas fa-table"></i>
            <p>
                Antik
                <span class="right badge badge-danger"></span>
            </p>
        </a>
    </li>        <li class="nav-item">
                        <a href="http://localhost/Johor/pages/tables/artefact_table.php" class="nav-link " style="color: black; padding-left: 52px;">
                            <i class="nav-icon fas fa-plus"></i>
                            <p>
                                Artifak
                                <span class="right badge badge-danger"></span>
                            </p>
                        </a>
                    </li>
                </ul>
            </li>
        </ul>
    </nav>
                <!-- /.sidebar-menu -->
            </div>
            <!-- /.sidebar -->
        </aside>

        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1>Antik</h1>
                        </div>
                        <div class="col-sm-6">
                            <ol class="breadcrumb float-sm-right">
                            </ol>
                        </div>
                    </div>
                </div><!-- /.container-fluid -->
            </section>

            <!-- Main content -->
      <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-12">    
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title"></h3>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body">
                            <table class="table table-hover">
                                <thead>
                                    <tr>
                                        <th style="width: 10%;">Jenis Koleksi</th>
                                        <th style="width: 15%;">Nama Koleksi</th>
                                        <th style="width: 20%;">Perincian Koleksi</th>
                                        <th style="width: 15%;">Lokasi Penemuan</th>
                                        <th style="width: 10%;">Era Kesultanan</th>
                                        <th style="width: 15%;">Tarikh Daftar Masuk</th>
                                        <th style="width: 5%;">Foto</th>
                                        <th style="width: 20%;">Tindakan</th>
                                    </tr>
                                </thead>
                              <tbody>
                    <?php foreach ($items as $item): ?>
                        <tr>
                            <td><?php echo htmlspecialchars($item['ItemName']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemType']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemDesc']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemLocation']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemPeriod']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemRegDate']); ?></td>
                            <td><img src="../../images/<?php echo htmlspecialchars($item['Image']); ?>" alt="<?php echo htmlspecialchars($item['ItemName']); ?>" width="100"></td>
                            <td>
                                <form method='POST' action=''>
                                    <input type='hidden' name='itemid' value='<?php echo $item['ItemID']; ?>'>
                                    <button type='submit' class='btn btn-primary' name='update_item_validity'>Tukar menjadi artifak</button>
                                </form>
                            </td>
                        </tr>
                    <?php endforeach; ?>
                </tbody> <tbody>
                    <?php foreach ($items as $item): ?>
                        <tr>
                            <td><?php echo htmlspecialchars($item['ItemName']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemType']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemDesc']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemLocation']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemPeriod']); ?></td>
                            <td><?php echo htmlspecialchars($item['ItemRegDate']); ?></td>
                            <td><img src="../../images/<?php echo htmlspecialchars($item['Image']); ?>" alt="<?php echo htmlspecialchars($item['ItemName']); ?>" width="100"></td>
                            <td>
                                <form method='POST' action=''>
                                    <input type='hidden' name='itemid' value='<?php echo $item['ItemID']; ?>'>
                                    <button type='submit' class='btn btn-primary' name='update_item_validity'>Tukar menjadi artifak</button>
                                </form>
                            </td>
                        </tr>
                    <?php endforeach; ?>
                </tbody>
                            </table>
                        </div>
                        <!-- /.card-body -->
                    </div>
                    <!-- /.card -->
                </div>
                <!-- /.col -->
            </div>
            <!-- /.row -->
        </div>
        <!-- /.container-fluid -->
    </section>
        <!-- /.content -->
    </div>
          <footer class="main-footer">
            <div class="float-right d-none d-sm-block">
                <b>Version</b> 3.2.0
            </div>
            <strong>Copyright &copy; 2014-2021 <a href="https://adminlte.io">AdminLTE.io</a>.</strong> All rights reserved.
        </footer>

    <!-- /.content-wrapper -->
    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Control sidebar content goes here -->
    </aside>
    <!-- /.control-sidebar -->
</div>
<!-- ./wrapper -->
<script>
        $(document).ready(function() {
            $('#example1').DataTable();
        });
    </script>
<!-- jQuery -->
<script src="../../plugins/jquery/jquery.min.js"></script>
<!-- Bootstrap 4 -->
<script src="../../plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<!-- DataTables  & Plugins -->
<script src="../../plugins/datatables/jquery.dataTables.min.js"></script>
<script src="../../plugins/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../../plugins/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../../plugins/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="../../plugins/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="../../plugins/jszip/jszip.min.js"></script>
<script src="../../plugins/pdfmake/pdfmake.min.js"></script>
<script src="../../plugins/pdfmake/vfs_fonts.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.print.min.js"></script>
<script src="../../plugins/datatables-buttons/js/buttons.colVis.min.js"></script>
<!-- AdminLTE App -->
<script src="../../dist/js/adminlte.min.js"></script>
<!-- AdminLTE for demo purposes -->
<!-- Page specific script -->

</body>
</html>


Function Calls

None

Variables

None

Stats

MD5 b6c2030c216dcab0eeb10070b972b979
Eval Count 0
Decode Time 105 ms