This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'PHPMailer/PHPMailerAutoload.php'; // ini lib yg digunakan | |
$mail = new PHPMailer; | |
// array for JSON response | |
$response = array(); | |
$email = $_POST['email']; // parameter cuma email saja | |
// include db connect class | |
require 'connect.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- ini layout fragment yg berada pada salah satu navbottom --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".ui.home.HomeFragment"> | |
<LinearLayout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
skema: susun marker (indexing) (1*) > klik marker > munculin infowindow/snip (2)> klik infowindow (3)> masuk ke activity (4) | |
*/ | |
@Override | |
public void onMapReady(GoogleMap googleMap) { | |
mMap = googleMap; | |
mMap.setMyLocationEnabled(true); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id_pengumuman = mysqli_real_escape_string($conn, $_POST['id_pengumuman']); | |
$judul = mysqli_real_escape_string($conn, $_POST['judul']); | |
$file_lampiran_lama = mysqli_real_escape_string($conn, $_POST['file_lampiran_lama']); | |
$file_lampiran_baru = $_FILES['file_lampiran_baru']['name']; | |
$keterangan = mysqli_real_escape_string($conn, $_POST['keterangan']); | |
if($file_lampiran_baru==null){ | |
$file_lampiran = $file_lampiran_lama; //ambil nama file yg baru | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="update.php" role="form" method="POST" enctype="multipart/form-data"> | |
<input type="hidden" class="form-control" name="id_pengumuman" value="<?php echo $id_pengumuman;?>"> | |
<div class="box-body"> | |
<div class="form-group"> | |
<label>Judul</label> | |
<input type="text" class="form-control" placeholder="Judul" name="judul" value="<?php echo $data['judul'];?>" required> | |
</div> | |
<div class="form-group"> | |
<label>Keterangan</label> | |
<textarea type="text" class="form-control" placeholder="Keterangan" name="keterangan" required><?php echo $data['keterangan'];?></textarea> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$judul = mysqli_real_escape_string($conn, $_POST['judul']); | |
$keterangan = mysqli_real_escape_string($conn, $_POST['keterangan']); | |
$file_lampiran = $_FILES['file_lampiran']['name']; | |
$result = mysqli_query($conn, " | |
INSERT INTO `pengumuman` (`id_pengumuman`, `judul`, `keterangan`, `file_lampiran`, `timestamp`, `status`) | |
VALUES | |
(NULL, '$judul', '$keterangan', '$file_lampiran', CURRENT_TIMESTAMP, 'Tidak Aktif') | |
"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="simpan.php" role="form" method="POST" enctype="multipart/form-data"> | |
<div class="box-body"> | |
<div class="form-group"> | |
<label>Judul</label> | |
<input type="text" class="form-control" placeholder="Judul" name="judul" required> | |
</div> | |
<div class="form-group"> | |
<label>Keterangan</label> | |
<textarea type="text" class="form-control" placeholder="Keterangan" name="keterangan"></textarea> | |
</div> |