forked from UKKWariors/Website-Pengaduan-Masyarakat-Remake
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
83 changed files
with
47,588 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<table id="example" class="display responsive-table" style="width:100%"> | ||
<thead> | ||
<tr> | ||
<th>No</th> | ||
<th>Email</th> | ||
<th>Nama</th> | ||
<th>Username</th> | ||
<th>Telephone</th> | ||
<th>level</th> | ||
<th>Opsi</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
|
||
<?php | ||
$no=1; | ||
$tampil = mysqli_query($koneksi,"SELECT * FROM petugas ORDER BY nama_petugas ASC"); | ||
while ($r=mysqli_fetch_assoc($tampil)) { ?> | ||
<tr> | ||
<td><?php echo $no++; ?></td> | ||
<td><?php echo $r['email']; ?></td> | ||
<td><?php echo $r['nama_petugas']; ?></td> | ||
<td><?php echo $r['username']; ?></td> | ||
<td><?php echo $r['telp_petugas']; ?></td> | ||
<td><?php echo $r['level']; ?></td> | ||
<td><a class="btn teal modal-trigger" href="#adm_edit<?php echo $r['id_petugas'] ?>">Edit</a> <a class="red btn" onclick="return confirm('Anda Yakin Ingin Menghapus Y/N')" href="index.php?p=adm_hapus&id_petugas=<?php echo $r['id_petugas'] ?>">Hapus</a></td> | ||
|
||
<!-- ------------------------------------------------------------------------------------------------------------------------------------ --> | ||
<!-- Modal Structure --> | ||
<div id="adm_edit<?php echo $r['id_petugas'] ?>" class="modal"> | ||
<div class="modal-content"> | ||
<h4>Edit</h4> | ||
<form method="POST"> | ||
<div class="col s12 input-field"> | ||
<label for="email">Email</label> | ||
<input id="email" type="text" name="email" value="<?php echo $r['email']; ?>"><br><br> | ||
</div> | ||
<div class="col s12 input-field"> | ||
<label for="nama">Nama</label> | ||
<input hidden type="text" name="id_petugas" value="<?php echo $r['id_petugas']; ?>"> | ||
<input id="nama" type="text" name="nama" value="<?php echo $r['nama_petugas']; ?>"> | ||
</div> | ||
<div class="col s12 input-field"> | ||
<label for="username">Username</label> | ||
<input id="username" type="text" name="username" value="<?php echo $r['username']; ?>"><br><br> | ||
</div> | ||
<div class="col s12 input-field"> | ||
<label for="telp">Telp</label> | ||
<input id="telp" type="number" name="telp" value="<?php echo $r['telp_petugas']; ?>"><br><br> | ||
</div> | ||
<div class="col s12 input-field"> | ||
<p> | ||
<label> | ||
<input value="admin" class="with-gap" name="level" type="radio" <?php if($r['level']=="admin"){echo "checked";} ?> /> | ||
<span>Admin</span> | ||
</label> | ||
<label> | ||
<input value="petugas" class="with-gap" name="level" type="radio" <?php if($r['level']=="petugas"){echo "checked";} ?> /> | ||
<span>Petugas</span> | ||
</label> | ||
</p> | ||
</div> | ||
<div class="col s12 input-field"> | ||
<input type="submit" name="Update" value="Simpan" class="btn right"> | ||
</div> | ||
</form> | ||
|
||
<?php | ||
if(isset($_POST['Update'])){ | ||
// echo $_POST['nama'].$_POST['username'].$_POST['telp'].$_POST['level']; | ||
$update=mysqli_query($koneksi,"UPDATE petugas SET email='".$_POST['email']."',nama_petugas='".$_POST['nama']."',username='".$_POST['username']."',telp_petugas='".$_POST['telp']."',level='".$_POST['level']."' WHERE id_petugas='".$_POST['id_petugas']."' "); | ||
if($update){ | ||
echo "<script>alert('Data di Update')</script>"; | ||
echo "<script>location='index.php?p=adm'</script>"; | ||
echo "<script>location.reload()</script>"; | ||
} | ||
} | ||
?> | ||
</div> | ||
<div class="modal-footer"> | ||
<a href="#!" class="modal-close waves-effect waves-green btn-flat">Close</a> | ||
</div> | ||
</div> | ||
<!-- ------------------------------------------------------------------------------------------------------------------------------------ --> | ||
|
||
</tr> | ||
<?php } | ||
?> | ||
|
||
</tbody> | ||
</table> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?php | ||
|
||
include('../conn/koneksi.php'); | ||
|
||
if(isset($_POST['input'])){ | ||
$password = md5($_POST['password']); | ||
|
||
$query=mysqli_query($koneksi,"INSERT INTO petugas VALUES (NULL,'".$_POST['nama']."','".$_POST['email']."','".$_POST['username']."','".$password."','".$_POST['telp']."','".$_POST['level']."')"); | ||
if($query){ | ||
echo "<script>alert('Data Ditambahkan')</script>"; | ||
echo "<script>location='index.php?p=user'</script>"; | ||
echo "<script>location.reload()</script>"; | ||
} | ||
} | ||
?> | ||
|
||
<link rel="stylesheet" href="../css/daftar.css"> | ||
|
||
|
||
<section class="container"> | ||
<form method="POST"> | ||
<div class="input-box"> | ||
<label for="nama">Nama</label> | ||
<input id="nama" type="text" name="nama" required /> | ||
</div> | ||
|
||
<div class="input-box"> | ||
<label for="email">Alamat Email</label> | ||
<input id="email" type="text" name="email" required /> | ||
</div> | ||
|
||
<div class="input-box"> | ||
<label for="username">Nama Pengguna</label> | ||
<input id="username" type="text" name="username" required /> | ||
</div> | ||
|
||
<div class="input-box"> | ||
<label for="password">Kata Sandi</label> | ||
<input id="password" type="password" name="password" pattern={6} required /> | ||
</div> | ||
|
||
<div class="column"> | ||
<div class="input-box"> | ||
<label for="telp">Nomor Telepon</label> | ||
<input id="telp" type="number" name="telp" required /> | ||
</div> | ||
</div> | ||
|
||
<label>Level</label> | ||
<div class="column"> | ||
<div class="select-box"> | ||
<select class="default" name="level"> | ||
<option hidden>Level Petugas</option> | ||
<option value="admin">Admin</option> | ||
<option value="petugas">Petugas</option> | ||
</select> | ||
</div> | ||
</div> | ||
</div> | ||
<input type="submit" name="input" value="Simpan"> | ||
</form> | ||
</section> | ||
</body> | ||
</html> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div id="print"> | ||
<h2 style="text-align: center;">Laporan Layanan Pengaduan Masyarakat</h2> | ||
<table border="2" style="width: 100%; height: 10%;"> | ||
<tr style="text-align: center;"> | ||
<td>No</td> | ||
<td>NIK Pelapor</td> | ||
<td>Nama Pelapor</td> | ||
<td>Nama Petugas</td> | ||
<td>Tanggal Masuk</td> | ||
<td>Tanggal Ditanggapi</td> | ||
<td>Status</td> | ||
</tr> | ||
<?php | ||
include '../conn/koneksi.php'; | ||
$no=1; | ||
$query = mysqli_query($koneksi,"SELECT * FROM pengaduan INNER JOIN masyarakat ON pengaduan.nik=masyarakat.nik INNER JOIN tanggapan ON tanggapan.id_pengaduan=pengaduan.id_pengaduan INNER JOIN petugas ON tanggapan.id_petugas=petugas.id_petugas ORDER BY tgl_pengaduan DESC"); | ||
while ($r=mysqli_fetch_assoc($query)) { ?> | ||
<tr> | ||
<td><?php echo $no++; ?></td> | ||
<td><?php echo $r['nik']; ?></td> | ||
<td><?php echo $r['nama']; ?></td> | ||
<td><?php echo $r['nama_petugas']; ?></td> | ||
<td><?php echo $r['tgl_pengaduan']; ?></td> | ||
<td><?php echo $r['tgl_tanggapan']; ?></td> | ||
<td><?php echo $r['status']; ?></td> | ||
</tr> | ||
<?php } | ||
?> | ||
</table> | ||
</div> | ||
<script type="text/javascript"> | ||
window.print(); | ||
</script> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
<div class="row"> | ||
<div class="col s4"> | ||
<div class="card red"> | ||
<div class="card-content white-text"> | ||
<?php | ||
$query = mysqli_query($koneksi,"SELECT * FROM pengaduan"); | ||
$jlmmember = mysqli_num_rows($query); | ||
if($jlmmember<1){ | ||
$jlmmember=0; | ||
} | ||
?> | ||
<span class="card-title">Laporan Masuk<b class="right"><?php echo $jlmmember; ?></b></span> | ||
<p></p> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="col s4"> | ||
<div class="card teal"> | ||
<div class="card-content white-text"> | ||
<?php | ||
$query = mysqli_query($koneksi,"SELECT * FROM pengaduan WHERE status='selesai'"); | ||
$jlmmember = mysqli_num_rows($query); | ||
if($jlmmember<1){ | ||
$jlmmember=0; | ||
} | ||
?> | ||
<span class="card-title">Laporan Selesai <b class="right"><?php echo $jlmmember; ?></b></span> | ||
<p></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
Oops, something went wrong.