Update index.php
This commit is contained in:
parent
b79ef3ea37
commit
8a5317dd61
1 changed files with 20 additions and 17 deletions
37
index.php
37
index.php
|
@ -24,7 +24,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div style="width: 100%; max-width: 600px; background: white; height: 100vh; margin: auto; padding: 10px; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-shadow: 0px 0px 10px gray;">
|
<div style="width: 100%; max-width: 600px; background: white; margin: auto; padding: 10px; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-shadow: 0px 0px 10px gray;">
|
||||||
<h1 style="margin: 0; font-size: 20px;"><span style="color: var(--accent);">furp</span>social</h1>
|
<h1 style="margin: 0; font-size: 20px;"><span style="color: var(--accent);">furp</span>social</h1>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -37,28 +37,31 @@
|
||||||
|
|
||||||
<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>
|
<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>
|
||||||
|
|
||||||
<hr>
|
</div>
|
||||||
|
|
||||||
<?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)");
|
|
||||||
|
|
||||||
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {
|
<?php
|
||||||
fwrite($myfile, htmlspecialchars($_POST["signature"]) . ": " . htmlspecialchars($_POST["body"]) . "<br>");
|
// write to file
|
||||||
} else {
|
if (!is_null($_POST["body"]) && strlen($_POST["body"]) != 0) {
|
||||||
fwrite($myfile, "anon: " . htmlspecialchars($_POST["body"]) . "<br>");
|
$myfile = fopen("posts.txt", "a") or die("Unable to open file! (a)");
|
||||||
}
|
|
||||||
|
|
||||||
fclose($myfile);
|
if (!is_null($_POST["signature"]) && strlen($_POST["signature"]) != 0) {
|
||||||
|
fwrite($myfile, htmlspecialchars($_POST["signature"]) . ": " . htmlspecialchars($_POST["body"]) . "<br>");
|
||||||
|
} else {
|
||||||
|
fwrite($myfile, "anon: " . htmlspecialchars($_POST["body"]) . "<br>");
|
||||||
}
|
}
|
||||||
|
|
||||||
// read from file
|
|
||||||
$myfile = fopen("posts.txt", "r") or die("Unable to open file! (r)");
|
|
||||||
echo fread($myfile,filesize("posts.txt"));
|
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
?>
|
}
|
||||||
|
|
||||||
|
// read from file
|
||||||
|
$myfile = fopen("posts.txt", "r") or die("Unable to open file! (r)");
|
||||||
|
echo fread($myfile,filesize("posts.txt"));
|
||||||
|
fclose($myfile);
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="post">
|
||||||
|
<h1>title</h1>
|
||||||
|
<span>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.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
Reference in a new issue