Advertisement
juliarnasution

helper

Mar 11th, 2018
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.11 KB | None | 0 0
  1. <?php
  2. if (!defined('BASEPATH')) exit('No direct script access allowed');
  3.     if (! function_exists('notifikasi_helper')) {
  4.         function notifikasi($nilai)
  5.         {
  6.             if ($nilai==TRUE) {
  7.                 $notif =    '<div class="sufee-alert alert with-close alert-success alert-dismissible fade show">
  8.                                 <span class="badge badge-pill badge-success">Success</span>
  9.                                     Operasi Berhasil!.
  10.                                   <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  11.                                     <span aria-hidden="true">&times;</span>
  12.                                 </button>
  13.                             </div>';
  14.             }else{
  15.                 $notif =    '<div class="sufee-alert alert with-close alert-danger alert-dismissible fade show">
  16.                                <span class="badge badge-pill badge-danger">Error</span>
  17.                                    Operasi Gagal!.
  18.                                  <button type="button" class="close" data-dismiss="alert" aria-label="Close">
  19.                                    <span aria-hidden="true">&times;</span>
  20.                                </button>
  21.                            </div>';
  22.             }
  23.            
  24.             return $notif;
  25.         }
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement