<?php require('header.php');

$bugun = date("Y-m-d");
$yenitarih = strtotime('-1 day',strtotime($bugun));
$yenitarih = date('Y.m.d' ,$yenitarih );


?>

<body onload="setTimeout('timeout()', 50)"></body>

<div>
        <ul class="breadcrumb">
            <li>
                <a href="posnet.php">Anasayfa</a>
            </li>
            <li>
                <a href="banka.php">Kredi Kartı Detay</a>
            </li>
        </ul>
    </div>

<div class="row">
        <div class="box col-md-12">
            <div class="box-inner">
                <div class="box-header well" data-original-title="">
                    <h2><?php echo $bugun; ?> &nbsp Kredi Kartı Durum</h2>

                    <div class="box-icon">
                        
                        <a href="#" class="btn btn-minimize btn-round btn-default"><i
                                class="glyphicon glyphicon-chevron-up"></i></a>
                        <a href="#" class="btn btn-close btn-round btn-default"><i
                                class="glyphicon glyphicon-remove"></i></a>
                    </div>
                </div>
				<div id="main_fb">
   <div id="friend_list">
                <div class="box-content">
                    <table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
                        <thead>
                    <th><center>Banka Adı</center></th>
                    <th><center>Çekilen Tutar</center></th>
               
               
                    
                        </thead>

						<?php 

$onay =odbc_exec($conn," 
SELECT odeme_tip,sum(odeme)kart,no as kodu
  FROM [online_ciro].[dbo].[belge_odeme] where odeme_tip = 'K.KART' 
  AND CAST(tarih AS date) = '2024-05-23'  group by odeme_tip,no
   ");
  
   while($kayit=odbc_fetch_array($onay))
	{

  $kodu = $kayit["kodu"];
  $tutar = $kayit["kart"];
  $toplam += $kayit["kart"];
 
  echo $toplam;
$banka = array(
'46' 	 =>'Akbank',
'203'	 =>'Albaraka',
'134'	 =>'Deniz Bank',
'62' 	 =>'Garanti',
'12' 	 =>'Halk Bank',
'123' 	 =>'HSBC Bank',
'99' 	 =>'ING Bank',
'64' 	 =>'İş Bankası',
'205' 	 =>'Kuveyt Türk',
'111' 	 =>'QNB Finansbank',
'02' 	 =>'Şekerbank',
'32' 	 =>'Teb',
'206' 	 =>'Türkiye Finans',
'15' 	 =>'Vakıf Bank',
'67' 	 =>'Yapı Kredi',
'01' 	 =>'Ziraat Bankası',
'05' 	 =>'Veresiye',
'5' 	 =>'Veresiye',
'0110' 	 =>'Tanımsız',

);

?> 


                        <tbody>
                        <tr>
                          <td><center><h4> <?php  echo $banka[$kodu]; ?> </h4> </td>
                         
                            <td >						
                                <span  class="white"><center> <?php  echo $tutar.' '.₺; ?></center> </span>
                            </td></center>
				 
                        </tr>
                     <?php } ?>

                      <tr>
					  <td ><center></center></td>
					  <td><center></center><h4> <span class="yellow"><center> <?php  echo $toplam.' '.₺; ?></h4></center> </span></td>
					
					  
					  </tr>
                        </tbody>
                    </table>
                   
                </div>
            </div>
        </div>
    </div><!--/span-->
	</div>
</div>

<?php require('footer.php'); ?>
