<?php require_once 'ckfinder/ckfinder.php';
?>

<?php
include("baglan.php");
 
$baglan2 = mysql_query("select * from hasta where HASTA_ID='2914'"); 

 



$yaz2 = mysql_fetch_assoc($baglan2); // while dongsu icine almadim tek veri cekecegimiz icin. burda get methodunu da kullandık

 
?>

<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="ckeditor/config.js"></script>

<link rel="stylesheet" href="js/jquery.ui.all.css">
<link href="css/mstf-panel.css" rel="stylesheet" type="text/css">


<script type="text/javascript" src="ckfinder/ckfinder.js"></script>
	<script type="text/javascript">

function BrowseServer()
{
	// You can use the "CKFinder" class to render CKFinder in a page:
	var finder = new CKFinder();
	finder.basePath = '/ckfinder/';	// The path for the installation of CKFinder (default = "/ckfinder/").
	finder.selectActionFunction = SetFileField;
	finder.popup();

	// It can also be done in a single line, calling the "static"
	// popup( basePath, width, height, selectFunction ) function:
	// CKFinder.popup( '../', null, null, SetFileField ) ;
	//
	// The "popup" function can also accept an object as the only argument.
	// CKFinder.popup( { basePath : '../', selectActionFunction : SetFileField } ) ;
}

// This is a sample function which is called when a file is selected in CKFinder.
function SetFileField( fileUrl )
{
	document.getElementById( 'xFilePath' ).value = fileUrl;
}

	</script>






 

 <?php 

$date = date("Y-m-d");// current date

$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 day");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +2 week");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +1 month");
$date = strtotime(date("Y-m-d", strtotime($date)) . " +30 days");

echo $date;
?>

 
 
<div class="col-lg-3 col-xs-6">
<!-- small box -->
 <div class="small-box bg-yellow">
                                <div class="inner">
                                    <h3>

<?php
include"baglan.php";

$sorgu=mysql_query("Select * from hastalar");

$kayitlari_say=mysql_num_rows($sorgu);
echo ("$kayitlari_say");
?>
                                    </h3>
                                    <p>
                                        Kayıtlı Kişi Var
                                    </p>
                                </div>
                                <div class="icon">
                                    <i class="ion ion-person-add"></i>
                                </div>
                                <a class="small-box-footer" href="admin.php?target=hastalar">
                                    İncele &nbsp;&nbsp;<i class="fa fa-arrow-circle-right"></i>
                                </a>
                            </div>
                        </div><br><div style="clear:both;"></div>

 
<div class="row">
  <div class="nav-tabs-custom">
                                 
<div class="box">
<div class="box-header">
<h3 class="box-title">Arayanlar Listesi</h3>
</div><!-- /.box-header -->
<div class="box-body table-responsive">
                              <table id="example2" class="table table-bordered table-hover">
                                        <thead>
                                            <tr>
                                                <th>Arama Tarihi</th>
                                                <th>Adı ve Soyadı</th>
                                               
                                                <th>Telefon Numarası</th>
                                               
                                            </tr>
                                        </thead>
                                        <tbody>		
 	<tr>

<?php
  





    include("baglan.php");
	
$gosterim=30;
 $sayfa=@$_GET['sayfa'];
 
if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}

 
$k_sayisi=mysql_num_rows(mysql_query("Select ARAMA_ID From aramalar"));
 
$s_sayisi=ceil($k_sayisi/$gosterim);
 
$ilk_kayit=($sayfa*$gosterim)-$gosterim;
	
	
	
  
  $sql = mysql_query("SELECT * FROM aramalar  Order By ARAMA_ID desc Limit $ilk_kayit,$gosterim");
 $i = 0; 
    $sutun    = 1;  
$s    = 0; 
    
    


	while($veri = mysql_fetch_assoc($sql)) 
	
    { 
	
$i++; 

    

	
        echo ' 
      	


 <td><b>',$veri["ARAMA_TARIH"],'</b></td>
	<td><b>',$veri["ARAMA_BASLIK"],'</b></td>
	<td  >',$veri["ARAMA_TEL"],'</td>
 
 

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


 
			

				
				
				 </tr> 
				'; 
		
		
        if ($i % $sutun == 0) 
        { 
        echo ' 
 

<ul class="pagination">
   '; 
        } 
    } 

