diff --git a/system/admin/views/add-content.html.php b/system/admin/views/add-content.html.php
index 1f430f0..7b5065b 100644
--- a/system/admin/views/add-content.html.php
+++ b/system/admin/views/add-content.html.php
@@ -83,137 +83,137 @@ $( function() {
diff --git a/system/admin/views/add-page.html.php b/system/admin/views/add-page.html.php
index 8adebaa..8eb88b6 100644
--- a/system/admin/views/add-page.html.php
+++ b/system/admin/views/add-page.html.php
@@ -13,80 +13,80 @@
diff --git a/system/admin/views/backup.html.php b/system/admin/views/backup.html.php
index 3d8139b..848573e 100644
--- a/system/admin/views/backup.html.php
+++ b/system/admin/views/backup.html.php
@@ -18,54 +18,54 @@ Please install the ZIP extension to use the backup feature.
-
+
-
+
';
- echo '' . i18n('Filename') . ' '.i18n('Date').' ' . i18n('Operations') . ' ';
- $i = 0;
- $len = count($files);
- foreach ($files as $file) {
+ $files = get_zip_files();
+ if (!empty($files)) {
+ krsort($files);
+ echo '';
+ echo '' . i18n('Filename') . ' '.i18n('Date').' ' . i18n('Operations') . ' ';
+ $i = 0;
+ $len = count($files);
+ foreach ($files as $file) {
- if ($i == 0) {
- $class = 'item first';
- } elseif ($i == $len - 1) {
- $class = 'item last';
- } else {
- $class = 'item';
- }
- $i++;
+ if ($i == 0) {
+ $class = 'item first';
+ } elseif ($i == $len - 1) {
+ $class = 'item last';
+ } else {
+ $class = 'item';
+ }
+ $i++;
- // Extract the date
- $arr = explode('_', $file);
+ // Extract the date
+ $arr = explode('_', $file);
- // Replaced string
- $replaced = substr($arr[0], 0, strrpos($arr[0], '/')) . '/';
+ // Replaced string
+ $replaced = substr($arr[0], 0, strrpos($arr[0], '/')) . '/';
- $name = str_replace($replaced, '', $file);
+ $name = str_replace($replaced, '', $file);
- $date = str_replace('.zip', '', $arr[1]);
- $t = str_replace('-', '', $date);
- $time = new DateTime($t);
- $timestamp = $time->format("D, d F Y, H:i:s");
+ $date = str_replace('.zip', '', $arr[1]);
+ $t = str_replace('-', '', $date);
+ $time = new DateTime($t);
+ $timestamp = $time->format("D, d F Y, H:i:s");
- $url = site_url() . $file;
- echo '';
- echo '' . $name . ' ';
- echo '' . $timestamp . ' ';
- echo 'Download ';
- echo ' ';
- }
- echo '
';
- } else {
- echo i18n('No_available_backup');
- }
+ $url = site_url() . $file;
+ echo '';
+ echo '' . $name . ' ';
+ echo '' . $timestamp . ' ';
+ echo 'Download ';
+ echo ' ';
+ }
+ echo '';
+ } else {
+ echo i18n('No_available_backup');
+ }
}
?>
\ No newline at end of file
diff --git a/system/admin/views/category-list.html.php b/system/admin/views/category-list.html.php
index 27da061..4b8bc2d 100644
--- a/system/admin/views/category-list.html.php
+++ b/system/admin/views/category-list.html.php
@@ -30,30 +30,30 @@
url !== site_url() . 'category/uncategorized') {?>
-
+
+ class="btn btn-danger btn-xs" href="url ?>/delete?destination=admin/categories/uncategorized">
-
+
-
+
diff --git a/system/admin/views/config-performance.html.php b/system/admin/views/config-performance.html.php
index 2f20cfa..2c235ca 100644
--- a/system/admin/views/config-performance.html.php
+++ b/system/admin/views/config-performance.html.php
@@ -37,7 +37,7 @@
-
+
@@ -56,7 +56,7 @@
-
+
@@ -75,7 +75,7 @@
-
+
@@ -97,7 +97,7 @@
-
+
-
+
@@ -50,7 +50,7 @@
-
+
@@ -75,7 +75,7 @@
-
+
diff --git a/system/admin/views/config-widget.html.php b/system/admin/views/config-widget.html.php
index 7774e09..eea38ab 100644
--- a/system/admin/views/config-widget.html.php
+++ b/system/admin/views/config-widget.html.php
@@ -43,7 +43,7 @@
-
+
@@ -84,7 +84,7 @@
-
+
@@ -119,7 +119,7 @@
-
+
diff --git a/system/admin/views/config.html.php b/system/admin/views/config.html.php
index 4e474eb..26f3c79 100644
--- a/system/admin/views/config.html.php
+++ b/system/admin/views/config.html.php
@@ -36,14 +36,14 @@ Please install and enable the INTL extension to format the date format to your l
-
+
@@ -54,7 +54,7 @@ Please install and enable the INTL extension to format the date format to your l
selected>
-
+
@@ -64,7 +64,7 @@ Please install and enable the INTL extension to format the date format to your l
selected>
-
+
format("Y-m-d H:i:s");?>
@@ -120,18 +120,18 @@ Please install and enable the INTL extension to format the date format to your l
-
+
diff --git a/system/admin/views/edit-page.html.php b/system/admin/views/edit-page.html.php
index 9140724..2a27276 100644
--- a/system/admin/views/edit-page.html.php
+++ b/system/admin/views/edit-page.html.php
@@ -2,65 +2,65 @@
file)) {
- $url = $p->file;
- } else {
- $url = $oldfile;
- }
- $content = file_get_contents($url);
- $oldtitle = get_content_tag('t', $content, 'Untitled');
- $olddescription = get_content_tag('d', $content);
- $oldcontent = remove_html_comments($content);
+ if (isset($p->file)) {
+ $url = $p->file;
+ } else {
+ $url = $oldfile;
+ }
+ $content = file_get_contents($url);
+ $oldtitle = get_content_tag('t', $content, 'Untitled');
+ $olddescription = get_content_tag('d', $content);
+ $oldcontent = remove_html_comments($content);
- if (isset($_GET['destination'])) {
- $destination = _h($_GET['destination']);
- } else {
- $destination = 'admin';
- }
- $dir = substr($url, 0, strrpos($url, '/'));
- $oldurl = str_replace($dir . '/', '', $url);
- $oldmd = str_replace('.md', '', $oldurl);
+ if (isset($_GET['destination'])) {
+ $destination = _h($_GET['destination']);
+ } else {
+ $destination = 'admin';
+ }
+ $dir = substr($url, 0, strrpos($url, '/'));
+ $oldurl = str_replace($dir . '/', '', $url);
+ $oldmd = str_replace('.md', '', $oldurl);
- if (isset($p->url)) {
- $delete = $p->url . '/delete?destination=' . $destination;
- }
- else {
- if(empty($sub)) {
- $delete = site_url() . $oldmd . '/delete?destination=' . $destination;
- }
- else {
- $delete = site_url() . $static .'/'. $sub . '/delete?destination=' . $destination;
- }
- }
+ if (isset($p->url)) {
+ $delete = $p->url . '/delete?destination=' . $destination;
+ }
+ else {
+ if(empty($sub)) {
+ $delete = site_url() . $oldmd . '/delete?destination=' . $destination;
+ }
+ else {
+ $delete = site_url() . $static .'/'. $sub . '/delete?destination=' . $destination;
+ }
+ }
}
?>
@@ -78,87 +78,87 @@ if ($type == 'is_frontpage') {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/system/admin/views/layout.html.php b/system/admin/views/layout.html.php
index 780a206..a3865bf 100644
--- a/system/admin/views/layout.html.php
+++ b/system/admin/views/layout.html.php
@@ -6,10 +6,10 @@
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -130,15 +130,15 @@
-
-
+
+
-
-
+
+
@@ -155,40 +155,40 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -236,10 +236,10 @@
@@ -253,7 +253,7 @@
@@ -297,7 +297,7 @@
diff --git a/system/admin/views/login.html.php b/system/admin/views/login.html.php
index 8d37c82..e6c2cc7 100644
--- a/system/admin/views/login.html.php
+++ b/system/admin/views/login.html.php
@@ -12,14 +12,14 @@
echo 'error';
}
} ?>" name="user" placeholder=""/>
-
+
*
-
+
diff --git a/system/admin/views/main.html.php b/system/admin/views/main.html.php
index f301170..d149929 100644
--- a/system/admin/views/main.html.php
+++ b/system/admin/views/main.html.php
@@ -6,36 +6,36 @@
';
- echo '
' . i18n('Title') . ' ' . i18n('Published') . ' ';
- if (config("views.counter") == "true")
- echo ''.i18n('Views').' ';
- echo '' . i18n('Category') . ' ' . i18n('Tags') . ' ' . i18n('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 '' . format_date($p->date) . ' ';
- if (config("views.counter") == "true")
- echo '' . $p->views . ' ';
- echo ''. strip_tags($p->category) .' ';
- echo '' . $p->tag . ' ';
- echo '' . i18n('Edit') . ' ' . i18n('Delete') . ' ';
- echo ' ';
- }
- echo '';
- }
+ $posts = get_profile_posts($_SESSION[config("site.url")]['user'], 1, 5);
+ if (!empty($posts)) {
+ echo '
';
+ echo '' . i18n('Title') . ' ' . i18n('Published') . ' ';
+ if (config("views.counter") == "true")
+ echo ''.i18n('Views').' ';
+ echo '' . i18n('Category') . ' ' . i18n('Tags') . ' ' . i18n('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 '' . format_date($p->date) . ' ';
+ if (config("views.counter") == "true")
+ echo '' . $p->views . ' ';
+ echo ''. strip_tags($p->category) .' ';
+ echo '' . $p->tag . ' ';
+ echo '' . i18n('Edit') . ' ' . i18n('Delete') . ' ';
+ echo ' ';
+ }
+ echo '
';
+ }
}
?>
\ No newline at end of file
diff --git a/system/admin/views/menu.html.php b/system/admin/views/menu.html.php
index 069c28b..dec0a7f 100644
--- a/system/admin/views/menu.html.php
+++ b/system/admin/views/menu.html.php
@@ -3,86 +3,86 @@
$menu = '';
$filename = "content/data/menu.json";
if (file_exists($filename)) {
- $json = json_decode(file_get_contents('content/data/menu.json', true));
- $menus = json_decode($json);
+ $json = json_decode(file_get_contents('content/data/menu.json', true));
+ $menus = json_decode($json);
if (!empty($menus)) {
- $menu = parseMenus($menus);
+ $menu = parseMenus($menus);
}
}
function parseMenus($menus) {
- $ol = '
';
- foreach ($menus as $menu) {
- $ol .= parseMenu($menu);
- }
- $ol .= ' ';
- return $ol;
+ $ol = '
';
+ foreach ($menus as $menu) {
+ $ol .= parseMenu($menu);
+ }
+ $ol .= ' ';
+ return $ol;
}
function parseMenu($menu) {
- $li = '
';
- $li .= ''.$menu->name.'
';
- $li .= ''.i18n('Delete').' ';
- $li .= ''.i18n('Edit').' ';
- if (isset($menu->children)) {
- $li .= parseMenus($menu->children);
- }
- $li .= ' ';
- return $li;
+ $li = '
';
+ $li .= ''.$menu->name.'
';
+ $li .= ''.i18n('Delete').' ';
+ $li .= ''.i18n('Edit').' ';
+ if (isset($menu->children)) {
+ $li .= parseMenus($menu->children);
+ }
+ $li .= ' ';
+ return $li;
}
?>
-
-
'.i18n('At_the_moment_you_are_using_auto_generated_menu').'
';}?>
-
-
-
-
-
-
+
+
'.i18n('At_the_moment_you_are_using_auto_generated_menu').'
';}?>
+
+
+
+
+
+
@@ -96,7 +96,7 @@ function parseMenu($menu) {
$('#addMenu').click(function() {
$('#menu-add').fadeIn();
});
-
+
$("#saveButton").click(function(){
updateOutput($('.dd.nestable').data('output', $('#json-output')));
var js = $('#json-output').val();
@@ -108,7 +108,7 @@ function parseMenu($menu) {
success: function (response) {
alert(response.message);
},
- });
+ });
});