diff --git a/system/admin/admin.php b/system/admin/admin.php
index 12f4ac1..121fe90 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -1,544 +1,526 @@
Your username and password mismatch.';
- }
- }
- else {
- return $str = '
';
- echo '| Title | Published | Views | Tag | Operations |
';
- $i = 0; $len = count($posts);
- foreach($posts as $p) {
- if ($i == 0) {
- $class = 'item first';
- }
- elseif ($i == $len - 1) {
- $class = 'item last';
- }
- else {
- $class = 'item';
- }
- $i++;
- echo '';
- echo '| ' . $p->title . ' | ';
- echo '' . date('d F Y', $p->date) . ' | ';
- echo '' . $p->views . ' | ';
- echo '' . $p->tag . ' | ';
- echo 'Edit Delete | ';
- echo '
';
- }
- echo '
';
- }
- }
+ if (isset($_SESSION[config("site.url")]['user'])) {
+ $posts = get_profile($_SESSION[config("site.url")]['user'], 1, 5);
+ if (!empty($posts)) {
+ echo '';
+ echo '| Title | Published | Views | Tag | Operations |
';
+ $i = 0;
+ $len = count($posts);
+ foreach ($posts as $p) {
+ if ($i == 0) {
+ $class = 'item first';
+ } elseif ($i == $len - 1) {
+ $class = 'item last';
+ } else {
+ $class = 'item';
+ }
+ $i++;
+ echo '';
+ echo '| ' . $p->title . ' | ';
+ echo '' . date('d F Y', $p->date) . ' | ';
+ echo '' . $p->views . ' | ';
+ echo '' . $p->tag . ' | ';
+ echo 'Edit Delete | ';
+ echo '
';
+ }
+ echo '
';
+ }
+ }
}
// Get all static pages
function get_recent_pages() {
- if (isset($_SESSION[config("site.url")]['user'])) {
- $posts = get_static_post(null);
- if(!empty($posts)) {
- krsort($posts);
- echo '