if($sayfa!=1){
   
}

for($i=1;$i<=$s_sayisi;$i++){
    

}
 
if($sayfa!=$s_sayisi){
  

} 
?> 

</div>
    </div>

                                            
                                        </tfoot>
                                    </table>
                                </div>
     
    </div>
               <br>
 <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">Bugün Doğum Günü Olanlar</h3>
                                </div><!-- /.box-header -->
                                <div class="box-body">
                                  







 

 <?php
  





    include("baglan.php");
	
$gosterim=10;
 $sayfa=@$_GET['sayfa'];
 
if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}

 
$k_sayisi=mysql_num_rows(mysql_query("Select HASTA_ID From hastalar"));


$s_sayisi=ceil($k_sayisi/$gosterim);
 
$ilk_kayit=($sayfa*$gosterim)-$gosterim;
	
	
 $mesut=date('d.m');

 
  $sql = mysql_query("SELECT * FROM hastalar WHERE HASTA_DOGUM_TARIHI LIKE '%$mesut%' Order By HASTA_ADI desc Limit $ilk_kayit,$gosterim");
 $i = 0; 
    $sutun    = 1;  
$s    = 0; 
    
    

	while($veri = mysql_fetch_assoc($sql)) 



	
    {
 



$i++; 



	
        echo ' 




 <table class="table table-bordered">
                                        <tr>
                                            
                                            <th>Doğum Tarihi</th>
                                            <th>Adı ve Soyadı</th>
                                  
                                        </tr>
                                        <tr>
                                        
                                            <td>   ',$veri["HASTA_DOGUM_TARIHI"],'  </td>
                                             
                                            <td> ',$veri["HASTA_ADI"],' </td>
                                        </tr>
                          
                                        
                                    </table>



 
   
   
			

			   
			 
				';  

		
		
        if ($i % $sutun == 0) 
        { 
        echo ' 
 

<ul class="pagination">
   '; 
        } 
    } 

if($sayfa!=1){
   
}

for($i=1;$i<=$s_sayisi;$i++){
    

}

if($sayfa!=$s_sayisi){
  

} 
?>


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


<!--
<form name="form1" method="post" action="admin.php?target=mailgonder">
  <label>
  <textarea name="editor1" cols="40" rows="10" id="editor1"></textarea>


	    <script type="text/javascript">
		CKEDITOR.replace( 'editor1',
    {

        filebrowserBrowseUrl : 'ckfinder/ckfinder.html',
        filebrowserImageBrowseUrl : 'ckfinder/ckfinder.html?Type=Images',
        filebrowserFlashBrowseUrl : 'ckfinder/ckfinder.html?Type=Flash',
        filebrowserUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
        filebrowserImageUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
        filebrowserFlashUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
    });
			</script>
  </label>
  <br>
  <label>
  <input type="submit" name="button" id="button" value="Mail Gönder">
  </label>
</form> !-->




 

<br>
<div class="col-md-4">
                            <!-- Success box -->
                            <div class="box box-solid box-primary">
                                <div class="box-header">
                                    <h3 class="box-title">Gelecek Randevular</h3>
                                    <div class="box-tools pull-right">
                                        <button data-widget="collapse" class="btn btn-primary btn-xs"><i class="fa fa-minus"></i></button>
                                        <button data-widget="remove" class="btn btn-primary btn-xs"><i class="fa fa-times"></i></button>
                                    </div>
                                </div>
                                <div class="box-body">
                                 <?php
  





    include("baglan.php");
	
$gosterim=10;
 $sayfa=@$_GET['sayfa'];
 
if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}

 
$k_sayisi=mysql_num_rows(mysql_query("Select HATIRLATMA_ID From hatirlatmalar"));
 
$s_sayisi=ceil($k_sayisi/$gosterim);
 
$ilk_kayit=($sayfa*$gosterim)-$gosterim;
	
	
	
  
  $sql = mysql_query("SELECT * FROM hatirlatmalar WHERE HATIRLATMA_TIPI ='randevu' Order By HATIRLATMA_TARIH desc Limit $ilk_kayit,$gosterim");
 $i = 0; 
    $sutun    = 1;  
