MIF_E31211879/application/libraries/Notif.php

43 lines
867 B
PHP

<?php
defined('BASEPATH') or exit('No direct script access allowed');
class Notif
{
public function berhasil($isi)
{
return "<script type=\"text/javascript\">
$(document).ready(function(){
$.toast({
heading: 'Berhasil',
text: '" . $isi . "',
position: 'top-right',
loaderBg:'#ff6849',
icon: 'success',
hideAfter: 5000,
stack: 6
});
});
</script>
";
}
public function gagal($isi)
{
return "<script type=\"text/javascript\">
$(document).ready(function(){
$.toast({
heading: 'ERROR',
text: '" . $isi . "',
position: 'top-right',
loaderBg:'#ff6849',
icon: 'error',
hideAfter: 5000,
stack: 6
});
});
</script>
";
}
}