From e4717f0e6dcfa1435307b0e09ee99b83c9e6106e Mon Sep 17 00:00:00 2001 From: fredtempez Date: Mon, 7 Aug 2023 20:28:38 +0200 Subject: [PATCH] deshboard --- core/module/dashboard/dashboard.php | 35 ++++++++++++++ core/module/dashboard/view/index/index.php | 54 ++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 core/module/dashboard/dashboard.php create mode 100644 core/module/dashboard/view/index/index.php diff --git a/core/module/dashboard/dashboard.php b/core/module/dashboard/dashboard.php new file mode 100644 index 00000000..dd2bd27a --- /dev/null +++ b/core/module/dashboard/dashboard.php @@ -0,0 +1,35 @@ + + * @copyright Copyright (C) 2008-2018, Rémi Jean + * @author Frédéric Tempez + * @copyright Copyright (C) 2018-2023, Frédéric Tempez + * @license CC Attribution-NonCommercial-NoDerivatives 4.0 International + * @link http://zwiicms.fr/ + */ + +class dashboard extends common +{ + + public static $actions = [ + 'index' => self::GROUP_ADMIN, + ]; + + /** + * Dashboard + */ + public function index() + { + // Valeurs en sortie + $this->addOutput([ + 'title' => helper::translate('Tableau de bord'), + 'view' => 'index' + ]); + } + +} \ No newline at end of file diff --git a/core/module/dashboard/view/index/index.php b/core/module/dashboard/view/index/index.php new file mode 100644 index 00000000..8d092987 --- /dev/null +++ b/core/module/dashboard/view/index/index.php @@ -0,0 +1,54 @@ + +
+
+ 'buttonGrey', + 'href' => helper::baseUrl(false), + 'value' => template::ico('home') + ]); ?> +
+
+
+
+ + Extensions activées :

'; + foreach ($extensions as $extension) { + echo $extension . ' - '; + } + ?> + '; + if (stripos($serverSoftware, 'apache') !== false) { + echo 'Serveur web : Apache'; + } elseif (stripos($serverSoftware, 'nginx') !== false) { + echo 'Serveur web : Nginx'; + } elseif (stripos($serverSoftware, 'tomcat') !== false) { + echo 'Serveur web : Tomcat'; + } else { + echo 'Serveur web non identifié : ' . $serverSoftware; + + } + echo '

'; + ?> + + '; + echo 'Pic de mémoire utilisée : ' . memory_get_peak_usage() . ' octets

'; + ?> + + '; + ?> + + ' . $diskSpace; + ?> + +
+
\ No newline at end of file