$s    = 0; 
    
    

	while($veri = mysql_fetch_assoc($sql)) 



	
    {


$sonuc=strtotime($veri["HATIRLATMA_TARIH"]);



$i++; 


 


	
        echo ' 
    
 
          

  
<b style="color:red;">',$veri["HATIRLATMA_TARIH"],'</b>
  ',$veri["HATIRLATMA_BASLIK"],'  <br>
  <span style="font-size:12px;"> ',$veri["HATIRLATMA_ACIKLAMA"],'  </span>
  	<br>
 
			

			   
			 
				';  

		
		
        if ($i % $sutun == 0) 
        { 
        echo ' 
 

<ul class="pagination">
   '; 
        } 
    } 

if($sayfa!=1){
   
}

for($i=1;$i<=$s_sayisi;$i++){
    

}

if($sayfa!=$s_sayisi){
  

} 
?>
                                   
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
                        </div>



<div class="col-md-4">
                            <!-- Success box -->
                            <div class="box box-solid box-success">
                                <div class="box-header">
                                    <h3 class="box-title">Ödemeler</h3>
                                    <div class="box-tools pull-right">
                                        <button data-widget="collapse" class="btn btn-success btn-sm"><i class="fa fa-minus"></i></button>
                                        <button data-widget="remove" class="btn btn-success btn-sm"><i class="fa fa-times"></i></button>
                                    </div>
                                </div>
                                <div class="box-body">
                                  
                                    <?php
  





    include("baglan.php");
	
$gosterim=10;
 $sayfa=@$_GET['sayfa'];
 
if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}

 
$k_sayisi=mysql_num_rows(mysql_query("Select HATIRLATMA_ID From hatirlatmalar"));
 
$s_sayisi=ceil($k_sayisi/$gosterim);
 
$ilk_kayit=($sayfa*$gosterim)-$gosterim;
	
	
	
  
  $sql = mysql_query("SELECT * FROM hatirlatmalar WHERE HATIRLATMA_TIPI ='odeme' Order By HATIRLATMA_TARIH desc Limit $ilk_kayit,$gosterim");
 $i = 0; 
    $sutun    = 1;  
$s    = 0; 
    
    


	while($veri = mysql_fetch_assoc($sql)) 



	
    {






$i++; 






	
        echo ' 
      	
 
                                            
        
 <b style="color:red;">',$veri["HATIRLATMA_TARIH"],'</b> 
  ',$veri["HATIRLATMA_BASLIK"],'  
 
 
  	<br>

 
			

				
				
			 
				';  
		
		
        if ($i % $sutun == 0) 
        { 
        echo ' 
 

<ul class="pagination">
   '; 
        } 
    } 

if($sayfa!=1){
   
}

for($i=1;$i<=$s_sayisi;$i++){
    

}

if($sayfa!=$s_sayisi){
  

} 
?>
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
                        </div>



<div class="col-md-4">
                            <!-- Success box -->
                            <div class="box box-solid box-warning">
                                <div class="box-header">
                                    <h3 class="box-title">Hatırlatmalar</h3>
                                    <div class="box-tools pull-right">
                                        <button data-widget="collapse" class="btn btn-warning btn-sm"><i class="fa fa-minus"></i></button>
                                        <button data-widget="remove" class="btn btn-warning btn-sm"><i class="fa fa-times"></i></button>
                                    </div>
                                </div>
                                <div class="box-body">
                                    <?php
  





    include("baglan.php");
	
$gosterim=10;
 $sayfa=@$_GET['sayfa'];
 
if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}

 
$k_sayisi=mysql_num_rows(mysql_query("Select HATIRLATMA_ID From hatirlatmalar"));
 
$s_sayisi=ceil($k_sayisi/$gosterim);
 
$ilk_kayit=($sayfa*$gosterim)-$gosterim;
	
	
	
  
  $sql = mysql_query("SELECT * FROM hatirlatmalar WHERE HATIRLATMA_TIPI ='hatirlatma' Order By HATIRLATMA_TARIH desc Limit $ilk_kayit,$gosterim");
 $i = 0; 
    $sutun    = 1;  
