<?php
$adduser = $_SESSION['username_' . $dbname];
date_default_timezone_set("Asia/Kolkata");
$adddate = date("Y-m-d");
$addtime = date("h:i:sa");
$usertype = $_SESSION["usertype"];

if ($addflag != 1) {
    $getvouch = '';
    if ($addflag == 0) {
        $getvouch = $_GET[$keyfld];
    } else {
        $getvouch = $qvouch;
    }

    $result = mysqli_query($conn, "SELECT * ,DATE_FORMAT(`adddate`, '%d-%m-%Y') as addt, DATE_FORMAT(`editdate`, '%d-%m-%Y') as eddt FROM `$maindb` WHERE $keyfld='$getvouch'") or die(mysqli_error($conn));
    $get = mysqli_fetch_array($result);
}
?>
<div class="panel-heading">

    <div class="row" style="background-color:#F5F5F5">
        <div class="col-lg-3" style="color:#64CCFC"><h4><?php Echo $formname; ?></h4></div>

        <?php
//        $useradd = $get['adduser'] . "&nbsp;&nbsp;&nbsp;&nbsp;" . $get['addtime'];
//           

        $useadd = $edituser = '';
        if ($get['adduser'] != '') {
            $addt = date("d-m-Y", strtotime($get[adddate]));
            $useradd = "<span style='color:green;font-size:14px'>".$get['adduser'] . "&nbsp;&nbsp;&nbsp;" . $addt . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $get['addtime'] . "</span>";
        }
        if ($get['edituser'] != '') {
            $editdt = date("d-m-Y", strtotime($get[editdate]));

            $edituser = "<span style='color:orange;font-size:14px'>". $get['edituser'] . "&nbsp;&nbsp;&nbsp;" . $editdt . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $get['edittime']."</span>";
        }
        if ($get['adduser'] != '' && $get['edituser'] != '') {
            $user = $useradd . "<br>" . $edituser;
        } else {
            $user = $useradd . $edituser;
        }
        ?>


        <?php if ($usertype == 1) { ?>


            <div class="text-right"><label class="marg" style="">&nbsp;<?php Echo $user; ?></label><br>
            <? } ?>

        </div> 


    </div>

</div>

