From 41a557cbb67353d90dc6049d708bb6d90fdd38dc Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 23 Sep 2023 19:34:49 +0300 Subject: [PATCH] implement profile module #14 #15 --- src/app/controller/module/profile.php | 23 +++ .../view/theme/default/module/profile.phtml | 140 ++++++++++++++++++ 2 files changed, 163 insertions(+) create mode 100644 src/app/controller/module/profile.php create mode 100644 src/app/view/theme/default/module/profile.phtml diff --git a/src/app/controller/module/profile.php b/src/app/controller/module/profile.php new file mode 100644 index 0000000..60226c0 --- /dev/null +++ b/src/app/controller/module/profile.php @@ -0,0 +1,23 @@ +_user = $user; + } + + public function render() + { + $route = isset($_GET['_route_']) ? (string) $_GET['_route_'] : ''; + + $stars = $this->_user->getUserPageStarsTotal(); + $views = $this->_user->getUserPageViewsTotal(); + $downloads = $this->_user->getUserPageDownloadsTotal(); + $comments = $this->_user->getUserPageCommentsTotal(); + + include __DIR__ . '../../../view/theme/default/module/profile.phtml'; + } +} \ No newline at end of file diff --git a/src/app/view/theme/default/module/profile.phtml b/src/app/view/theme/default/module/profile.phtml new file mode 100644 index 0000000..7dfcfc5 --- /dev/null +++ b/src/app/view/theme/default/module/profile.phtml @@ -0,0 +1,140 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file