This repository has been archived on 2024-02-28. You can view files and clone it, but cannot push or open issues or pull requests.
furpsocial/index.php

102 lines
3.8 KiB
PHP
Raw Normal View History

2023-08-01 19:57:14 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
2023-08-01 23:05:45 +01:00
<title>furpsocial</title>
2023-08-01 19:57:14 +01:00
<meta charset="UTF-8">
<style>
:root {
--accent: #32a852;
}
2023-08-01 19:38:07 +01:00
2023-08-01 19:57:14 +01:00
body {
2023-08-01 20:39:25 +01:00
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
2023-08-01 19:57:14 +01:00
background: var(--accent);
margin: 0;
padding: 0;
}
2023-08-01 20:11:48 +01:00
2023-08-01 20:13:44 +01:00
#body-input {
2023-08-01 20:43:22 +01:00
width: 99%;
2023-08-01 20:13:44 +01:00
height: 150px;
2023-08-01 20:43:22 +01:00
resize: none;
2023-08-01 20:13:44 +01:00
}
2023-08-01 23:22:08 +01:00
.post {
width: 100%;
max-width: 600px;
margin: auto;
background: white;
padding: 10px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-shadow: 0px 0px 10px gray;
border-radius: 8px;
2023-08-01 23:26:11 +01:00
overflow: hidden;
2023-08-01 23:22:08 +01:00
}
.post h1 {
margin: 0;
font-size: 20px;
2023-08-01 23:27:44 +01:00
}
.post h2 {
margin: 0;
font-size: 14px;
2023-08-01 23:26:11 +01:00
padding: 10px;
margin: -10px;
2023-08-01 23:30:30 +01:00
display: inline-block;
}
.post i {
float: right;
color: grey;
2023-08-01 23:22:08 +01:00
}
2023-08-01 19:57:14 +01:00
</style>
</head>
<body>
2023-08-01 23:22:08 +01:00
<div class="post">
2023-08-01 23:27:44 +01:00
<h1><span style="color: var(--accent);">furp</span>social</h1>
2023-08-01 19:57:14 +01:00
<hr>
2023-08-01 19:38:07 +01:00
2023-08-01 20:14:40 +01:00
<form method="post">
2023-08-01 20:18:09 +01:00
<textarea id="body-input" name="body"></textarea>
2023-08-01 20:39:25 +01:00
Signature (optional): <input type="text" name="signature"><br>
2023-08-01 19:57:14 +01:00
<input type="submit">
</form>
2023-08-01 19:38:07 +01:00
2023-08-01 23:14:28 +01:00
<span style="font-size: 12px; color: grey;">Privacy Policy: The only data collected by furpsocial is the contents of your posts (signature and body text). This information is stored in our secure databases which are wiped of all post data every week. This data is only used to accomodate furp as a social media platform.</span>
2023-08-01 23:10:47 +01:00
2023-08-01 23:17:57 +01:00
</div>
2023-08-01 22:41:26 +01:00
2023-08-01 23:17:57 +01:00
<?php
// write to file
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
$myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)");
2023-08-01 22:41:26 +01:00
2023-08-01 23:17:57 +01:00
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {
2023-08-01 23:37:31 +01:00
fwrite($myfile, htmlspecialchars($_POST["signature"]) . " [" . date("m/d/Y") . "] " . htmlspecialchars($_POST["body"]) . "<br>");
2023-08-01 23:17:57 +01:00
} else {
2023-08-01 22:22:24 +01:00
}
2023-08-01 22:14:53 +01:00
2023-08-01 22:01:43 +01:00
fclose($myfile);
2023-08-01 23:17:57 +01:00
}
?>
2023-08-01 20:25:30 +01:00
2023-08-01 23:17:57 +01:00
<div class="post">
2023-08-01 23:37:31 +01:00
<h2>anon</h2>
2023-08-01 23:30:30 +01:00
<i>mm/dd/yyyy</i>
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec dignissim sapien ut ornare elementum. Nullam vel accumsan quam. Nam vitae nibh nibh. Sed ultrices vulputate odio in volutpat. Nullam elementum tellus vel purus aliquam egestas. Cras congue diam sit amet sapien faucibus ultricies. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vivamus sit amet arcu vitae nulla tempus blandit ac quis nibh. Mauris vel metus vel lorem venenatis facilisis mattis vel dui. Ut est purus, ultricies blandit justo tempor, porttitor porttitor erat. Praesent non felis ultricies, scelerisque dui nec, egestas lectus. Suspendisse euismod ultricies pharetra. Aenean aliquam mauris sit amet arcu scelerisque, a sollicitudin ipsum laoreet. Praesent a venenatis velit, nec fringilla mi. Nunc dignissim tortor vel odio pulvinar, vitae euismod diam tincidunt. In ullamcorper urna nec ex dapibus luctus.</div>
2023-08-01 19:57:14 +01:00
</div>
2023-08-01 23:37:31 +01:00
<?php
// read from file
$myfile = fopen("posts.txt", "r") or die("Unable to open file! (r)");
echo fread($myfile,filesize("posts.txt"));
fclose($myfile);
?>
2023-08-01 19:57:14 +01:00
</body>
2023-08-01 19:38:07 +01:00
</html>