0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.139.236.144


Current Path : /var/www/html/oums/src/
Upload File :
Current File : /var/www/html/oums/src/home_inventory.php

<?php
include("sys_connect.php");
include("sys_mainphp.php");
include("sys_session.php");
?>

<div style="margin-bottom: 5px;" class="head_blue">Inventory</div>
<ul class="nav nav-tabs">
    <li class="active"><a data-toggle="tab" href="#menu1">Stock Status</a></li>
    <li><a data-toggle="tab" href="#menu2">Requirement</a></li>
</ul>

<div class="tab-content" id="home-content-note">
    <div id="menu1" class="tab-pane fade in active">
        <?php
        if ($type_id == 'ADMIN') {
            $mysql = "select * from masdept where fdeptstat='T' and fdeleted<>'T' order by fdeptname";
        } else {
            $mysql = "select * from masdept ";
            $mysql .= "inner join masdept_user on masdept.fdeptcode = masdept_user.fdeptcode ";
            $mysql .= "and fusercode='$user_id' and fdeptstat='T' order by fdeptname";
        }

        $myres = mysqli_query($mycon, $mysql);
        while ($myrow = mysqli_fetch_assoc($myres)) {
            echo "<div class='panel-group' style='padding:0px; margin-bottom:2px; border-radius:0px;'>";
            echo "<div class='panel panel-default' style='padding:0px; margin:0px; border-radius:0px;'>";
            echo "<div class='panel-heading' style='padding:0px; margin:0px; border-radius:0px;'>";
            echo "<a data-toggle='collapse' href='#$myrow[fdeptcode]'>";
            echo "$myrow[fdeptname]";
            echo "</a>";
            echo "</div>";
            echo "<div id='$myrow[fdeptcode]' class='panel-collapse collapse'>";
            echo "<div class='panel-body' style='padding:0px; margin:0px;'>";
            echo "Details not available";
            echo "</div>";
            echo "</div>";
            echo "</div>";
            echo "</div>";
        }
        ?>
    </div>

    <div id="menu2" class="tab-pane fade">
        <?php
        if ($type_id == 'ADMIN') {
            $mysql = "select * from masdept where fdeptstat='T' and fdeleted<>'T' order by fdeptname";
        } else {
            $mysql = "select * from masdept ";
            $mysql .= "inner join masdept_user on masdept.fdeptcode = masdept_user.fdeptcode ";
            $mysql .= "and fusercode='$user_id' and fdeptstat='T' order by fdeptname";
        }

        $myres = mysqli_query($mycon, $mysql);
        while ($myrow = mysqli_fetch_assoc($myres)) {
            echo "<div class='panel-group' style='padding:0px; margin-bottom:2px; border-radius:0px;'>";
            echo "<div class='panel panel-default' style='padding:0px; margin:0px; border-radius:0px;'>";
            echo "<div class='panel-heading' style='padding:0px; margin:0px; border-radius:0px;'>";
            echo "<a data-toggle='collapse' href='#x$myrow[fdeptcode]'>";
            echo "$myrow[fdeptname]";
            echo "</a>";
            echo "</div>";
            echo "<div id='x$myrow[fdeptcode]' class='panel-collapse collapse'>";
            echo "<div class='panel-body' style='padding:0px; margin:0px;'>";
            echo "Details not available";
            echo "</div>";
            echo "</div>";
            echo "</div>";
            echo "</div>";
        }
        ?>
    </div>
</div>