diff --git a/includes/Models/AdminLog.php b/includes/Models/AdminLog.php
index f4dbee1..f50f797 100644
--- a/includes/Models/AdminLog.php
+++ b/includes/Models/AdminLog.php
@@ -7,6 +7,13 @@ class AdminLog extends Model {
public const ACTION_LOGIN = 0;
public const ACTION_FAIL_LOGIN = 1;
public const ACTION_EDIT_CONFIG = 2;
+
+ public const ACTION_NAMES = [
+ 'Login',
+ 'Failed Login',
+ 'Edit Config'
+ ];
+
protected $table = 'admin_logs';
protected $fillable = ['user_id', 'action', 'ip', 'time'];
diff --git a/includes/functions.php b/includes/functions.php
index f1d62b0..e00b8ef 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -309,4 +309,23 @@ function pp_filename_escape(string $filename, string $extension) : string {
}
return $filename . $extension;
+}
+
+function pp_setup_pagination() : array {
+ $per_page = 20;
+ $current_page = 0;
+
+ if (!empty($_GET['page'])) {
+ $current_page = max(0, intval($_GET['page']));
+ }
+
+ if (!empty($_GET['per_page'])) {
+ $per_page = max(1, min(100, intval($_GET['per_page'])));
+ }
+
+ return [$per_page, $current_page];
+}
+
+function pp_output_paginator(int $per_page, int $current_page) : void {
+
}
\ No newline at end of file
diff --git a/package.json b/package.json
index 9970dc1..70a9356 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,6 @@
"license": "MIT",
"dependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
- "@rollup/plugin-node-resolve": "^15.0.1",
- "zxcvbn": "^4.4.2"
+ "@rollup/plugin-node-resolve": "^15.0.1"
}
}
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100644
index 0000000..3947f27
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,21 @@
+