diff --git a/config/users/username.ini.example b/config/users/username.ini.example
index befaed5..ace040f 100644
--- a/config/users/username.ini.example
+++ b/config/users/username.ini.example
@@ -1,5 +1,9 @@
;Password
password = yourpassword
+encryption = clear
+; encryption: not set, leave blank or set to clear or none to use plain text password for the user,
+; else set to encryption algoritm supported by hash function of php to use the selected
+; encryption
;Role
-role = admin
\ No newline at end of file
+role = admin
diff --git a/system/admin/admin.php b/system/admin/admin.php
index 6f8dce8..6293791 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -1,561 +1,550 @@
Your username and password mismatch.';
- }
- } 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 '