<?php
include '../includes/connection.php';

$id_user=$_SESSION['id'];
$branch=$_SESSION['branch_id'];
$business=$_SESSION['business_id'];
$sql = "SELECT * FROM business where business_id='$business'";
$sql1 = mysqli_query($conn,"SELECT * FROM branches where branch_id='$branch'");
$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) > 0) {
    // output data of each row
    while($row = mysqli_fetch_assoc($result)) {
        $businessname=$row['business_name'];
        
    }
} else {
    echo "0 results";
}
$row1 = mysqli_fetch_array($sql1);
$branch_name=$row1['branch_name'];
$businesscontact=$row1['contact'];
$businessemail=$row1['email'];
$businessaddress=$row1['location'];
?>
        <div class="row" >
          <div class="col-lg-10 col-md-10 col-sm-10 col-xs-12">
            <h4 style="text-align:center; font-size: 30px;"><?php echo $businessname ?></h4>
            <?php
    $checkbr = mysqli_fetch_array(mysqli_query($conn,"SELECT indicate_branch from receipt_settings where branch_id='$branch'"));
    $bvalue=$checkbr['indicate_branch'];
    if ($bvalue==1) {
        ?>
        <div><center><strong><?php echo $branch_name ?> </strong></center></div>
        <?php
    }
    ?>
            <!-- <div class="col-lg-2 col-md-2 col-sm-2 col-xs-2"><img src="../images/logo.PNG" width="100%" height="100%"></div> -->
            <!-- <div class="col-lg-6 col-md-6 col-sm-6 col-xs-8"> -->
        
        <div style="text-align:center; font-size: 25px;"><strong>Location: <?php echo $businessaddress ?></strong></div>
        <div style="text-align:center; font-size: 25px;"><strong>TEl: <?php echo $businesscontact ?></strong></div>
        <div style="text-align:center; font-size: 25px;"><strong>Email: <?php echo $businessemail ?></strong></div>
        </div>
        <!-- <div class="ol-lg-2 col-md-2 col-sm-2 col-xs-2"> <img src="../images/COA.jpg"></div> -->
      </div>

    </div>