Added tools

This commit is contained in:
2025-06-25 17:48:30 +02:00
parent 9ec73e7e86
commit db02992ee9
5 changed files with 276 additions and 0 deletions

40
tools/discord-webhook.php Normal file
View File

@@ -0,0 +1,40 @@
<?php include "html-head.php"; ?>
<title>Discord Webhook API</title>
</head>
<body>
<label for="username">Name:</label><br>
<input type="text" id="username" name="username" required>
<br><br>
<label for="avatar_url">Avatar URL:</label><br>
<input type="text" id="avatar_url" name="avatar_url" required>
<br><br>
<label for="message">Nachricht:</label><br>
<textarea id="message" name="message" required></textarea>
<br><br>
<button onclick="sendMessage()">Nachricht senden</button>
<script>
function sendMessage() {
var request = new XMLHttpRequest();
var username = document.getElementById("username").value;
var avatar_url = document.getElementById("avatar_url").value;
var message = document.getElementById("message").value;
request.open("POST", "https://discord.com/api/webhooks/810505594678280203/mnxaBTlCwZJstK_mXevDJ21PbdJdu0a0VtqEv2cyCEMNdO0zXzLnqW8Dk2yRmzl7V67w");
request.setRequestHeader('Content-type', 'application/json');
var paramaters = {
username: username,
avatar_url: avatar_url,
content: message
}
request.send(JSON.stringify(paramaters));
alert("Nachricht gesendet");
}
</script>
</body>
</html>

29
tools/discord-widget.php Normal file
View File

@@ -0,0 +1,29 @@
<?php include "../html-head.php"; ?>
<style>
* {
margin: 0;
padding: 0;
}
body {
margin: 0;
overflow: hidden;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
iframe {
width: 100vw;
height: 100vh;
}
</style>
<title>Discord Widget &ndash; Tools &ndash; Elias Fink</title>
</head>
<body>
<iframe src="https://discord.com/widget?id=788054095800827944&theme=dark" frameborder="0" sandbox="allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts"></iframe>
</body>
</html>

44
tools/index.php Normal file
View File

@@ -0,0 +1,44 @@
<?php include "../html-head.php"; ?>
<link rel="stylesheet" href="https://static.eliasfink.de/fonts/montserrat/montserrat.css">
<style>
body {
margin: 0;
background-color: var(--blue-1);
}
h1 {
top: 50%;
left: 50%;
margin: 0;
color: #FFFFFF;
font-size: 48px;
font-weight: 300;
position: absolute;
transform: translate(-50%, -50%);
font-family: "Montserrat", sans-serif;
}
span {
color: var(--blue-3);
}
@media (max-width: 767px) {
h1 {
font-size: 32px;
}
}
</style>
<title>Tools &ndash; eliasfink.de</title>
</head>
<body>
<h1><span>tools</span>.eliasfink.de</h1>
</body>
</html>

116
tools/mail.php Normal file
View File

@@ -0,0 +1,116 @@
<?php include "html-head.php"; ?>
<style>
body {
margin: 0;
font-size: 18px;
font-weight: 400;
line-height: 1.5;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
#container {
padding: 25px;
}
.spacer-10 {
height: 10px;
}
</style>
<title>PHP Mail GUI &ndash; Elias Fink</title>
</head>
<body>
<?php
if ( $_POST ) {
$from_name = filter_var ( $_POST['from_name'], FILTER_SANITIZE_STRING );
$from_email = filter_var ( $_POST['from_email'], FILTER_SANITIZE_STRING );
$to = filter_var ( $_POST['to'], FILTER_SANITIZE_STRING );
$subject = filter_var ( $_POST['subject'], FILTER_SANITIZE_STRING );
$message = '<div>' . nl2br ( htmlspecialchars ( $_POST['message'] ) ) . '</div>';
$cc = filter_var ( $_POST['cc'], FILTER_SANITIZE_STRING );
$bcc = filter_var ( $_POST['bcc'], FILTER_SANITIZE_STRING );
$reply_to = filter_var ( $_POST['reply_to'], FILTER_SANITIZE_STRING );
$headers = 'MIME-Version: 1.0' . "\r\n"
.'Content-type: text/html; charset=utf-8' . "\r\n"
.'From: ' . $from_name . ' <' . $from_email . '>' . "\r\n"
.'Cc: ' . $cc . "\r\n"
.'Bcc: ' . $bcc . "\r\n"
.'Reply-To: ' . $reply_to . "\r\n";
if ( mail ( $to, $subject, $message, $headers ) ) {
echo '<h1 style="color:#0c0;">Nachricht erfolgreich gesendet</h1>';
echo '<p><b>Von:</b> ' . $from_name . ' &lt;' . $from_email . '&gt;</p>';
echo '<p><b>An:</b> ' . $to . '</p>';
echo '<p><b>Betreff:</b> ' . $subject . '</p>';
echo '<p><b>Nachricht:</b></p>' . $message;
echo '<p><b>Cc:</b> ' . $cc . '</p>';
echo '<p><b>Bcc:</b> ' . $bcc . '</p>';
echo '<p><b>Antwort an:</b> ' . $reply_to . '</p>';
} else {
echo '<h1 style="color:red;">Senden der Nachricht fehlgeschlagen</h1>';
}
}
?>
<div id="container">
<form action="mail.php" method="post">
<div id="form-left">
<label for="from_name">Von:</label>
<input type="text" id="from_name" name="from_name" placeholder="Name" required>
<input type="text" id="from_email" name="from_email" placeholder="E-Mail" required>
<div class="spacer-10"></div>
<label for="to">An:</label>
<input type="text" id="to" name="to" required>
<div class="spacer-10"></div>
<label for="subject">Betreff:</label><div class="spacer-10"></div>
<input type="text" id="subject" name="subject" required>
<div class="spacer-10"></div>
<label for="message">Nachricht:</label><div class="spacer-10"></div>
<textarea id="message" name="message" required></textarea>
</div>
<div id="form-right">
<label for="cc">Cc:</label>
<input type="text" id="cc" name="cc">
<div class="spacer-10"></div>
<label for="bcc">Bcc:</label>
<input type="text" id="bcc" name="bcc">
<div class="spacer-10"></div>
<label for="reply_to">Antwort an:</label>
<input type="text" id="reply_to" name="reply_to">
</div>
<input type="submit" value="E-Mail senden">
</form>
</div>
</body>
</html>

47
tools/tools.css Normal file
View File

@@ -0,0 +1,47 @@
body {
margin: 0;
color: #fff;
overflow: hidden;
text-align: center;
font-family: "Montserrat";
background-color: #001A33;
}
#container {
top: 50%;
left: 50%;
position: absolute;
transform: translate(-50%, -50%);
}
#title {
margin-top: 0;
font-size: 40px;
font-weight: 300;
margin-bottom: 50px;
}
#title span {
color: #168eff;
}
.button {
color: #fff;
cursor: pointer;
font-size: 18px;
background: none;
transition: 0.25s;
padding: 15px 30px;
border-radius: 5px;
border: 2px solid #fff;
}
.button:hover {
color: #001A33;
background-color: #fff;
}
.button a {
color: inherit;
text-decoration: none;
}