1
0
Fork 0
isopod.cool/blog/comment/form.php

57 lines
1.9 KiB
PHP
Raw Normal View History

2024-01-04 15:02:57 +00:00
<?php
$return = $_GET["return"];
?>
v3.1 - Minor overhaul to the entire site - Removed some unused files - Updated the blog post layout to have all the navigation - Replaced hovertext in blog posts with footnotes - Seaonal pride captions on homepage - Updated /etc/quotes/ - Background color is now actually reminiscent of Discord - Total overhaul to /uses/ - Added sub-page for my computer - New markup for blockquotes that css-tricks.com says is more semantically correct - More difficult captcha on the guestbook (answer remains unchanged) - New blog post about DMs on the fediverse - Blog now has links to each year - Removed journal. I barely used it and it was redundant anyway - Removed the TODO list that I wasn't using from /etc/ - CSS overhaul: - Cool new hover animation on navigation links - Centralized most color definitions to root variables, and a couple other things too - Standard font is now B612 mono - complies with prefers-reduced-motion - Light theme and low contrast mode in the works - Made tables more consistent, and the one on /about/ no longer looks like doodoo - Accent borders on headings and such-like - Main header & caption are now left-aligned instead of center-aligned - Isopod letterhead moved from left side of header to right - h1 made smaller, h2-6 changed back to default sizes - Adjusted a couple background positions to improve readability - Got rid of the checkbox-hack dropdown navigation on mobile, because it kind of sucked - Regular body text no longer has text-shadow - probably some other stuff I forgot about
2024-07-08 09:20:49 +00:00
<hr>
2024-01-04 15:02:57 +00:00
<h2>Comments</h2>
<form action="/blog/comment/submit.php" method="post" autocomplete="off">
<?php echo "<input type='text' name='entry' value='".preg_replace("/^.*\//","",getcwd())."' style='display: none;' readonly>"; ?>
<table>
<tr>
<td><input type="text" name="name" placeholder="Name"></td>
<td><input type="text" name="botcheck" placeholder="Bot test (type &quot;isopod&quot;)"></td>
</tr>
<tr>
<td colspan="2"><textarea name="message" placeholder="Comment"></textarea></td>
</tr>
<tr>
<?php
switch ($return) {
case 'noname':
echo "<td><span class='error'>Name required!</span></td>";
break;
case 'nomessage':
echo "<td><span class='error'>Message required!</span></td>";
break;
case 'botcheckfailed':
echo "<td><span class='error'>You failed the bot check!</span></td>";
break;
case 'success':
echo "<td><span class='success'>Successfully posted!</span></td>";
break;
default:
echo "<td></td>";
break;
}
?>
<td style="text-align: right;"><input type="submit" value="Post"></td>
</tr>
</table>
</form>
<?php
$totaloutput = "";
$postlist = json_decode(file_get_contents("../../comment/posts.json"));
foreach($postlist as $post) {
if ($post->entry == preg_replace("/^.*\//","",getcwd())) {
$output = "";
$date = date("Y-m-d h:iA", $post->date);
$name = $post->name;
$message = $post->message;
$output = $output."<hr><article><table><tr><td style='text-align: left;'>".$name."</td><td style='text-align: right;'>".$date."</td></tr><tr><td colspan='2'>".$message."</td></tr></table></article>";
$totaloutput = $output.$totaloutput;
}
}
echo $totaloutput; ?>