diff --git a/App/Controllers/Posts.php b/App/Controllers/Posts.php
index 1c18c14..038d835 100644
--- a/App/Controllers/Posts.php
+++ b/App/Controllers/Posts.php
@@ -61,7 +61,6 @@ class Posts
$status = 'admin';
}
- // $x = 0;
for ($i=0; $i < count($posts); $i++) {
$posts[$i]['content'] = preg_replace('/[\r]/', '', $posts[$i]['content']);
$posts[$i]['content'] = preg_replace('/[\n]/', "
", $posts[$i]['content']);
@@ -109,7 +108,7 @@ class Posts
$editor_now = Session::get('userid');
$date = new \DateTime();
- $timestamp = $date->format("Y/m/d H:i:s");
+ $timestamp = $date->format("Y-m-d");
View::render(
'Data/edit_pengumuman.html',
diff --git a/App/Views/Data/edit_pengumuman.html b/App/Views/Data/edit_pengumuman.html
index 9f64aab..595848b 100644
--- a/App/Views/Data/edit_pengumuman.html
+++ b/App/Views/Data/edit_pengumuman.html
@@ -40,7 +40,14 @@
-
+
+
+ {{ post.valid_at }}
+
+
+
+
+
{{ post.expired_at }}
@@ -49,7 +56,7 @@
- {% if post.edited_at == "0000-00-00 00:00:00" %}
+ {% if post.edited_at is empty %}
Tidak pernah
{% else %}
{{ post.edited_at }}
@@ -61,7 +68,7 @@
- {% if post.editor == "0" %}
+ {% if post.editor is empty %}
-
{% else %}
{{ editor.name }}
@@ -92,7 +99,7 @@