Updated Home and Post
This commit is contained in:
parent
dbd326637a
commit
64fc8a6896
@ -175,20 +175,4 @@ class Home
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Branch mithril test
|
|
||||||
public function mithril() {
|
|
||||||
if (Session::exists('userid')) {
|
|
||||||
$user['id'] = Session::get('userid');
|
|
||||||
$user['username'] = Session::get('username');
|
|
||||||
$user['full_name'] = Session::get('full_name');
|
|
||||||
$user['privilege'] = Session::get('privilege');
|
|
||||||
} else {
|
|
||||||
$user = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
View::render('Data/mithril.html', [
|
|
||||||
'user' => $user
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ class Post extends \Core\Model
|
|||||||
try {
|
try {
|
||||||
$db = static::connectDB();
|
$db = static::connectDB();
|
||||||
|
|
||||||
$sql = "SELECT pengumuman.id, kategori.category, kategori.background, kategori.foreground, date(pengumuman.valid_at) as valid_at, date(pengumuman.expired_at) as expired_at, pengumuman.creator, pengumuman.editor, pengumuman.content, pengumuman.status FROM pengumuman INNER JOIN kategori ON pengumuman.category=kategori.id";
|
$sql = "SELECT pengumuman.id, kategori.background, kategori.foreground, pengumuman.valid_at, pengumuman.expired_at, pengumuman.creator, pengumuman.editor, pengumuman.content, pengumuman.status FROM pengumuman INNER JOIN kategori ON pengumuman.category=kategori.id";
|
||||||
|
|
||||||
if ($conditions) {
|
if ($conditions) {
|
||||||
$sql .= " WHERE";
|
$sql .= " WHERE";
|
||||||
|
Loading…
Reference in New Issue
Block a user