diff --git a/app/Controllers/Api/Admin/LoadNews.php b/app/Controllers/Api/Admin/LoadNews.php
new file mode 100644
index 0000000..5f00b95
--- /dev/null
+++ b/app/Controllers/Api/Admin/LoadNews.php
@@ -0,0 +1,20 @@
+
' . Date::zmdate($n['time']) . '
' . $n['body'] . '
';
+ }
+ }
+}
diff --git a/app/Controllers/ApiController.php b/app/Controllers/ApiController.php
index 2f74dec..c9934b6 100644
--- a/app/Controllers/ApiController.php
+++ b/app/Controllers/ApiController.php
@@ -17,6 +17,7 @@ use \App\Controllers\Api\Images\Comments\Rate as PhotoCommentVote;
use \App\Controllers\Api\Profile\Update as ProfileUpdate;
use \App\Controllers\Api\Admin\Images\SetVisibility as AdminPhotoSetVisibility;
use \App\Controllers\Api\Admin\CreateNews as AdminCreateNews;
+use \App\Controllers\Api\Admin\LoadNews as AdminLoadNews;
class ApiController
{
@@ -63,6 +64,9 @@ class ApiController
public static function admincreatenews() {
return new AdminCreateNews();
}
+ public static function adminloadnews() {
+ return new AdminLoadNews();
+ }
}
\ No newline at end of file
diff --git a/app/Core/Routes.php b/app/Core/Routes.php
index 97cf220..e37c9cb 100644
--- a/app/Core/Routes.php
+++ b/app/Core/Routes.php
@@ -56,6 +56,7 @@ class Routes
Router::any('/admin', 'AdminController@index');
Router::any('/api/admin/images/setvisibility', 'ApiController@adminsetvis');
Router::any('/api/admin/createnews', 'ApiController@admincreatenews');
+ Router::any('/api/admin/loadnews', 'ApiController@adminloadnews');
}
Router::get('/logout', 'MainController@logout');
Router::get('/404', 'ExceptionRegister@notfound');
diff --git a/views/pages/Admin/News.php b/views/pages/Admin/News.php
index ebcfa81..dca4463 100644
--- a/views/pages/Admin/News.php
+++ b/views/pages/Admin/News.php
@@ -11,51 +11,61 @@ use \App\Models\User;
Создать
-
-
'.Date::zmdate($n['time']).'
'.$n['body'].'
';
-}
-?>
+
+
' . Date::zmdate($n['time']) . '
' . $n['body'] . '
';
+ }
+ ?>
+
-
\ No newline at end of file
+
+ });
+
+
+ }
+
+ });
+ }
+
\ No newline at end of file