Website Summary Files Commits Branches @commit @diff @stats
path: root / models / webpage.php
diff options
context:
space:
mode:
Commitae8b6f88a0c31703d5e846fd1717a26b74d5da3b (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-02-09 20:52:35 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-02-09 20:52:35 +0200
Filesf4bbffc0670e46450acba673c819672b28d89f26 /models/webpage.php
nowayforward_human-ae8b6f88a0c31703d5e846fd1717a26b74d5da3b.tar
nowayforward_human-ae8b6f88a0c31703d5e846fd1717a26b74d5da3b.tar.gz
nowayforward_human-ae8b6f88a0c31703d5e846fd1717a26b74d5da3b.zip
Parentaac3a0fa5072525edb4e271a61047624781567e4 (diff)
feat: Better home cards, show total view count of pages
1 files changed, 9 insertions, 0 deletions
-rw-r--r--models/webpage.php9
diff --git a/models/webpage.php b/models/webpage.php
index 90ffb45..a42c300 100644
--- a/models/webpage.php
+++ b/models/webpage.php
@@ -70,6 +70,15 @@ class Webpage extends Table {
);
}
+ function totalViewCount() : int {
+ return Table::_get_all(
+ 'Webpages',
+ 'Database\Webpage',
+ "WHERE URL = \"$this->URL\"",
+ "SUM(Visits) as WID"
+ )[0]->WID;
+ }
+
function previousPageId() : int {
$foundId = Table::_get_all(
"Webpages",