forked from GithubBackups/tinyib
noko support
This commit is contained in:
parent
a1975b4e5e
commit
f5f755b4df
19
imgboard.php
19
imgboard.php
@ -97,7 +97,7 @@ if (isset($_POST["message"]) || isset($_POST["file"])) {
|
|||||||
$lastpost = lastPostByIP();
|
$lastpost = lastPostByIP();
|
||||||
if ($lastpost) {
|
if ($lastpost) {
|
||||||
if ((time() - $lastpost['timestamp']) < 30) {
|
if ((time() - $lastpost['timestamp']) < 30) {
|
||||||
fancyDie("Please wait a moment before posting again. You will be able to make another post in " . (30 - (time() - $lastpost['timestamp'])) . " seconds.");
|
fancyDie("Please wait a moment before posting again. You will be able to make another post in " . (30 - (time() - $lastpost['timestamp'])) . " second(s).");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -128,6 +128,12 @@ if (isset($_POST["message"]) || isset($_POST["file"])) {
|
|||||||
$post['message'] = str_replace("\n", "<br>", colorQuote(cleanString(rtrim($_POST["message"]))));
|
$post['message'] = str_replace("\n", "<br>", colorQuote(cleanString(rtrim($_POST["message"]))));
|
||||||
}
|
}
|
||||||
if ($_POST['password'] != '') { $post['password'] = md5(md5($_POST['password'])); } else { $post['password'] = ''; }
|
if ($_POST['password'] != '') { $post['password'] = md5(md5($_POST['password'])); } else { $post['password'] = ''; }
|
||||||
|
if (strtolower($post['email']) == "noko") {
|
||||||
|
$post['email'] = '';
|
||||||
|
$noko = true;
|
||||||
|
} else {
|
||||||
|
$noko = false;
|
||||||
|
}
|
||||||
$post['nameblock'] = nameBlock($post['name'], $post['tripcode'], $post['email'], time(), $modposttext);
|
$post['nameblock'] = nameBlock($post['name'], $post['tripcode'], $post['email'], time(), $modposttext);
|
||||||
|
|
||||||
if (isset($_FILES['file'])) {
|
if (isset($_FILES['file'])) {
|
||||||
@ -236,6 +242,13 @@ if (isset($_POST["message"]) || isset($_POST["file"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$post['id'] = insertPost($post);
|
$post['id'] = insertPost($post);
|
||||||
|
if ($noko) {
|
||||||
|
if ($post['parent'] != '0') {
|
||||||
|
$redirect = 'res/' . $post['parent'] . '.html#' . $post['id'];
|
||||||
|
} else {
|
||||||
|
$redirect = 'res/' . $post['id'] . '.html#' . $post['id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
trimThreads();
|
trimThreads();
|
||||||
echo 'Updating thread page...<br>';
|
echo 'Updating thread page...<br>';
|
||||||
if ($post['parent'] != '0') {
|
if ($post['parent'] != '0') {
|
||||||
@ -364,7 +377,11 @@ if (isset($_POST["message"]) || isset($_POST["file"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($redirect) {
|
if ($redirect) {
|
||||||
|
if (is_string($redirect)) {
|
||||||
|
echo '--> --> --><meta http-equiv="refresh" content="0;url=' . $redirect . '">';
|
||||||
|
} else {
|
||||||
echo '--> --> --><meta http-equiv="refresh" content="0;url=index.html">';
|
echo '--> --> --><meta http-equiv="refresh" content="0;url=index.html">';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
x
Reference in New Issue
Block a user