<?php
  if(!function_exists('pengajuan')) {
    function pengajuan($status, $keterangan) {
      if($status == '1') {
        if($keterangan != '') {
          return '<div class="alert alert-warning" role="alert">
                    PENGAJUAN<br>
                    '.$keterangan.'
                  </div>';
        }
      } elseif($status == '3') {
        if($keterangan == '') {
          return '<div class="alert alert-warning" role="alert">
                    REVISI
                  </div>';
        } else {
          return '<div class="alert alert-warning" role="alert">
                    REVISI SEBELUMNYA<br>
                    '.$keterangan.'
                  </div>';
        }
      } elseif($status == '4') {
        return '<div class="alert alert-danger" role="alert">
                  HAPUS
                </div>';
      }
    }
  }

  if(!function_exists('pengajuan_badge')) {
    function pengajuan_badge($status, $keterangan) {
      if($status == '1') {
        if($keterangan != '') {
          return '<div class="badge badge-warning" role="alert">
                    PENGAJUAN<br>
                    '.$keterangan.'
                  </div>';
        }
      } elseif($status == '3') {
        if($keterangan == '') {
          return '<div class="badge badge-warning" role="alert">
                    REVISI
                  </div>';
        } else {
          return '<div class="badge badge-warning" role="alert">
                    REVISI SEBELUMNYA<br>
                    '.$keterangan.'
                  </div>';
        }
      } elseif($status == '4') {
        return '<div class="badge badge-danger" role="alert">
                  HAPUS
                </div>';
      }
    }
  }
?>