<?php include_once('../header_owner.php')?>

<?php
if(!check_login()){
	header("Location: ".WEB_URL."logout.php");
	die();
}
?>
<!-- Content Header (Page header) -->

<section class="content-header">
  <h1> Owner </h1>
  <ol class="breadcrumb">
    <li><a href="<?= WEB_URL?>o_dashboard.php"><i class="fa fa-dashboard"></i> Home</a></li>
    <li class="active">Owner</li>
  </ol>
</section>
<!-- Main content -->
<section class="content">
<!-- Full Width boxes (Stat box) -->
<div class="row">
  <div class="col-xs-12">
    <div align="right" style="margin-bottom:1%;"><a class="btn btn-primary" data-toggle="tooltip" href="<?= WEB_URL; ?>o_dashboard.php" data-original-title="Dashboard"><i class="fa fa-dashboard"></i></a></div>
    <div class="box box-info">
      <!-- /.box-header -->
      <div class="box-body">
        <?php
				$result = mysqli_query($link,"Select * from tbl_add_owner where ownid = '" . (int)$_SESSION['objLogin']['ownid'] . "' order by ownid desc");
				if($row = mysqli_fetch_array($result)){
					
					$image = WEB_URL . 'img/no_image.jpg';	
		if(file_exists(ROOT_PATH . '/img/upload/' . $row['image']) && $row['image'] != ''){
			$image = WEB_URL . 'img/upload/' . $row['image'];
		}
					
					 ?>
          <div class="modal-content">
            <div class="modal-header orange_header">
              <button aria-label="Close" data-dismiss="modal" class="close" type="button"><span aria-hidden="true"><i class="fa fa-close"></i></span></button>
              <h3 class="modal-title">Owner Details</h3>
            </div>
            <div class="modal-body model_view" align="center">&nbsp;
              <div><img class="photo_img_round" style="width:100px;height:100px;" src="<?= $image;  ?>" /></div>
              <div class="model_title"><?= $row['o_name']; ?></div>
            </div>
            <div class="modal-body">
              <h3 style="text-decoration:underline;">Personal Infromation</h3>
              <div class="row">
                <div class="col-xs-12"> <b>Name :</b> <?= $row['o_name']; ?><br/>
                  <b>Email :</b> <?= $row['o_email']; ?><br/>
                  <b>Contact :</b> <?= $row['o_contact']; ?><br/>
				  <b>Present Address :</b> <?= $row['o_pre_address']; ?><br/>
                  <b>Permanent Address :</b> <?= $row['o_per_address']; ?><br/>
                </div>
                 <div class="col-xs-12"> <b>NID :</b> <?= $row['o_nid']; ?><br/>
                  <b>Room No:</b> <?= $row['nr_nurse_room']; ?><br/>
                  <b>Start Time:</b> <?= $row['duty_start_time']; ?>&nbsp;<?= $row['duty_start_am_pm']; ?><br/>
                  <b>End Time:</b> <?= $row['duty_end_time']; ?>&nbsp;<?= $row['duty_end_am_pm']; ?> </div>
              </div>
              </div>
            </div>
        <!-- /.modal-content -->
    <?php } mysqli_close($link); ?>
  </div>
  <!-- /.box-body -->
</div>
<!-- /.box -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
<?php include_once('../footer.php'); ?>
