<?php  
    $id = intval($_GET['id']);
    $vl = $db->get_rowData('bazar_visit','id',$id);
    if(empty($vl)){$error=fl();setMessage(63,'bazar visit');}
    elseif($vl['createdBy']!=USER_ID){$error=fl();setMessage(63,'bazar visit');}
    else{
        $bazar  = $db->get_rowData('bazar','id',$vl['bazar_id']);
       
        $vl['entry_time'] = $general->make_date($vl['entry_time'],'time');
        $vl['note'] = $general->content_show($vl['note']);
    }
    if(isset($error)){$general->redirect(APP_URL.'/?mdl=bazar-visit-list');}
    
?>

<section class="mb-4" id="sale_bazar">
    <div class="card">
        <div class="card-header text-center py-3"> 
            <h5 class="mb-0 text-center">
                <strong>Aazar visit Details</strong>
            </h5>
        </div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-12" id="reportbazar">
                    <div id="details_top">
                        <table class="table table-borderd">
                            <tr><td>Entry date time</td><td><?=$vl['entry_time']?></td></tr>
                            <tr><td>Bazar</td><td><?=$bazar['title']?></td></tr>
                            <tr><td>Note</td><td><?=$vl['note']?></td></tr>
                        </table>
                    </div>
                    
                </div>
            </div>
        </div>
    </div>
</section>
