From e5a33448134d26a21b1836fdb7c36bf14561c88e Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 26 Jun 2020 17:33:39 +0200 Subject: [PATCH] Add profile page --- index.php | 7 +++++++ pages/profile.html | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 pages/profile.html diff --git a/index.php b/index.php index ab9ffec..9dba850 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,7 @@ $router->map('GET', '/verify', function() {}, 'verify'); $router->map('GET', '/encrypt', function() {}, 'encrypt'); $router->map('GET', '/proofs', function() {}, 'proofs'); $router->map('GET', '/faq', function() {}, 'faq'); +$router->map('GET', '/[:uid]', function() {}, 'profile'); // Router matching $match = $router->match(); @@ -38,6 +39,12 @@ if(is_array($match) && is_callable($match['target'])) { case 'faq': readfile('pages/faq.html'); break; + + case 'profile': + $content = file_get_contents('pages/profile.html'); + $content = str_replace('%UID%', $match['params']['uid'], $content); + print($content); + break; } } else { // No route was matched diff --git a/pages/profile.html b/pages/profile.html new file mode 100644 index 0000000..7ca142e --- /dev/null +++ b/pages/profile.html @@ -0,0 +1,51 @@ + + + + + + Encrypt - Keyoxide + + + + + +
+
+ Keyoxide +
+ +
+
+ +
+

Profile

+
+

%UID%

+
+ + +
+ + + + + +