Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="demo">
- <table id="example1" class="table table-bordered table-striped fixme">
- <thead>
- <tr>
- <th>Nama Karyawan</th>
- <th>Tanggal</th>
- <?php
- foreach($data_kriteria->result_array() as $rowsa){
- ?>
- <th><?php echo $rowsa['kriteria']; ?></th>
- <?php
- }
- ?>
- <th>Total</th>
- <th>Reward</th>
- </tr>
- </thead>
- <tbody>
- <?php
- foreach($datas->result_array() as $row){
- ?>
- <tr>
- <td><?php echo $row['tanggal'];?></td>
- <td><?php echo $row['nama'];?></td>
- <th><?php echo $row['Kualitas_Kerja']; ?> </th>
- <th><?php echo $row['Ketaatan']; ?> </th>
- <th><?php echo $row['Kerjasama']; ?> </th>
- <th><?php echo $row['Semangat_Kerja']; ?> </th>
- <th><?php echo $row['Disiplin_Kerja']; ?> </th>
- <th><?php echo $row['Kualitas_Kerja'] + $row['Ketaatan'] + $row['Kerjasama'] + $row['Semangat_Kerja'] + $row['Disiplin_Kerja']; ?> </th>
- <th>
- <?php
- $total= $row['Kualitas_Kerja'] + $row['Ketaatan'] + $row['Kerjasama'] + $row['Semangat_Kerja'] + $row['Disiplin_Kerja'] ;
- foreach($data_reward->result_array() as $roward){
- if($total >= $roward['nilai_awal'] and $total <= $roward['nilai_akhir']){
- echo $roward['reward'];
- }elseif($total <= $roward['nilai_awal'] and $total >= $roward['nilai_akhir']){
- echo $roward['reward'];
- }
- }
- ?>
- </th>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement