summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcflip <36554078+cflip@users.noreply.github.com>2021-08-10 16:42:07 -0600
committercflip <36554078+cflip@users.noreply.github.com>2021-08-10 16:42:07 -0600
commit39f4d2134f332d3d6577f8cf5b3f4b9d4f665c41 (patch)
tree6521fed114e0227683291d17c7c7d8a14d1040a7
parent5d703ab4ea6e8ead889232ba846596b948bdb051 (diff)
Change URLs to relative paths
-rwxr-xr-xincludes/model/Post.php2
-rwxr-xr-xincludes/templates/head.php4
-rwxr-xr-xincludes/templates/header.php8
-rwxr-xr-xregister.php2
4 files changed, 8 insertions, 8 deletions
diff --git a/includes/model/Post.php b/includes/model/Post.php
index f251773..7e02793 100755
--- a/includes/model/Post.php
+++ b/includes/model/Post.php
@@ -17,7 +17,7 @@ function create_quote(int $id): string
return '<blockquote><span style="color:red;">This post has been deleted</span></blockquote>';
}
- return '<blockquote><a href="/viewthread.php?id=' . $reply['post_thread'] . '#p' . $id . '">Quote from ' . $reply['user_name'] . '</a><br>' . $reply['post_content'] . '</blockquote>';
+ return '<blockquote><a href="viewthread.php?id=' . $reply['post_thread'] . '#p' . $id . '">Quote from ' . $reply['user_name'] . '</a><br>' . $reply['post_content'] . '</blockquote>';
}
function format_post_content(string $post_content)
diff --git a/includes/templates/head.php b/includes/templates/head.php
index 07b6e80..d7c5758 100755
--- a/includes/templates/head.php
+++ b/includes/templates/head.php
@@ -1,4 +1,4 @@
-<link rel="stylesheet" href="/styles/style.css">
-<link rel="icon" href="/img/favicon.png">
+<link rel="stylesheet" href="styles/style.css">
+<link rel="icon" href="img/favicon.png">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> \ No newline at end of file
diff --git a/includes/templates/header.php b/includes/templates/header.php
index 8187cb8..c70821a 100755
--- a/includes/templates/header.php
+++ b/includes/templates/header.php
@@ -1,8 +1,8 @@
<header>
<h1>cflip.net forum</h1>
<p>
-[<a href="/">Home</a>]
-[<a href="/create_thread.php">Create a thread</a>]
+[<a href="./">Home</a>]
+[<a href="create_thread.php">Create a thread</a>]
<span style="float:right;">
<?php
include_once './includes/Session.php';
@@ -10,9 +10,9 @@
if (Session::get()->is_signed_in()) {
$user = Session::get()->get_current_user();
- echo '[<a href="/viewuser.php?id=' . $user->id . '">' . $user->name . '\'s Profile</a>] [<a href="signout.php">Log out</a>]';
+ echo '[<a href="viewuser.php?id=' . $user->id . '">' . $user->name . '\'s Profile</a>] [<a href="signout.php">Log out</a>]';
} else {
- echo '[<a href="/signin.php">Sign in</a>] or [<a href="/register.php">Register an account</a>]';
+ echo '[<a href="signin.php">Sign in</a>] or [<a href="register.php">Register an account</a>]';
}
?>
</span>
diff --git a/register.php b/register.php
index 34e43a0..d7f5fed 100755
--- a/register.php
+++ b/register.php
@@ -30,7 +30,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$form->on_success(function () use ($username, $password) {
User::register($username, $password);
- echo '<p class="success">Account successfully registered! You can now <a href="/signin.php">sign in</a></p>';
+ echo '<p class="success">Account successfully registered! You can now <a href="signin.php">sign in</a></p>';
});
}
?>