<?php function buatrp($angka) { $jadi = "" . number_format($angka,0,',','.'); return $jadi; } ?>
<div class="row">
    <div class="col-md-12">
        <div class="box">
            <div class="box-header with-border">
                <h3 class="box-title"><?php echo $title." Tahun ".date('Y'); ?></h3>
                <div class="box-tools pull-right">
                    <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                    <a href="<?php echo base_url('admin/home'); ?>" class="btn btn-box-tool"><i class="fa fa-times"></i></a>
                </div>
            </div>
            <div class="box-body">
                <a href="<?php echo base_url('admin/ikt/1'); ?>" class="btn btn-info">Triwulan I</a>
                <a href="<?php echo base_url('admin/ikt/2'); ?>" class="btn btn-info">Triwulan II</a>
                <a href="<?php echo base_url('admin/ikt/3'); ?>" class="btn btn-info">Triwulan III</a>
                <br><br>
                <div class="table-responsive">
                    <table class="table table-hover table-bordered">
                        <thead>
                            <tr>
                                <th><center>No</center></th>
                                <th><center>Indikator</center></th>
                                <th><center>Target</center></th>
                                <th><center>Standar</center></th>
                                <th><center>Realisasi</center></th>
                                <th><center>Cn</center></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $i = 1; $total = 0;foreach ($data as $row) { ?>
                                <tr>
                                    <td align="center"><?php echo $i; ?></td>
                                    <td><?php echo $row->indikator; ?></td>
                                    <td align="center"><?php echo number_format($row->target, 2, ".", "."); ?></td>
                                    <td align="center"><?php echo number_format($row->standar, 2, ".", "."); ?></td>
                                    <td align="center"><?php echo number_format($row->realisasi, 2, ".", "."); ?></td>
                                    <td align="center"><?php echo number_format($row->cn, 2, ".", "."); ?> %</td>
                                    <?php $total += $row->cn; ?>
                                </tr>
                            <?php $i++; } ?>
                            <tr>
                                <th colspan="5"><center>Total</center></th>
                                <th align="center"><center><?php echo number_format($total, 2, ".", "."); ?> %</center></th>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="box-footer">
                <i class="fa fa-clock-o"></i> Data realtime
            </div>
        </div>
    </div>
</div>