diff --git a/system/admin/admin.php b/system/admin/admin.php
index 7776158..47d469d 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -1,192 +1,177 @@
0 && $user_enc !== 'clear' && $user_enc !== 'none')?hash($user_enc,$pass):$pass;
-
- if(file_exists($user_file)) {
- if($pass === $user_pass) {
- $_SESSION[config("site.url")]['user'] = $user;
- header('location: admin');
- }
- else {
- return $str = '
';
- echo '| Title | Published | ';
- if(config("views.counter") == "true") echo 'Views | ';
- echo '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) . ' | ';
- if(config("views.counter") == "true") 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 | ';
+ if (config("views.counter") == "true")
+ echo 'Views | ';
+ echo '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) . ' | ';
+ if (config("views.counter") == "true")
+ 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 '