<?php
	//include '../db_connect.php';
	//check_admin_cookie();
	include ('common/connection.php');
	$user_sql="select User_Type as type,Location from user_master where User_Name='".$_SESSION['user']."'";
$user_query=mysqli_query($con,$user_sql);
$user=mysqli_fetch_array($user_query);
$cityname=mysqli_fetch_array(mysqli_query($con,"select * from location_master where SLN='".$user['Location']."'"));
$cityname['Location_Name'];
?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Buurtzorg  | Patient Treatment Plan</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <?php include("headerlink.php"); ?>
  
  <link rel="stylesheet" href="css/data-table/bootstrap-table.css">
    	<link rel="stylesheet" href="css/data-table/bootstrap-editable.css">
  <!-- Bootstrap 3.3.7 -->
  <?php 
  //$sql_all ="select * from allocation_master where doctor_name='".$_SESSION['id']."' or nurse_name='".$_SESSION['id']."'";
  //$res_all= mysqli_query($con,$sql_all);
  //$fetch=mysqli_fetch_array($res_all);
  ?>
</head>
<body>
 <?php include("left-menu.php"); ?>
    
 
    <div class="all-content-wrapper">
        
        
       <?php include("header-menu.php"); ?> 

  <!-- Content Wrapper. Contains page content -->
  <div class="static-table-area">
    <!-- Content Header (Page header) -->
    <div class="container-fluid">
       <div class="row">
                
       <div class="col-lg-12 col-md-6 col-sm-6 col-xs-12" style="padding:30px 15px 0px;">
          <div class="sparkline9-list mt-b-30 res-mg-t-30 analysis-progrebar-ctn">
    
      <h3 style="margin:0 0 15px 0;">
        TNA Wise Roster Plan
       </h3>
    

    <!-- Main content -->
    <section class="content">
      <div class="row">
        <div class="col-xs-12">
     


          <div class="box">
             
            <!-- /.box-header -->
            <div class="box-body" style="overflow-x:auto;">
              <table id="" class="table table-bordered table-striped">
                <thead>
                <tr>
                  <th>TNA NAME</th>
                  <!--<th>Patient Ph No</th>
                  <th>Patient Address</th>-->
                  <th>Roster Plan</th>
                </tr>
                </thead>
                 <tbody>
                    
                    <?php
						if($user['Location']!='0')
						{
						$fetch_data="select * from employee_master where Status='Active' and Office_Location_City='".$cityname['Location_Name']."' and (Designation='TNA' or Designation='Junior Nurse' or Designation='Senior Nursing Attendant' or Designation='Nurse') order by First_Name";
						}
						else
						{
						$fetch_data="select * from employee_master where Status='Active' and (Designation='TNA' or Designation='Junior Nurse' or Designation='Nurse') order by First_Name";
						}
						$fetch_query=mysqli_query($con,$fetch_data);
						if(mysqli_num_rows($fetch_query)>0)
						{
							while($fetch_value=mysqli_fetch_array($fetch_query))
							{
							$tna_name=$fetch_value['First_Name']." ".$fetch_value['Last_Name'];
					?>
					<tr>
                        <td><?php echo $tna_name; ?></td>
                         <td>
                        <a href="daily-tna-roster.php?Lid=<?php echo base64_encode($fetch_value['SLN']); ?>">
                        	<button class="btn btn-info">View Plan</button>
                        </a>
                        </td>
                    </tr>
                   
                    <?php 
						}
					}else
					{
						?>
						<tr><td colspan="5" style="text-align:center;">No Data Found</td></tr>
					<?php
					}
					$outsource_master=mysqli_query($con,"select * from outsource_master where Active='Yes'");
							while($outemployee=mysqli_fetch_array($outsource_master))
							{
								?>
								<tr>
                        <td style="color:blue;"><?php echo $outemployee['Oursource_Emp']; ?></td>
                         <td>
                        <a href="daily-tna-roster.php?Lid=<?php echo base64_encode($outemployee['Temp_Emp_Id']); ?>">
                        	<button class="btn btn-info">View Plan</button>
                        </a>
                        </td>
                    </tr>
								<?php
							}
					?>
                   <!-- <tr>
                        <td>Uma Sankar Das</td>
                        <td>0000-00-00</td>
                        <td>00:00:00</td>
                        <td>
                        <a class="various5" style="text-decoration:none; color:#2a3f54;" href="view_patient_details.php?Lid=TE1TMTAwMDI=" data-fancybox-type="iframe">
                        <button class="btn btn-success">View</button>
                        </a>
                        </td>
                    </tr>
                    <tr>
                        <td>Krushna Prasad Patnaik</td>
                        <td>0000-00-00</td>
                        <td>00:00:00</td>
                        <td>
                        <a class="various5" style="text-decoration:none; color:#2a3f54;" href="view_patient_details.php?Lid=TE1TMTAwMDM=" data-fancybox-type="iframe">
                        <button class="btn btn-success">View</button>
                        </a>
                        </td>
                    </tr>
                    <tr>
                        <td>SANTOSH KUMAR ROUT 1</td>
                        <td>0000-00-00</td>
                        <td>00:00:00</td>
                        <td>
                        <a class="various5" style="text-decoration:none; color:#2a3f54;" href="view_patient_details.php?Lid=TE1TMTAwMDQ=" data-fancybox-type="iframe">
                        <button class="btn btn-success">View</button>
                        </a>
                        </td>
                    </tr>-->
                  </tbody>
              </table>
            </div>
            <!-- /.box-body -->
          </div>
          <!-- /.box -->
        </div>
        <!-- /.col -->
      </div>
      <!-- /.row -->
    </section>
    <!-- /.content -->
         </div>
       </div>
       
     </div>
    </div>
    
    </div>
    
   </div> 
    
  <!-- /.content-wrapper -->
 <div class="footer-copyright-area">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="footer-copy-right">
                            <p>Copyright © 2019. All rights reserved.</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
 
 