$s    = 0; 
    
    


	while($veri = mysql_fetch_assoc($sql)) 



	
    {






$i++; 






	
        echo ' 
      	
 <b style="color:red;">',$veri["HATIRLATMA_TARIH"],'</b> 
  ',$veri["HATIRLATMA_BASLIK"],'  
 
 
  	<br>
				';  
		
		
        if ($i % $sutun == 0) 
        { 
        echo ' 
 

<ul class="pagination">
   '; 
        } 
    } 

if($sayfa!=1){
   
}

for($i=1;$i<=$s_sayisi;$i++){
    

}

if($sayfa!=$s_sayisi){
  

} 
?>
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
                        </div>













<div class="col-md-4" style="width:100%">
                            <!-- Danger box -->
                            <div class="box box-solid box-danger">
                                <div class="box-header">
                                    <h3 class="box-title">Ödemesi Bulunan Kişiler</h3>
                                    <div class="box-tools pull-right">
                                        <button data-widget="collapse" class="btn btn-danger btn-sm"><i class="fa fa-minus"></i></button>
                                        <button data-widget="remove" class="btn btn-danger btn-sm"><i class="fa fa-times"></i></button>
                                    </div>
                                </div>
                                <div class="box-body">



<div class="box-body table-responsive">
                                    <div role="grid" class="dataTables_wrapper form-inline" id="example2_wrapper" style="margin-top:-150px;"><div class="row"><div class="col-xs-6"></div><div class="col-xs-6"></div></div><table class="table table-bordered table-hover dataTable" id="example2" aria-describedby="example2_info">
                                        <thead>
                                            <tr role="row"><th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">İşlem Tarihi</th>
<th class="sorting_asc" role="columnheader" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column descending">Adı ve Soyadı</th>
<th class="sorting" role="columnheader" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">Fiyat</th>
<th class="sorting" role="columnheader" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">Ödenen</th>
<th class="sorting" role="columnheader" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">Kalan</th> </tr>
                                        </thead>
                                        
                                      
                                    <tbody role="alert" aria-live="polite" aria-relevant="all">
<?php
  





    include("baglan.php");
	
$gosterim=30;
 $sayfa=@$_GET['sayfa'];
 
if(empty($sayfa) || !is_numeric($sayfa)){$sayfa=1;}

 
$k_sayisi=mysql_num_rows(mysql_query("Select HASTA_ID From hasta"));
 
$s_sayisi=ceil($k_sayisi/$gosterim);
 
$ilk_kayit=($sayfa*$gosterim)-$gosterim;
	
	
	
  
  $sql = mysql_query("SELECT * FROM hasta WHERE HASTA_KALAN >'1'  Order By HASTA_ID desc Limit $ilk_kayit,$gosterim");
 $i = 0; 
    $sutun    = 1;  
$s    = 0; 
    
    


	while($veri = mysql_fetch_assoc($sql)) 



	
    {


$fiyat = $veri['HASTA_FIYATI'] ;
$odenen=$veri['HASTA_ODENEN'] ;
$kalan =  $fiyat -  $odenen ;

if ($kalan>'1'){	
$i++; 






	
        echo ' 
      	
<tr class="odd">

                                            
        
  
<td class=" "><b>',$veri["HASTA_ISLEM_TARIHI"],'</b></td>
<td class=" "><b>',$veri["HASTA_ADI"],'</b></td>
 
<td class=" "  >',$veri["HASTA_FIYATI"],'</td>
 <td   class=" ">',$veri["HASTA_ODENEN"],'</td>
<td  class=" "><b style="color:red; font-size:20px;"> ',$kalan,' TL</b></td>
 

 
			

				
				
				 </tr> 
				'; }
		
		
        if ($i % $sutun == 0) 
        { 
        echo ' 
 

<ul class="pagination">
   '; 
        } 
    } 

if($sayfa!=1){
   
}

for($i=1;$i<=$s_sayisi;$i++){
    

}
//en son sayfaya gitme baÃ¯Â¿Â½lantÃ¯Â¿Â½sÃ¯Â¿Â½
if($sayfa!=$s_sayisi){
  

} 
?>

 </tbody>
</table>
</div>



</div>

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