<!-- DataTables -->
    <link rel="stylesheet" href="./plugins/datatables/dataTables.bootstrap.css">


 <!-- DataTables -->
    <script src="./plugins/datatables/jquery.dataTables.min.js"></script>
    <script src="./plugins/datatables/dataTables.bootstrap.min.js"></script>


<script language="javascript">
function confirmDel() {
 var agree=confirm("Bu içeriği silmek istediğinizden emin misiniz?\nBu işlem geri alınamaz!");
 if (agree) {
  return true ; }
 else {
  return false ;}
}
</script>





<!-- Add mousewheel plugin (this is optional) -->
<script type="text/javascript" src="fancybox/lib/jquery.mousewheel-3.0.6.pack.js"></script>

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

<!-- Optionally add helpers - button, thumbnail and/or media -->
<link rel="stylesheet" href="fancybox/source/helpers/jquery.fancybox-buttons.css?v=1.0.5" type="text/css" media="screen" />
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-buttons.js?v=1.0.5"></script>
<script type="text/javascript" src="fancybox/source/helpers/jquery.fancybox-media.js?v=1.0.6"></script>

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






<script type="text/javascript">
	$(document).ready(function() {
	$(".various").fancybox({
		maxWidth	: 800,
		maxHeight	: 600,
		fitToView	: false,
		width		: '70%',
		height		: '70%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none'
	});
});
</script>
 <div class="box">
                <div class="box-header">
                  <h3 class="box-title">Hasta Listesi</h3>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table id="example1" class="table table-bordered table-striped">
                    <thead>
                      <tr>
                        <th>Adı ve Soyadı</th>
                        <th>Telefon Numarası</th>
                        <th>Görüş Ekle</th>
<th>Yapılan Görüşmeler</th>
<th>İşlem Ekle</th>
                      
                        <th>Düzenle</th>

<th>Yapılan İşlemler</th>
  <th>Sil</th>
                      </tr>
                    </thead>
                    




<tbody>




<?php echo $_SESSION['isim']; ?>
      <?php
include'baglan.php';
 session_start();

$search=$_POST["search"];

$_SESSION["isim"]=$_POST["search"];

if(empty($search)) {
      echo 'L&uuml;tfen Boş Bırakmayınız.';
   } else {
$result = mysql_query("SELECT * FROM hastalar WHERE HASTA_ADI LIKE '%$search%' or HASTA_TELEFON LIKE '%$search%'");
mysql_query("SET NAMES 'latin5'");  
$bulunan=0;
while($veri=mysql_fetch_array($result))
{
$bulunan++;
 
 
   

echo '
<tr>
 
	<td><b>',$veri["HASTA_ADI"],'</b></td>
	<td  >',$veri["HASTA_TELEFON"],'</td>
 
 
 <td   ><a class="various fancybox.iframe" href="hedef/gorusmeekle.php?HASTA_ID=',$veri["HASTA_ID"],'"> 

<button class="btn btn-block btn-warning"> <i class="fa fa-fw fa-save"></i>Görüşme Ekle</button></a></td>

  <td   ><a class="various fancybox.iframe" href="hedef/gorusmeler.php?HASTA_ID=',$veri["HASTA_ID"],'"> 

<button  class="btn btn-primary btn-sm"><i class="fa fa-fw fa-eye"></i>Yapılan Görüşmeler</button></a></td>



 <td  ><a class="various fancybox.iframe"   href="hedef/islemekle.php?HASTA_ID=',$veri["HASTA_ID"],'"> 

<button class="btn btn-info btn-sm">İşlem Ekle</button></a></td>



<td><a  href="admin.php?target=hastaduzenle&?&HASTA_ID=',$veri["HASTA_ID"],'"> 

<button  class="btn btn-success btn-sm" ><i class="fa fa-fw fa-edit"></i>Düzenle</button></a></td>



  <td   ><a class="various fancybox.iframe" href="hedef/islemler.php?HASTA_ID=',$veri["HASTA_ID"],'"> 

<button  class="btn btn-primary btn-sm"><i class="fa fa-fw fa-eye"></i>Yapılan işlemler</button></a></td>


  <td   ><a class="various fancybox.iframe" href="hedef/profil.php?HASTA_ID=',$veri["HASTA_ID"],'"> 

<button  class="btn btn-primary btn-sm"><i class="fa fa-fw fa-eye"></i>Profil</button></a></td>

    <td width="90px" ><a class="kayit_sil" href="admin.php?target=hastasil-islem&?&HASTA_ID=',$veri["HASTA_ID"],'" onclick="return confirmDel();"><button class="btn btn-danger btn-sm"><i class="fa fa-fw fa-close"></i>Sil</button></a>    </td>





 
			

				
				
		 </tr>
';
}
}

?>

      </tbody>
                    
                  </table>
                </div><!-- /.box-body -->
              </div><!-- /.box -->


 








            </div><!-- /.col -->
          </div><!-- /.row -->

 <script>
      $(function () {
        $("#example1").DataTable();
        $('#example2').DataTable({
          "paging": true,
          "lengthChange": false,
          "searching": false,
          "ordering": true,
          "info": true,
          "autoWidth": false
        });
      });
    </script>
           