Compare commits

..

1 Commits

Author SHA1 Message Date
SnowCode 55a94c2308 Adding sql commands 2021-09-08 21:34:38 +02:00
2 changed files with 78 additions and 27 deletions

View File

@ -31,30 +31,30 @@ $navbar = "verify-email";
?>
<!DOCTYPE html>
<html>
<head>
<title>ThreadR - Verification</title>
%STYLESHEET%
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
%NAVBAR%
<div class="container">
<div class="item-1">
<h1>
<center>E-mail verification</center>
</h1>
</div>
<div class="item-2">
<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>
<form action="%CONTENT_DIR%/signup/verify-email/redirect.php" method="post">
<p>Token: <?php echo $token; ?></p>
<input type="submit" value="Done, sign me up!" />
</form>
</section>
</div>
</div>
%BANNER_COOKIES%
</body>
</html>
<head>
<title>ThreadR - Verification</title>
%STYLESHEET%
<link rel="icon" type="image/png" href="%CONTENT_DIR%/img/favicon-32x32.png" sizes="32x32" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
%NAVBAR%
<div class="container">
<div class="item-1">
<h1>
<center>E-mail verification</center>
</h1>
</div>
<div class="item-2">
<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>
<form action="%CONTENT_DIR%/signup/verify-email/redirect.php" method="post">
<p>Token: <?php echo $token; ?></p>
<input type="submit" value="Done, sign me up!" />
</form>
</section>
</div>
</div>
%BANNER_COOKIES%
</body>
</html>

51
threadr.sql Normal file
View File

@ -0,0 +1,51 @@
CREATE DATABASE threadr;
USE threadr;
CREATE TABLE boards(
id INT AUTO_INCREMENT,
name VARCHAR(50),
user_friendly_name VARCHAR(50),
private BOOL,
public_visible BOOL,
PRIMARY KEY (id)
);
CREATE TABLE posts(
id INT AUTO_INCREMENT,
board_id INT,
user_id INT,
post_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
edit_time TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(),
content TEXT NULL DEFAULT NULL,
attachement_hash BIGINT(20) NULL DEFAULT NULL,
attachement_name VARCHAR(100) NULL DEFAULT NULL,
title VARCHAR(100) NULL DEFAULT NULL,
reply_to INT DEFAULT -1,
PRIMARY KEY (id)
);
CREATE TABLE profiles(
id INT AUTO_INCREMENT,
email VARCHAR(100),
display_name VARCHAR(50),
status VARCHAR(100),
about TEXT,
website VARCHAR(100),
PRIMARY KEY (id)
);
CREATE TABLE users(
id INT AUTO_INCREMENT,
name VARCHAR(50),
authentication_string VARCHAR(128),
authentication_salt VARCHAR(128),
authentication_algorithm VARCHAR(128),
time_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP(),
time_altered TIMESTAMP DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP(),
verified BOOLEAN DEFAULT 0,
PRIMARY KEY (id)
);
CREATE USER 'threadr'@'localhost' IDENTIFIED BY 'azerty';
GRANT ALL PRIVILEGES ON threadr.* TO 'threadr'@'localhost';
FLUSH PRIVILEGES;
EXIT;