Add pedoman content and editor assets
This commit is contained in:
32
pedoman/notif.php
Normal file
32
pedoman/notif.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
function notif($tipe,$pesan,$tujuan="",$asal=""){
|
||||
if($tipe=="alert"){
|
||||
echo "<div class='alert alert-danger'>".$pesan."</div>";
|
||||
}else if($tipe=="sukses"){
|
||||
echo "<div class='alert alert-success'>".$pesan."</div>";
|
||||
}else if($tipe=="konfirm"){
|
||||
echo "<div class='alert alert-warning'>
|
||||
<p style='text-align:center;'>".$pesan."</>
|
||||
<br/>
|
||||
<div style='width:100%;display:flex;justify-content:center;'>
|
||||
<button style='width:100px;background-color:green;margin-left:4px;' onclick='ya()'>YA</button>
|
||||
<button style='width:100px;background-color:red;margin-left:4px;' onclick='tidak()'>TIDAK</button>
|
||||
</div>
|
||||
<script>
|
||||
function ya(){
|
||||
window.location='".$tujuan."';
|
||||
}
|
||||
function tidak(){
|
||||
window.location='".$asal."';
|
||||
}
|
||||
|
||||
</script>
|
||||
</div>";
|
||||
}else if($tipe=="info"){
|
||||
echo "<div class='alert alert-info'>".$pesan."</div>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user