Skip to content
Snippets Groups Projects
Commit c011f8d1 authored by Husnulzaki Wibisono Haryadi's avatar Husnulzaki Wibisono Haryadi
Browse files

changes from vm

parent 1b6adbac
No related merge requests found
...@@ -39,12 +39,6 @@ ...@@ -39,12 +39,6 @@
Materi Materi
</a> </a>
</li> </li>
<li class="nav-item">
<a class="nav-link" href="#" id="notif-click">
<span data-feather="send"></span>
Notifikasi
</a>
</li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#" id="pengumuman-click"> <a class="nav-link" href="#" id="pengumuman-click">
<span data-feather="clipboard"></span> <span data-feather="clipboard"></span>
......
...@@ -12,19 +12,7 @@ $(document).ready(function(){ ...@@ -12,19 +12,7 @@ $(document).ready(function(){
document.cookie = "state=home"; document.cookie = "state=home";
}); });
$("a#notif-click").on("click",function(e){ $("a#pengumuman-click").on("click",function(e){
e.preventDefault();
$.get("notifikasi.html",function(data){
$("main").html(function(){
$("a").removeClass("active");
$("a#notif-click").addClass("active");
return data;
});
});
document.cookie = "state=notif";
});
$("a#pengumuman-click").on("click",function(e){
e.preventDefault(); e.preventDefault();
$.get("pengumuman.html",function(data){ $.get("pengumuman.html",function(data){
$("main").html(function(){ $("main").html(function(){
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
require 'dbConnect.php'; require 'dbConnect.php';
header('Content-Type: application/json'); header('Content-Type: application/json');
$stmt = $conn->query("SELECT `id`, `judul`, `tgl`, `foto` FROM `berita`"); $stmt = $conn->query("SELECT `id`, `judul`, `tgl`, `foto` FROM `berita` ORDER BY `tgl` DESC");
$count = $stmt->num_rows; $count = $stmt->num_rows;
$res = array(); $res = array();
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
require 'dbConnect.php'; require 'dbConnect.php';
$stmt = $conn->query("SELECT * FROM `pengumuman`"); $stmt = $conn->query("SELECT * FROM `pengumuman` ORDER BY `tanggal` DESC");
$count = $stmt->num_rows; $count = $stmt->num_rows;
$res = array(); $res = array();
while ($row = $stmt->fetch_assoc()) { while ($row = $stmt->fetch_assoc()) {
......
...@@ -18,7 +18,7 @@ $berita_id = $_GET["id"]; ...@@ -18,7 +18,7 @@ $berita_id = $_GET["id"];
$stmt = $conn->query( $stmt = $conn->query(
"SELECT kmt_berita.id AS id, tgl, komentar, user_id, berita_id, user.username AS username "SELECT kmt_berita.id AS id, tgl, komentar, user_id, berita_id, user.username AS username
FROM kmt_berita LEFT OUTER JOIN user ON kmt_berita.user_id = user.id FROM kmt_berita LEFT OUTER JOIN user ON kmt_berita.user_id = user.id
WHERE berita_id = '" . $berita_id . "'" WHERE berita_id = '" . $berita_id . "' ORDER BY tgl ASC "
); );
/* Row Counts */ /* Row Counts */
......
...@@ -18,7 +18,7 @@ $pengumuman_id = $_GET["id"]; ...@@ -18,7 +18,7 @@ $pengumuman_id = $_GET["id"];
$stmt = $conn->query( $stmt = $conn->query(
"SELECT kmt_pengumuman.id AS id, tgl, komentar, user_id, pengumuman_id, user.username AS username "SELECT kmt_pengumuman.id AS id, tgl, komentar, user_id, pengumuman_id, user.username AS username
FROM kmt_pengumuman LEFT OUTER JOIN user ON kmt_pengumuman.user_id = user.id FROM kmt_pengumuman LEFT OUTER JOIN user ON kmt_pengumuman.user_id = user.id
WHERE pengumuman_id ='" . $pengumuman_id . "'" WHERE pengumuman_id ='" . $pengumuman_id . "' ORDER BY tgl ASC "
); );
/* Row Counts */ /* Row Counts */
......
<?php
phpinfo();
?>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment