        <!-- ============================================================== -->
        <!-- wrapper  -->
        <!-- ============================================================== -->
        <div class="dashboard-wrapper">
            <div class="container-fluid  dashboard-content">
                <!-- ============================================================== -->
                <!-- pageheader -->
                <!-- ============================================================== -->
                <div class="row">
                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="page-header">
                            <h2 class="pageheader-title">Master Barang</h2>
                            <div class="page-breadcrumb">
                                <nav aria-label="breadcrumb">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item"><a href="index.php" class="breadcrumb-link"><?php echo namahari_ID(date('Y-m-d')).", ".date('d-m-Y');?>, Dashboard</a></li>
                                        <li class="breadcrumb-item">Master</a></li>
                                        <li class="breadcrumb-item active" aria-current="page"><a href="?menu=master-barang" class="breadcrumb-link">List User</a></li>
                                    </ol>
                                </nav>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- ============================================================== -->
                <!-- end pageheader -->
                <!-- ============================================================== -->
                <div class="row">
                    <!-- ============================================================== -->
                    <!-- data table  -->
                    <!-- ============================================================== -->
                    <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="card">
                            <div class="card-header">
                                <h5 class="mb-0">Data List Barang</h5>
                            </div>
                            <div class="card-body">
                                <div class="table-responsive">
                                    <table id="example" class="table table-striped table-bordered second" style="width:100%">
                                        <thead>
                                            <tr>
                                                <th>Kode</th>
                                                <th>Deskripsi</th>
                                                <th>Unit 1</th>
                                                <th>Unit 2</th>
                                                <th>Ratio 2</th>
                                                <th>Unit 3</th>
                                                <th>Ratio 3</th>
                                                <th>Option</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php
                                            $MySQLi = new MySQLi($strDBHostName, $strDBUsername, $strDBPassword, $strDBName);
                                            if(isset($_GET['opt']) && isset($_GET['id']) && $_GET['opt']=="del")
                                            {
                                                $query="UPDATE item SET stsAktif=0, dttUpdate=NOW(), usrUpdate='".$_SESSION['strEmail']."' WHERE ID='".$_GET['id']."'";
                                                $MySQLi->query();
                                                if($MySQLi->affected_rows == 1)
                                                {
                                                    $strBuffer=str_replace("'", "`", str_replace('"', '`', $query));
                                                    $query="INSERT INTO tpc_log 
                                                            SET strPCHostname='".gethostbyaddr(getIPv4())."', 
                                                                strIPv4='".getIPv4()."', 
                                                                strPort='".$_SERVER['REMOTE_PORT']."', 
                                                                strTable='item', 
                                                                strQuery='".$strBuffer."', 
                                                                strKeterangan='".$_SESSION['strEmail']." menonaktifkan barang dengan no ID : ".$_GET['id']."', 
                                                                dtCreate=NOW(), 
                                                                usrCreate='".$_SESSION['strEmail']."' 
                                                            "; 
                                                    $MySQLi->query($query);
                                                }
                                            }
                                            $query="SELECT  ID, 
                                                            strKdItem, 
                                                            strDeskripsi, 
                                                            strUnit, 
                                                            strUnit2, 
                                                            strUnit3, 
                                                            iRatio2, 
                                                            iRatio3 
                                                    FROM item 
                                                    WHERE stsAktif>0 
                                                    "; 
                                            $result=$MySQLi->query($query);
                                            while($row=$result->fetch_array())
                                            {
                                               echo "<tr>
                                                        <td>".$row['strKdItem']."</td>
                                                        <td>".$row['strDeskripsi']."</td>
                                                        <td>".$row['strUnit']."</td>
                                                        <td>".$row['strUnit2']."</td>
                                                        <td>".$row['iRatio2']."</td>
                                                        <td>".$row['strUnit3']."</td>
                                                        <td>".$row['iRatio3']."</td>
                                                        <td><a href='?menu=edit-barang&id=".$row['ID']."'><i class='m-r-10 mdi mdi-tooltip-edit'></i></a>
                                                            <a href='index.php?menu=master-barang&opt=del&id=".$row['ID']."'><i class='m-r-10 mdi mdi-delete'></i></a></td>
                                                    </tr>";
                                            }
                                            ?>
                                        </tbody>
                                        <tfoot>
                                            <tr>
                                            <th>Kode</th>
                                                <th>Deskripsi</th>
                                                <th>Unit 1</th>
                                                <th>Unit 2</th>
                                                <th>Ratio 2</th>
                                                <th>Unit 3</th>
                                                <th>Ratio 3</th>
                                                <th>Option</th>
                                            </tr>
                                        </tfoot>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- ============================================================== -->
                    <!-- end data table  -->
                    <!-- ============================================================== -->
                </div>
            </div>
            <!-- ============================================================== -->
            <!-- footer -->
            <!-- ============================================================== -->
            <div class="footer">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
                            Copyright © 2024 TPC-PACK, Developed By <a href="mailto: jockie@netportal.my.id">JC Comp</a>.
                        </div>
                        <!--<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12">
                            <div class="text-md-right footer-links d-none d-sm-block">
                                <a href="javascript: void(0);">About</a>
                                <a href="javascript: void(0);">Support</a>
                                <a href="javascript: void(0);">Contact Us</a>
                            </div>
                        </div>-->
                    </div>
                </div>
            </div>
            <!-- ============================================================== -->
            <!-- end footer -->
            <!-- ============================================================== -->
        </div>
