<div class="row">


    <div class="col-md-6">
        <div class="box box-widget widget-user-2">
            <div class="widget-user-header bg-green">
                <table>
                    <tr>
                        <td><i class="fa fa-group fa-5x" style="width: 20px;"></i></td>
                        <td>
                            <h3 class="widget-user-username">Kunjungan</h3>
                            <h5 class="widget-user-desc">Rawat Jalan Berdasarkan Poliklinik</h5>
                            <h5 class="widget-user-desc"><b><?php echo $tanggal_from; ?> - <?php echo $tanggal_last; ?></b></h5>
                            <h4 class="widget-user-desc">
                                <form action="<?php echo site_url('poliklinikcr/search_tanggal');?>" method = "post" class="form-horizontal">

                                  <div class="form-group">
                                    <label style="font-weight: 100; text-align: left;" class="col-sm-5 control-label">Tanggal Awal</label>
                                    <div class="col-sm-6">
                                      <input type="text" class="form-control" autofocuss id="date_from" value="<?php echo $a; ?>" name="tanggal" placeholder="<?php echo date('d, F Y')?>">
                                    </div>
                                  </div>

                                  <div class="form-group">
                                    <label style="font-weight: 100; text-align: left;" class="col-sm-5 control-label">Tanggal Akhir</label>
                                    <div class="col-sm-6">
                                      <input type="text" class="form-control" autofocuss id="date_to" placeholder="<?php echo date('d, F Y')?>" value="<?php echo $b; ?>" name="tanggal_to"> 
                                    </div>
                                  </div>

                                  <button type="submit" class="btn btn-primary"><i class="fa fa-filter"></i> Tampilkan</button>
                                </form>
                            </h4>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="box-footer no-padding">
                <ul class="nav nav-stacked">
                <?php foreach ($results as $row): ?>
                  <li><a target="_blank" href="<?php echo base_url(); ?>home/chart_pendapatan_poliklinik/<?php echo $row->Category; ?>"><?php echo  $row->Category; ?> <span class="badge bg-green pull-right"><?php echo $row->Jumlah; ?></span></a></li>
                <?php endforeach ?>
              
                </ul>
            </div>
        </div>
    </div>

    <div class="col-md-6">
    <div class="box box-widget widget-user-2">
      <div class="widget-user-header bg-blue">
        <table>
          <tr>
            <td><i class="fa fa-arrow-circle-up fa-5x" style="width: 20px;"></i></td>
            <td>
            <h3 class="widget-user-username">Dokter</h3>  
                    <h5 class="widget-user-desc">Rawat Jalan Berdasarkan Poliklinik</h5>
                    <h5 class="widget-user-desc"><b><?php echo date('d, F Y')?></b></h5>
                    <h4 class="widget-user-desc">
                      <form action="<?php echo site_url('poliklinikcr/search_tanggal_dokter');?>" method = "post" class="form-horizontal">

                        <div class="form-group">
                          <label style="font-weight: 100; text-align: left;" class="col-sm-5 control-label">Tanggal Awal</label>
                          <div class="col-sm-6">
                            <input type="text" class="form-control" autofocuss id="date_from" value="<?php echo date('Y/m/d')?>" name="tanggal" placeholder="<?php echo date('d, F Y')?>">
                          </div>
                        </div>

                        <div class="form-group">
                          <label style="font-weight: 100; text-align: left;" class="col-sm-5 control-label">Tanggal Akhir</label>
                          <div class="col-sm-6">
                            <input type="text" class="form-control" autofocuss id="date_to" placeholder="<?php echo date('d, F Y')?>" value="<?php echo date('Y/m/d')?>" name="tanggal_to"> 
                          </div>
                        </div>

                        <button type="submit" class="btn btn-success"><i class="fa fa-filter"></i> Tampilkan</button>
                      </form>
                    </h4>
                    </td>
          </tr>
        </table>
            </div>
            <div class="box-footer">
              <div class="table-responsive">
                  <table id="table_rincian" class="table table-bordered">  
                        <thead>  
                            <tr>  
                                 <th style="text-align: center;">Unit</th>  
                                 <th style="text-align: center;">Nama Dokter</th>  
                                 <th style="text-align: center;">Jumlah</th>
				 <th style="text-align: center;">Reg Status</th>
                            </tr>
                            <tbody>
                              <?php foreach($dokter_rajal_now as $row){ ?>
                                  <tr>
                                      <td><?php echo $row->Unit ?></td>
                                      <td><?php echo $row->DOKTER ?></td>
                                      <td style="text-align: center;"><?php echo $row->JUMLAH ?></td>
				      <td style="text-align: center;"><?php echo $row->Reg Status ?></td>
                                  </tr>
                              <?php } ?>
                            </tbody>
                        </thead>     
                  </table>
                </div>
            </div>
        </div>
  </div>

</div>

<div class="row">
    


</div>

<script type="text/javascript">

// ===== KUNJUNGAN IRJA HARI INI =====
var chart = AmCharts.makeChart( "chart", {
    "theme": "light",
    "type": "serial",
    "startDuration": 2,
    "dataProvider": [
      <?php foreach ($data as $content){ ?>
        {
            "country": "<?php echo ConvertBulan($content->Bulan)." ".$content->Tahun; ?>",
            "visits": <?php echo $content->Jumlah; ?>,
            "color": "<?php printf( "#%06X", mt_rand( 0, 0xFFFFFF )); ?>"
        },
        <?php } ?>
        ],
    "valueAxes": [{
        "position": "left",
        "axisAlpha":0,
        "gridAlpha":0
    }],
    "graphs": [{
        "balloonText": "[[category]]: <b>[[value]]</b>",
        "colorField": "color",
        "labelText": "[[value]]",
        "fillAlphas": 0.85,
        "lineAlpha": 0.1,
        "type": "column",
        "topRadius":1,
        "valueField": "visits"
    }],
    "depth3D": 40,
  "angle": 30,
    "chartCursor": {
        "categoryBalloonEnabled": false,
        "cursorAlpha": 0,
        "zoomable": false
    },
    "categoryField": "country",
    "categoryAxis": {
        "gridPosition": "start",
        "axisAlpha":0,
        "gridAlpha":0

    },
    "export": {
      "enabled": true
     }

}, 0);
</script>