



<!DOCTYPE html>
<html>
<head>
  <title>Cetak Donatur</title>
</head>
<body>

  <style type="text/css">
    body{
      font-family: arial;
    }

    .table{
      width: 100%;
    }

    th,td{
    }
    .table,
    .table th,
    .table td {
      padding: 5px;
      border: 1px solid black;
      border-collapse: collapse;
    }
  </style>
  <?php 
    session_start();
    include '../koneksi.php';
    include '../fungsi_indotgl.php';
    include 'fungsi_penyebut.php' ;
    $tgl=date('Y-m-d') ;
    $bln = date('m');
    $bulan=($bln) ;
    $tgl_indo=tgl_indo($tgl);
    
        $tgl_s =date('Y-m-d');            
        $oleh=$_SESSION['id'];
        $kdc=$_SESSION['kdc'];
        

        $tgl_dr=$_GET['tgl_dr']; 
        $tgl_sd=$_GET['tgl_sd'];
        $kdj   = $_GET['tkdj'];
            //////////////////////////////////////////////////////////////////////////// 
        $sql2 = mysqli_query($koneksi, "SELECT kota,keuangan,gambar FROM kdkanca WHERE kd='$kdc'");
        list($kota,$keuangan,$gambar) = mysqli_fetch_array($sql2);
        $jabatan='Bidang Akuntansi';
    ?>  
<!DOCTYPE html PUBLIC "-//W3C//DTD       XHTML       1.0       Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title></head><body><img src="../gambar/<?php echo $gambar; ?>"></a><div align="center"></div>
	

	<table border="0" width="100%" style="border-collapse:collapse;" align="center">
    	<tr class="tableheader">
            <tr class="tr-title">
              <thead>
            <tr>
                <th Style="text-align:center" colspan="11">DAFTAR DONATUR <?php echo $kdj; ?></th>
            </tr>  
            <tr>
                <th Style="text-align:center" colspan="11">Penerimaan Dari <?php echo date('d-m-Y', strtotime($tgl_d)); ?> s/d <?php echo date('d-m-Y', strtotime($tgl_s)); ?></th>
            </tr>  
            <tr>
              <th width="3%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">No</th>
              <th width="8%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">NoAng</th>
              <th width="20%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">NAMA</th>
              <th width="10%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">Dk/Jln</th>
              <th width="4%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">RT</th>
              <th width="4%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">RW</th>
              <th width="10%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">Kelurahan</th>
              <th width="10%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">Kec</th>
              <th width="15%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">Kab/Kota</th>
              <th width="15%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">No HP</th>
              <th width="7%" class="text-center" style="border-top: 2px solid #000; border-bottom: 2px solid #000;">Tanggal</th>
            </tr>
            
                  </thead>
          <tbody>
            <?php 
            $no=1;
            //WHERE tglmasuk>='$tgl_d' and tglmasuk<='$tgl_s' 
            $data = mysqli_query($koneksi,"SELECT * FROM anggota ");
            while($d = mysqli_fetch_array($data)){
                $noang  =$d['angg_no'] ;
                $rt   =$d['rt'] ;
                $rw   =$d['rw'] ;
                $kerja   =$d['pekerjaan'] ;
                $usaha   =$d['usaha'] ;
                $jekel   =$d['jekel'] ;
                if ($jekel=='1') {
                    $lp='L' ;
                } else {
                    $lp='P';
                }
                $no_hp=$d['hp'] ;
                        $foto_diri  =$d['foto_diri'] ;
                        $angg_id    =$d['angg_id'] ;
                        $noang      =$d['angg_no'] ;

               $sql4 = mysqli_query($koneksi, "SELECT count(angg_no) AS t_ang_sim,sum(masuk) AS t_jumlah FROM anggota_trans WHERE angg_no='$noang' and kdj='$kdj' and tanggal>='$tgl_d' and tanggal<='$tgl_s' ");
                       list($t_ang_sim,$t_jumlah) = mysqli_fetch_array($sql4);
              ?>
              <tr>
                <td><?php echo $no++; ?></td>
       
                <td style="text-align:left; font-size: 8pt; font-weight:normal;"><a data-toggle='tooltip' data-placement='top' title='Lihat Kartu Anggota <?php echo $d['nama']; ?>' style='margin-right:3px' class="btn btn-warning btn-sm" href="angg_kartu.php?id=<?php echo $angg_id; ?>"><?php echo $d['angg_no'] ?></td>
                <td style="text-align:left; font-size: 10pt; font-weight:normal;"><?php echo $d['nama']; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $d['alamat']; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $d['rt']; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $d['rw']; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $d['kel']; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $d['kec']; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $d['kab']; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $no_hp; ?></td>
                <td style="text-align:left; font-size: 9pt; font-weight:normal;"><?php echo $t_ang_sim; ?></td>
                <td style="text-align:right; font-size: 11pt; font-weight:normal;"><?php echo "" . number_format("$t_jumlah", 0, ",", "."); ?></td>
                <td>    

  <tr>
    <td colspan="11" style="border-bottom: 1px solid #000;"></td>
  </tr>
            
          </tbody>
          
        </table>
        
            <br />
            <div>
                <?php echo $kota ; ?>, <?php echo $tgl_indo ; ?>
            </div>
            <div>
                <?php
                echo $jabatan;
                ?>
            </div>
                <p>
                <br />
                <br />
                </p>            
            <div>
                <?php
                echo $keuangan;
                ?>
            </div>
            
              </div>

    </h5>

</body>

    <script>
		window.load = print_d();
		function print_d(){
			window.print();
		}
	</script>
</html>