</div>
 
   <!-- jquery
		============================================ -->
    <script src="js/vendor/jquery-1.12.4.min.js"></script>
    <!-- bootstrap JS
		============================================ -->
    <script src="js/bootstrap.min.js"></script>
    <!-- wow JS
		============================================ -->
    <script src="js/wow.min.js"></script>
    <!-- price-slider JS
		============================================ -->
    <script src="js/jquery-price-slider.js"></script>
    <!-- meanmenu JS
		============================================ -->
    <script src="js/jquery.meanmenu.js"></script>
    <!-- owl.carousel JS
		============================================ -->
    <script src="js/owl.carousel.min.js"></script>
    <!-- sticky JS
		============================================ -->
    <script src="js/jquery.sticky.js"></script>
    <!-- scrollUp JS
		============================================ -->
    <script src="js/jquery.scrollUp.min.js"></script>
    
    
    
    <!-- datepicker JS
		============================================ -->
    <script src="js/datepicker/jquery-ui.min.js"></script>
    <script src="js/datepicker/datepicker-active.js"></script>
    
    
    
    <!-- data table JS
		============================================ -->
    <script src="js/data-table/bootstrap-table.js"></script>
    <script src="js/data-table/tableExport.js"></script>
    <script src="js/data-table/data-table-active.js"></script>
    <script src="js/data-table/bootstrap-table-editable.js"></script>
    <script src="js/data-table/bootstrap-editable.js"></script>
    <script src="js/data-table/bootstrap-table-resizable.js"></script>
    <script src="js/data-table/colResizable-1.5.source.js"></script>
    <script src="js/data-table/bootstrap-table-export.js"></script>
    
    
    
    <!-- mCustomScrollbar JS
		============================================ -->
    <script src="js/scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="js/scrollbar/mCustomScrollbar-active.js"></script>
    <!-- metisMenu JS
		============================================ -->
    <script src="js/metisMenu/metisMenu.min.js"></script>
    <script src="js/metisMenu/metisMenu-active.js"></script>
    <!-- peity JS
		============================================ -->
    <script src="js/peity/jquery.peity.min.js"></script>
    <script src="js/peity/peity-active.js"></script>
    <!-- sparkline JS
		============================================ -->
    <script src="js/sparkline/jquery.sparkline.min.js"></script>
    <script src="js/sparkline/sparkline-active.js"></script>
    <!-- tab JS
		============================================ -->
    <script src="js/tab.js"></script>
    <!-- plugins JS
		============================================ -->
    <script src="js/plugins.js"></script>
    <!-- main JS
		============================================ -->
    <script src="js/main.js"></script>
    <!-- tawk chat JS
		============================================ -->
        
         <script>
$(document).ready(function() {
   $("body").tooltip({ 
   	selector: '[data-toggle=tooltip]' 
	 });
});
 
</script>
<!------------------------Fancybox---------------------------------->

<?php include 'mobile_menu_script.php'; ?>
 
 <script type="text/javascript" src="lib/jquery.mousewheel.pack.js"></script>

<script type="text/javascript" src="source/jquery.fancybox.pack.js?v=2.1.5"></script>
	<link rel="stylesheet" type="text/css" href="source/jquery.fancybox.css" media="screen" />

<style type="text/css">
	.fancybox-custom .fancybox-skin {
		box-shadow: 0 0 50px #222;
	}
</style> 
<script>
$(document).ready(function() {
	$(".various5").fancybox({
		maxWidth	: 380,
		maxHeight	: 410,
		fitToView	: true,
		width		: '100%',
		height		: '100%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none',
		
		
		
		
	});
	
 
});

</script>
<script>
$(document).ready(function() {
	$(".various6").fancybox({
		maxWidth	: 380,
		maxHeight	: 410,
		fitToView	: true,
		width		: '100%',
		height		: '100%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none',
		
		
		
		
	});
	
 
});

</script>
</body>
</html>
