forked from root/threadr.lostcave.ddnss.de
Compare commits
7 Commits
improved_b
...
master
Author | SHA1 | Date |
---|---|---|
BodgeMaster | 98596e5695 | |
BodgeMaster | 4052787790 | |
BodgeMaster | e1cac20414 | |
BodgeMaster | aec8caa11a | |
BodgeMaster | 2f6b6d09de | |
BodgeMaster | be97370acb | |
BodgeMaster | b750e83be0 |
|
@ -7,6 +7,7 @@ Macros that insert templates
|
||||||
- `%BANNER_COOKIES%` the cookie banner (requires PHP)
|
- `%BANNER_COOKIES%` the cookie banner (requires PHP)
|
||||||
### [pass1_misc.json](./pass1_misc.json)
|
### [pass1_misc.json](./pass1_misc.json)
|
||||||
Miscellaneous macros
|
Miscellaneous macros
|
||||||
|
- `%FAVICON%` links the tab icon (HTML <head> section)
|
||||||
- `%STYLESHEET%` links stylesheet (HTML <head> section)
|
- `%STYLESHEET%` links stylesheet (HTML <head> section)
|
||||||
- `%PLEAZE_NO_CACHE%` tell the browser not to cache this page (PHP, before any data is sent to the client)
|
- `%PLEAZE_NO_CACHE%` tell the browser not to cache this page (PHP, before any data is sent to the client)
|
||||||
- `%COLOR_BEIGE%`, `%COLOR_ORANGE%`, `%COLOR_BLUE%`, `%COLOR_PINK%`, `%COLOR_CYAN%` color codes, format: #XXXXXX
|
- `%COLOR_BEIGE%`, `%COLOR_ORANGE%`, `%COLOR_BLUE%`, `%COLOR_PINK%`, `%COLOR_CYAN%` color codes, format: #XXXXXX
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
"FAVICON":"<link rel=\"icon\" type=\"image\/png\" href=\"%CONTENT_DIR%\/img\/favicon-32x32.png\" sizes=\"32x32\" />",
|
||||||
"STYLESHEET":"<link rel=\"stylesheet\" type=\"text\/css\" href=\"%CONTENT_DIR%\/style.css\">",
|
"STYLESHEET":"<link rel=\"stylesheet\" type=\"text\/css\" href=\"%CONTENT_DIR%\/style.css\">",
|
||||||
"PLEAZE_NO_CACHE":"header('Cache-Control: no-cache, no-store, must-revalidate');header('Pragma: no-cache');header('Expires: 0');",
|
"PLEAZE_NO_CACHE":"header('Cache-Control: no-cache, no-store, must-revalidate');header('Pragma: no-cache');header('Expires: 0');",
|
||||||
"COLOR_BEIGE":"#fef6e4", "COLOR_ORANGE":"#f3d2c1", "COLOR_BLUE":"#001858", "COLOR_PINK":"#f582ae", "COLOR_CYAN":"#8bd3dd"
|
"COLOR_BEIGE":"#fef6e4", "COLOR_ORANGE":"#f3d2c1", "COLOR_BLUE":"#001858", "COLOR_PINK":"#f582ae", "COLOR_CYAN":"#8bd3dd"
|
||||||
|
|
|
@ -5,5 +5,5 @@
|
||||||
"DB_USERNAME":["exec","echo -n \"$(sed --quiet \"/db_username=/s/.*=//p\" config/instance.conf)\""],
|
"DB_USERNAME":["exec","echo -n \"$(sed --quiet \"/db_username=/s/.*=//p\" config/instance.conf)\""],
|
||||||
"DB_NAME" :["exec","echo -n \"$(sed --quiet \"/db_database=/s/.*=//p\" config/instance.conf)\""],
|
"DB_NAME" :["exec","echo -n \"$(sed --quiet \"/db_database=/s/.*=//p\" config/instance.conf)\""],
|
||||||
"DB_SERVER" :["exec","echo -n \"$(sed --quiet \"/db_svr_host=/s/.*=//p\" config/instance.conf)\""],
|
"DB_SERVER" :["exec","echo -n \"$(sed --quiet \"/db_svr_host=/s/.*=//p\" config/instance.conf)\""],
|
||||||
"ABOUT_PAGE":["file","config/about.template"]
|
"ABOUT_PAGE" :["file","config/about.template"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ $navbar="about";
|
||||||
ThreadR - About Us
|
ThreadR - About Us
|
||||||
</title>
|
</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -11,7 +11,7 @@ $id=$_GET['id'];
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Boards</title>
|
<title>ThreadR - Boards</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<?php
|
<?php
|
||||||
if(isset($_GET['action'])) {
|
if(isset($_GET['action'])) {
|
||||||
if ($_GET['action']=='submit') {
|
if ($_GET['action']=='submit') {
|
||||||
|
|
|
@ -7,27 +7,49 @@ $navbar="boards";
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Boards</title>
|
<title>ThreadR - Boards</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
%NAVBAR%
|
%NAVBAR%
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="item-1">
|
<div class="item-1">
|
||||||
<h1><center>ThreadR Boards</center></h1>
|
<h1>
|
||||||
</div>
|
<center>ThreadR Boards</center>
|
||||||
<div class="item-2">
|
</h1>
|
||||||
<ul class="list">
|
</div>
|
||||||
<?php
|
<div class="item-2">
|
||||||
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
<ul class="list">
|
||||||
|
<?php
|
||||||
|
$pdo = new PDO('mysql:host=%DB_SERVER%;dbname=%DB_NAME%', '%DB_USERNAME%', '%DB_PASSWORD%');
|
||||||
|
$error = false;
|
||||||
|
$error_message = "";
|
||||||
|
if (!$error) {
|
||||||
|
echo '<center><h2 class="beige">Public Boards</h2></center>';
|
||||||
|
$statement = $pdo->prepare("SELECT * FROM boards WHERE private='0' ORDER BY id asc");
|
||||||
|
$statement->execute();
|
||||||
|
foreach($statement->fetchAll() as $ROW) {
|
||||||
|
echo "<li><a href='%CONTENT_DIR%/board/?id=$ROW[id]'>$ROW[name]</a></li>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$result) {
|
||||||
|
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="item-3">
|
||||||
|
<ul class="list">
|
||||||
|
<?php
|
||||||
|
if ($login) {
|
||||||
$error = false;
|
$error = false;
|
||||||
$error_message = "";
|
$error_message = "";
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
echo '<center><h2 class="beige">Public Boards</h2></center>';
|
echo '<center><h2 class="beige">Private Boards</h2></center>';
|
||||||
$statement = $pdo->prepare("SELECT * FROM boards WHERE private='0' ORDER BY id asc");
|
$statement = $pdo->prepare("SELECT * FROM boards WHERE private='1' ORDER BY id asc");
|
||||||
$statement->execute();
|
$statement->execute();
|
||||||
foreach($statement->fetchAll() as $ROW) {
|
foreach($statement->fetchAll() as $ROW) {
|
||||||
echo "<li><a href='%CONTENT_DIR%/board/?id=$ROW[id]'>$ROW[name]</a></li>";
|
echo "<li><a href='%CONTENT_DIR%/board/?id=$ROW[id]'>$ROW[name]</a></li>";
|
||||||
|
@ -36,31 +58,11 @@ $navbar="boards";
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
||||||
}
|
}
|
||||||
?>
|
}
|
||||||
</ul>
|
?>
|
||||||
</div>
|
</ul>
|
||||||
<div class="item-3">
|
|
||||||
<ul class="list">
|
|
||||||
<?php
|
|
||||||
if ($login) {
|
|
||||||
$error = false;
|
|
||||||
$error_message = "";
|
|
||||||
if (!$error) {
|
|
||||||
echo '<center><h2 class="beige">Private Boards</h2></center>';
|
|
||||||
$statement = $pdo->prepare("SELECT * FROM boards WHERE private='1' ORDER BY id asc");
|
|
||||||
$statement->execute();
|
|
||||||
foreach($statement->fetchAll() as $ROW) {
|
|
||||||
echo "<li><a href='%CONTENT_DIR%/board/?id=$ROW[id]'>$ROW[name]</a></li>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!$result) {
|
|
||||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
%BANNER_COOKIES%
|
</div>
|
||||||
</body>
|
%BANNER_COOKIES%
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,7 +1,25 @@
|
||||||
# Short documentation of all files
|
# Short documentation of all files
|
||||||
### [index.html](./index.html)
|
### [index.html](./index.html)
|
||||||
This is my usual nope.html to prevent kiddies from poking at my files. It just redirects. There is no real security benefit to it though as it does not even prevent `wget -r`.
|
This is my usual nope.html to prevent kiddies from poking at my files. It just redirects. There is no real security benefit to it though as it does not even prevent `wget -r`.
|
||||||
### *.{svg,png,jpg}
|
### [favicon-32x32.png](./favicon-32x32.png)
|
||||||
images that are used on the page
|
- Tab icon
|
||||||
|
- format: PNG
|
||||||
|
- resolution: 32x32
|
||||||
|
### [threadR.png](./threadR.png)
|
||||||
|
- unused
|
||||||
|
- format: PNG
|
||||||
|
- resolution: 48x48
|
||||||
|
### [ThreadR.png](./ThreadR.png)
|
||||||
|
- unused, render of the main logo svg
|
||||||
|
- format: PNG
|
||||||
|
- resolution: 1856x674
|
||||||
|
### [ThreadR.svg](./ThreadR.svg)
|
||||||
|
- main logo, front center on the home page
|
||||||
|
- format: SVG + macros
|
||||||
|
- will not render properly without macro processing
|
||||||
|
### [ThreadR_Home.svg](./ThreadR_Home.svg)
|
||||||
|
- more square version of the logo, used on the "home" link on the navbar
|
||||||
|
- format: SVG + macros
|
||||||
|
- will not render properly without macro processing
|
||||||
### [README.md](./README.md)
|
### [README.md](./README.md)
|
||||||
this file
|
this file
|
||||||
|
|
|
@ -11,7 +11,7 @@ $navbar="home";
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Home</title>
|
<title>ThreadR - Home</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -11,7 +11,7 @@ if (isset($_SESSION['user_id'])){
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Log In</title>
|
<title>ThreadR - Log In</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -5,25 +5,25 @@ $navbar = "logout";
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Home</title>
|
<title>ThreadR - Home</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
%NAVBAR%
|
%NAVBAR%
|
||||||
<br />
|
<br />
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="item-1">
|
<div class="item-1">
|
||||||
<h1>
|
<h1>
|
||||||
<center>Bye! Cya around some time soon.</center>
|
<center>Bye! Cya around some time soon.</center>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-2">
|
<div class="item-2">
|
||||||
<img src="%CONTENT_DIR%/img/ThreadR.svg" alt="ThreadR" height="100%" width="100%">
|
<img src="%CONTENT_DIR%/img/ThreadR.svg" alt="ThreadR" height="100%" width="100%">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
%BANNER_COOKIES%
|
%BANNER_COOKIES%
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -10,7 +10,7 @@ $navbar = "news";
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - News</title>
|
<title>ThreadR - News</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -26,7 +26,7 @@ $navbar = "profile";
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Profile</title>
|
<title>ThreadR - Profile</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -9,7 +9,7 @@ $navbar = "signup";
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Sign Up</title>
|
<title>ThreadR - Sign Up</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -31,30 +31,30 @@ $navbar = "verify-email";
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR - Verification</title>
|
<title>ThreadR - Verification</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
%NAVBAR%
|
%NAVBAR%
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="item-1">
|
<div class="item-1">
|
||||||
<h1>
|
<h1>
|
||||||
<center>E-mail verification</center>
|
<center>E-mail verification</center>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-2">
|
<div class="item-2">
|
||||||
<section>
|
<section>
|
||||||
<p>Please send an e-mail containing the following token to <a class="pink-b" href="mailto:signup@lostcave.ddnss.de?subject=ThreadR%20-%20Verification&body=<?php echo $token; ?>">signup@lostcave.ddnss.de</a>:</p>
|
<p>Please send an e-mail containing the following token to <a class="pink-b" href="mailto:signup@lostcave.ddnss.de?subject=ThreadR%20-%20Verification&body=<?php echo $token; ?>">signup@lostcave.ddnss.de</a>:</p>
|
||||||
<form action="%CONTENT_DIR%/signup/verify-email/redirect.php" method="post">
|
<form action="%CONTENT_DIR%/signup/verify-email/redirect.php" method="post">
|
||||||
<p>Token: <?php echo $token; ?></p>
|
<p>Token: <?php echo $token; ?></p>
|
||||||
<input type="submit" value="Done, sign me up!" />
|
<input type="submit" value="Done, sign me up!" />
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
%BANNER_COOKIES%
|
%BANNER_COOKIES%
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -25,7 +25,7 @@ $navbar = "home";
|
||||||
<head>
|
<head>
|
||||||
<title>ThreadR</title>
|
<title>ThreadR</title>
|
||||||
%STYLESHEET%
|
%STYLESHEET%
|
||||||
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
|
%FAVICON%
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
Loading…
Reference in New Issue