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

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

    $resultu = 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));
    $getu = mysqli_fetch_array($resultu);
}
?>
<!--<div class="panel-heading">-->

<!--<div class="row" style="background-color:#F5F5F5">-->
<!--        <div class="col-lg-6" style="color:inherit"><h4><?php Echo $formname; ?></h4></div>-->
<h3 class="panel-title" style="color:#78909C "><?php Echo $formname; ?></h3>

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

    $edituser = "<span style='color:orange;font-size:14px'>" . $getu['edituser'] . "&nbsp;&nbsp;&nbsp;" . $editdt . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" . $getu['edittime'] . "</span>";
}
if ($getu['adduser'] != '' && $getu['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>-->

