mirror of
https://github.com/ithrts/ImoutoIB.git
synced 2025-01-17 08:18:14 +01:00
output_html template, vid fix
- $output_html templating, will make more changes later with api toggle for JS stuff like cross-thread post-hovering and autoupdate and similar. - video compatibility fix for blink browsers - description (frontpage) and board slogan (below title on page) are now separate. - minor style changes
This commit is contained in:
parent
af2a57d515
commit
a3f3e3a0f7
@ -2,9 +2,13 @@ DirectoryIndex main.php
|
||||
|
||||
Options -Indexes
|
||||
|
||||
#ErrorDocument 403 'Temporary unavailable for template changing.'
|
||||
#Order Allow,Deny
|
||||
#Allow from (IP here and uncomment)
|
||||
|
||||
# temporary
|
||||
<IfModule mod_headers.c>
|
||||
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
|
||||
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
|
||||
</IfModule>
|
||||
<IfModule mod_expires.c>
|
||||
ExpiresActive On
|
||||
|
@ -322,7 +322,7 @@ input[name="captcha"] {
|
||||
}
|
||||
|
||||
.abovefooter {
|
||||
height: 30px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
@ -450,7 +450,6 @@ label {
|
||||
|
||||
div.post details {
|
||||
display: inline;
|
||||
margin-right: -4px;
|
||||
}
|
||||
|
||||
div.post td details {
|
||||
@ -487,6 +486,10 @@ div.post details table {
|
||||
border-bottom: 1px solid #b7c5d9;
|
||||
}
|
||||
|
||||
.pager table {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 752px;
|
||||
margin: auto;
|
||||
|
@ -18,7 +18,7 @@ function getRandomImage($dir_path = NULL){
|
||||
|
||||
$banner = getRandomImage(__dir__ . '/banners');
|
||||
|
||||
echo ' <div class="banner">
|
||||
$output_html .= ' <div class="banner">
|
||||
<img class="banner" src="'. $prefix_folder . '/assets/img/banners/' . $banner . '"/>
|
||||
</div>';
|
||||
|
||||
|
@ -255,7 +255,7 @@ document.addEventListener("DOMContentLoaded", function(event) {
|
||||
const videos = document.querySelectorAll(".post-image[data-file='video']");
|
||||
for (const video of videos) {
|
||||
let thumb = video.querySelector('a img.thumb');
|
||||
let expand = video.querySelector('a video');
|
||||
let expand = video.querySelector('video');
|
||||
let vidid = expand.getAttribute('vid-id');
|
||||
let fileinfo = video.parentNode.querySelector('div.file-info');
|
||||
let expandsrc = expand.getAttribute('vid-src');
|
||||
|
@ -6,7 +6,8 @@
|
||||
$config['boards']['img'] = array(
|
||||
'url' => 'img',
|
||||
'title' => 'imageboard',
|
||||
'description' => 'Imageboard Demo',
|
||||
'slogan' => 'Imageboard Demo',
|
||||
'description' => 'You can test the imageboard functions here.',
|
||||
'locked' => 0,
|
||||
'hidden' => 0,
|
||||
'mod_only' => 0,
|
||||
@ -16,7 +17,8 @@ $config['boards']['img'] = array(
|
||||
$config['boards']['txt'] = array(
|
||||
'url' => 'txt',
|
||||
'title' => 'textboard',
|
||||
'description' => 'Bulletin Board System',
|
||||
'slogan' => 'Textboard Demo',
|
||||
'description' => 'You can test the textboard functions here.',
|
||||
'locked' => 0,
|
||||
'hidden' => 0,
|
||||
'mod_only' => 0,
|
||||
@ -26,6 +28,7 @@ $config['boards']['txt'] = array(
|
||||
$config['boards']['mod'] = array(
|
||||
'url' => 'mod',
|
||||
'title' => 'Moderator Board',
|
||||
'slogan' => 'They fear the janny.',
|
||||
'description' => 'Only readable and writeable by moderators.',
|
||||
'locked' => 0,
|
||||
'hidden' => 1,
|
||||
|
@ -6,7 +6,8 @@ require 'require.php';
|
||||
//if captcha required?
|
||||
|
||||
if (empty($_POST)) {
|
||||
echo 'No post request received.';
|
||||
$output_html .= 'No post request received.';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -49,19 +50,22 @@ if (ctype_alnum($delrep_board) != true || ctype_alnum($delrep_thread) != true ||
|
||||
|
||||
//DOES BOARD EXIST?
|
||||
if (!in_Array($delrep_board, $config['boardlist'])) {
|
||||
echo 'Board ' . $delrep_board . ' does not exist.';
|
||||
$output_html .= 'Board ' . $delrep_board . ' does not exist.';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
//DOES REPLY EXIST
|
||||
if ($delrep_reply != $delrep_thread) {
|
||||
if (isset($delrep_reply) && (!file_exists($path . '/' . $database_folder . '/boards/' . $delrep_board . '/' . $delrep_thread . '/' . $delrep_reply . '.php'))) {
|
||||
echo 'Reply ' . $delrep_reply . ' does not exist.';
|
||||
$output_html .= 'Reply ' . $delrep_reply . ' does not exist.';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
//DOES THREAD EXIST?
|
||||
if (isset($delrep_thread) && (!file_exists($path . '/' . $database_folder . '/boards/' . $delrep_board . '/' . $delrep_thread . '/OP.php'))) {
|
||||
echo 'Thread ' . $delrep_thread . ' does not exist.';
|
||||
$output_html .= 'Thread ' . $delrep_thread . ' does not exist.';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -295,10 +299,11 @@ if (isset($_POST["report"]) && $_POST["report"] != "") {
|
||||
ReportCounter($database_folder, 'global'); //refresh report counter
|
||||
//done
|
||||
if (file_exists($path . '/' . $database_folder . '/reportsglobal/' . $newcount . '.php')) {
|
||||
echo 'Global Report Created!';
|
||||
$output_html .= 'Global Report Created!';
|
||||
} else {
|
||||
echo 'Failed generating Global Report...';
|
||||
$output_html .= 'Failed generating Global Report...';
|
||||
}
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -334,10 +339,11 @@ if (isset($_POST["report"]) && $_POST["report"] != "") {
|
||||
ReportCounter($database_folder, 'normal'); //refresh report counter
|
||||
//done
|
||||
if (file_exists($path . '/' . $database_folder . '/reports/' . $delrep_board . '/' . $newcount . '.php')) {
|
||||
echo 'Board Report Created!';
|
||||
$output_html .= 'Board Report Created!';
|
||||
} else {
|
||||
echo 'Failed generating Board Report...';
|
||||
$output_html .= 'Failed generating Board Report...';
|
||||
}
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
|
||||
@ -345,9 +351,10 @@ if (isset($_POST["report"]) && $_POST["report"] != "") {
|
||||
|
||||
|
||||
/*foreach($_POST as $key => $value) {
|
||||
echo "POST parameter '$key' has '$value'<hr>";
|
||||
$output_html .= "POST parameter '$key' has '$value'<hr>";
|
||||
}*/
|
||||
|
||||
echo 'uh... supposed to exit before this';
|
||||
$output_html .= 'uh... supposed to exit before this';
|
||||
echo $output_html;
|
||||
|
||||
?>
|
@ -30,7 +30,7 @@ if ($allow_files !== true && isset($_FILES['file'])) {
|
||||
|
||||
//function handleFile()
|
||||
if(!isset($_FILES['file']) || $_FILES['file']['error'] == UPLOAD_ERR_NO_FILE) {
|
||||
//echo "No file selected";
|
||||
//$output_html .= "No file selected";
|
||||
} else {
|
||||
|
||||
$filesize_ = $_FILES['file']['size'];
|
||||
@ -40,13 +40,15 @@ if ($allow_files !== true && isset($_FILES['file'])) {
|
||||
|
||||
//is it too big?
|
||||
if ($_FILES['file']['size'] > $max_filesize) {
|
||||
echo formatBytes($_FILES['file']['size']) . 'is too big. Maximum filesize is' . formatBytes($max_filesize) . '.';
|
||||
$output_html .= formatBytes($_FILES['file']['size']) . 'is too big. Maximum filesize is' . formatBytes($max_filesize) . '.';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
//is it supported?
|
||||
if (!isAllowedFile($fileext_, $config['allowed_ext']['img']) === true && !isAllowedFile($fileext_, $config['allowed_ext']['audio']) === true && !isAllowedFile($fileext_, $config['allowed_ext']['video']) === true && !isAllowedFile($fileext_, $config['allowed_ext']['downloads']) === true) {
|
||||
echo $fileext_ . ' is not supported.';
|
||||
$output_html .= $fileext_ . ' is not supported.';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -79,7 +81,6 @@ if ($allow_files !== true && isset($_FILES['file'])) {
|
||||
break;
|
||||
default:
|
||||
error('Format not supported!');
|
||||
exit();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -110,7 +111,6 @@ if ($allow_files !== true && isset($_FILES['file'])) {
|
||||
break;
|
||||
default:
|
||||
error('Format not supported!');
|
||||
exit();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -123,7 +123,8 @@ if ($allow_files !== true && isset($_FILES['file'])) {
|
||||
if (isAllowedFile($fileext_, $config['allowed_ext']['img']) === true) {
|
||||
//is valid image?
|
||||
if(!exif_imagetype($tmpname_)) {
|
||||
echo 'This is an invalid image MIME...';
|
||||
$output_html .= 'This is an invalid image MIME...';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
//is valid resolution?
|
||||
@ -131,7 +132,8 @@ if ($allow_files !== true && isset($_FILES['file'])) {
|
||||
$width = $imagedetails_[0];
|
||||
$height = $imagedetails_[1];
|
||||
if ($image_max_res < $width || $image_max_res < $height) {
|
||||
echo 'Maximum image resolution is ' . $image_max_res . 'x' . $image_max_res . '.';
|
||||
$output_html .= 'Maximum image resolution is ' . $image_max_res . 'x' . $image_max_res . '.';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
|
@ -8,43 +8,43 @@ function error($error, $success = false) {
|
||||
|
||||
require __dir__ . '/../' . $database_folder . '/boards.php';
|
||||
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
echo '<head>';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<head>';
|
||||
if ($success == false) {
|
||||
echo '<title>Error!</title>';
|
||||
$output_html .= '<title>Error!</title>';
|
||||
} else {
|
||||
echo '<title>Success!</title>';
|
||||
$output_html .= '<title>Success!</title>';
|
||||
}
|
||||
echo '<script>';
|
||||
$output_html .= '<script>';
|
||||
if (isset($_POST['board'])) {
|
||||
if ($config['boards'][$_POST['board']]['type'] == 'txt') {
|
||||
echo 'var board_type = "txt";';
|
||||
$output_html .= 'var board_type = "txt";';
|
||||
} else {
|
||||
echo 'var board_type = "img";';
|
||||
$output_html .= 'var board_type = "img";';
|
||||
}
|
||||
} else {
|
||||
echo 'var board_type = "img";';
|
||||
$output_html .= 'var board_type = "img";';
|
||||
}
|
||||
echo '</script>';
|
||||
$output_html .= '</script>';
|
||||
|
||||
echo '<link rel="icon" type="image/png" href="' . $prefix_folder . '/assets/img/favicon.png"/>';
|
||||
$output_html .= '<link rel="icon" type="image/png" href="' . $prefix_folder . '/assets/img/favicon.png"/>';
|
||||
foreach ($config['css'] as $css) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/' . $css . '.css">';
|
||||
$output_html .= '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/' . $css . '.css">';
|
||||
}
|
||||
foreach ($config['js'] as $js) {
|
||||
echo '<script type="text/javascript" src="' . $prefix_folder . '/assets/js/' . $js . '"></script>';
|
||||
$output_html .= '<script type="text/javascript" src="' . $prefix_folder . '/assets/js/' . $js . '"></script>';
|
||||
}
|
||||
|
||||
echo '</head>';
|
||||
echo '<body current_page="message">';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body current_page="message">';
|
||||
if ($success == true) {
|
||||
echo '<div class="message">' . $error . '</div>';
|
||||
$output_html .= '<div class="message">' . $error . '</div>';
|
||||
} else {
|
||||
echo '<div class="message">Gomen nasai... ' . $error . '</div>';
|
||||
$output_html .= '<div class="message">Gomen nasai... ' . $error . '</div>';
|
||||
}
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -143,43 +143,43 @@ function PostSuccess($redirect = false, $auto = true, $time= false) {
|
||||
require 'custom.php'; // only change this, it will replace the default initialized settings.
|
||||
require __dir__ . '/../' . $database_folder . '/boards.php';
|
||||
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
echo '<head>';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<head>';
|
||||
|
||||
echo '<script>';
|
||||
$output_html .= '<script>';
|
||||
if ($config['boards'][$_POST['board']]['type'] == 'txt') {
|
||||
echo 'var board_type = "txt";';
|
||||
$output_html .= 'var board_type = "txt";';
|
||||
} else {
|
||||
echo 'var board_type = "img";';
|
||||
$output_html .= 'var board_type = "img";';
|
||||
}
|
||||
echo '</script>';
|
||||
$output_html .= '</script>';
|
||||
|
||||
echo '<title>Success!</title>';
|
||||
echo '<link rel="icon" type="image/png" href="' . $prefix_folder . '/assets/img/favicon.png"/>';
|
||||
$output_html .= '<title>Success!</title>';
|
||||
$output_html .= '<link rel="icon" type="image/png" href="' . $prefix_folder . '/assets/img/favicon.png"/>';
|
||||
foreach ($config['css'] as $css) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/' . $css . '.css">';
|
||||
$output_html .= '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/' . $css . '.css">';
|
||||
}
|
||||
foreach ($config['js'] as $js) {
|
||||
echo '<script type="text/javascript" src="' . $prefix_folder . '/assets/js/' . $js . '"></script>';
|
||||
$output_html .= '<script type="text/javascript" src="' . $prefix_folder . '/assets/js/' . $js . '"></script>';
|
||||
}
|
||||
|
||||
if (($redirect !== false) && $auto == true) {
|
||||
echo '<meta http-equiv="refresh" content="2; URL=' . $redirect . '" />';
|
||||
$output_html .= '<meta http-equiv="refresh" content="2; URL=' . $redirect . '" />';
|
||||
}
|
||||
|
||||
echo '</head>';
|
||||
echo '<body current_page="message">';
|
||||
echo '<div class="message">Sugoi!! Post success!!</div>';
|
||||
echo '</body>';
|
||||
echo '<div class="footer" style="position:absolute;bottom:20;width:99%;">';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body current_page="message">';
|
||||
$output_html .= '<div class="message">Sugoi!! Post success!!</div>';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '<div class="footer" style="position:absolute;bottom:20;width:99%;">';
|
||||
if ($time != false) {
|
||||
$end_time = microtime(true);
|
||||
$generation_time = round($end_time - $time, 5);
|
||||
echo '<p class="small">Post generated in ' . $generation_time . ' seconds.</p>';
|
||||
$output_html .= '<p class="small">Post generated in ' . $generation_time . ' seconds.</p>';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '</html>';
|
||||
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
|
@ -6,12 +6,16 @@ if ($config['debug'] === true) {
|
||||
error_reporting(E_ALL);
|
||||
}
|
||||
|
||||
$output_html = '';
|
||||
$output_api = ''; //to allow .= everywhere
|
||||
|
||||
$title = '$title';
|
||||
$current_page = '$current_page';
|
||||
$current_board = '';
|
||||
$current_thread = '';
|
||||
$board_title = '$board_title';
|
||||
$board_description = '$board_title';
|
||||
$board_slogan = '$board_slogan';
|
||||
$board_description = '$board_description';
|
||||
$post_number_op = '';
|
||||
|
||||
$reply = '';
|
||||
@ -123,6 +127,7 @@ if (!isset($_COOKIE['post_password'])) { //if no password cookie
|
||||
$_POST['password'] = $genpw;
|
||||
}
|
||||
setcookie("post_password", $_POST['password'], 0, $cookie_location, $domain, isset($_SERVER["HTTPS"]), true);
|
||||
$_COOKIE['post_password'] = $_POST['password'];
|
||||
}
|
||||
|
||||
|
||||
|
@ -362,18 +362,18 @@ if ($logged_in == false) {
|
||||
|
||||
$title = 'Login - ' . $site_name;
|
||||
if (isset($_GET["theme"])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
echo '<div class="page-info"><h1>Login Page</h1><div class="small">Permission required.</div></div><br><br>';
|
||||
echo '<div class="main first"><h2>Login.</h2>';
|
||||
echo '<div id="post-form">
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="page-info"><h1>Login Page</h1><div class="small">Permission required.</div></div><br><br>';
|
||||
$output_html .= '<div class="main first"><h2>Login.</h2>';
|
||||
$output_html .= '<div id="post-form">
|
||||
<form name="login" action="' . $prefix_folder . '/mod.php" method="post">
|
||||
<table id="login" style="margin:auto;">
|
||||
<tr><th>Username</th><td><input type="text" name="username" size="25" maxlength="256" autocomplete="off" placeholder="Username"></td></tr>
|
||||
@ -383,17 +383,19 @@ if ($logged_in == false) {
|
||||
</table>
|
||||
</form>
|
||||
</div>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
if ($changed_password == true) {
|
||||
echo '<div class="message" style="margin-top:0;">Password has been changed.</div>';
|
||||
$output_html .= '<div class="message" style="margin-top:0;">Password has been changed.</div>';
|
||||
} else {
|
||||
echo '<div class="message"></div>';
|
||||
$output_html .= '<div class="message"></div>';
|
||||
}
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
|
272
main.php
272
main.php
@ -27,19 +27,20 @@ if ((!isset($_GET["board"])) || ($_GET["board"] == '') && $_GET["page"] == '') {
|
||||
}
|
||||
|
||||
if (isset($_GET["theme"])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
include $path . '/templates/frontpage.html';
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
include $path . '/templates/frontpage.php';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -49,35 +50,37 @@ if ((!isset($_GET["board"])) || ($_GET["board"] == '') && $_GET["page"] != '') {
|
||||
error('Invalid page.');
|
||||
}
|
||||
if (!file_exists($path . '/templates/pages/' . $_GET["page"] . '.php')) {
|
||||
http_response_code(404);
|
||||
error('Page does not exist.');
|
||||
}
|
||||
include $path . '/templates/pages/' . $_GET["page"] . '.php';
|
||||
|
||||
if (isset($_GET["theme"])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="page">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="page">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
|
||||
if ($config['display_banner'] === true) {
|
||||
include $path . '/assets/img/banner.php';
|
||||
}
|
||||
|
||||
echo '<div class="page-info">';
|
||||
echo '<h1>' . $h1 . '</h1>';
|
||||
echo '<span class="small">' . $description . '</span>';
|
||||
echo '</div>';
|
||||
$output_html .= '<div class="page-info">';
|
||||
$output_html .= '<h1>' . $h1 . '</h1>';
|
||||
$output_html .= '<span class="small">' . $description . '</span>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
echo $page_content; //taken from the file
|
||||
$output_html .= $page_content; //taken from the file
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
}
|
||||
@ -89,6 +92,7 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
|
||||
$current_board = htmlspecialchars($_GET["board"]);
|
||||
$board_description = $config['boards'][$current_board]['description'];
|
||||
$board_slogan = $config['boards'][$current_board]['slogan'];
|
||||
$board_title = $config['boards'][$current_board]['title'];
|
||||
|
||||
//if modonly
|
||||
@ -106,34 +110,36 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
$title = '/' . $current_board . '/ - ' . $config['boards'][$current_board]['title'] . ' - Catalog - ' . $site_name;
|
||||
|
||||
if (isset($_GET["theme"])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/catalog.css">';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
include $path . '/templates/page-info.html';
|
||||
$output_html .= '<head>';
|
||||
$output_html .= '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/catalog.css">';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
include $path . '/templates/page-info.php';
|
||||
if ($config['boards'][$current_board]['locked'] != 1) {
|
||||
include $path . '/templates/post-form.html';
|
||||
include $path . '/templates/post-form.php';
|
||||
} else {
|
||||
echo '<div class="blotter">This board is locked by the board owner.</div><hr>';
|
||||
$output_html .= '<div class="blotter">This board is locked by the board owner.</div><hr>';
|
||||
}
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
echo '[<a href="#bottom">Bottom</a>] ';
|
||||
echo '<hr>';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
$output_html .= '[<a href="#bottom">Bottom</a>] ';
|
||||
$output_html .= '<hr>';
|
||||
if (!file_exists($path . '/' . $database_folder . '/boards/' . $current_board)) {
|
||||
echo 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.html';
|
||||
$output_html .= 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
if (file_get_contents($path . '/' . $database_folder . '/boards/' . $current_board . '/counter.php') === "1") {
|
||||
echo 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.html';
|
||||
$output_html .= 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/threads.php';
|
||||
@ -158,34 +164,34 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
$threads = array_merge($stickied_threads, $not_sticky_threads);
|
||||
}
|
||||
|
||||
echo 'Displaying ' . count($threads) . ' threads in total.'; //maybe at some point add a limit to IB catalog, or just no thumbnails after 100 threads.
|
||||
echo '<hr>';
|
||||
$output_html .= 'Displaying ' . count($threads) . ' threads in total.'; //maybe at some point add a limit to IB catalog, or just no thumbnails after 100 threads.
|
||||
$output_html .= '<hr>';
|
||||
|
||||
|
||||
echo '<div class="catalog-threads">';
|
||||
$output_html .= '<div class="catalog-threads">';
|
||||
foreach (array_keys($threads) as $key => $value) {
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . $threads[$key]['id'] . '/OP.php';
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . $threads[$key]['id'] . '/info.php';
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . $threads[$key]['id'] . '/recents.php';
|
||||
$post_number_op = $threads[$key]['id'];
|
||||
|
||||
echo '<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '">';
|
||||
echo '<div data-thread="' . $post_number_op . '" class="container">';
|
||||
include $path . '/templates/catalog-thread.html';
|
||||
echo '</div>';
|
||||
echo '</a>';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '">';
|
||||
$output_html .= '<div data-thread="' . $post_number_op . '" class="container">';
|
||||
include $path . '/templates/thread-catalog.php';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</a>';
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
echo '<div class="catalog-footer">';
|
||||
echo '<hr>';
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
echo '[<a href="#top">Top</a>] ';
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</div>';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
$output_html .= '<div class="catalog-footer">';
|
||||
$output_html .= '<hr>';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
$output_html .= '[<a href="#top">Top</a>] ';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -200,39 +206,41 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
$title = '/' . $current_board . '/ - ' . $config['boards'][$current_board]['title'] . ' - ' . $site_name;
|
||||
|
||||
if (isset($_GET["theme"])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
include $path . '/templates/page-info.html';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
include $path . '/templates/page-info.php';
|
||||
if ($config['boards'][$current_board]['locked'] != 1) {
|
||||
include $path . '/templates/post-form.html';
|
||||
include $path . '/templates/post-form.php';
|
||||
} else {
|
||||
echo '<div class="blotter">This board is locked by the board owner.</div><hr>';
|
||||
$output_html .= '<div class="blotter">This board is locked by the board owner.</div><hr>';
|
||||
}
|
||||
|
||||
if ($catalog_enable == true) {
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
}
|
||||
|
||||
echo '[<a href="#bottom">Bottom</a>] ';
|
||||
echo '<hr>';
|
||||
$output_html .= '[<a href="#bottom">Bottom</a>] ';
|
||||
$output_html .= '<hr>';
|
||||
|
||||
//if zero threads aka new board
|
||||
if (!file_exists($path . '/' . $database_folder . '/boards/' . $current_board)) {
|
||||
echo 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.html';
|
||||
$output_html .= 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
if (file_get_contents($path . '/' . $database_folder . '/boards/' . $current_board . '/counter.php') === "1") {
|
||||
echo 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.html';
|
||||
$output_html .= 'This board has no threads yet.';
|
||||
include $path . '/templates/footer.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
|
||||
@ -309,7 +317,7 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
$threads = array_slice($threads, 0, $threads_page);
|
||||
}
|
||||
//$hidden_threads = $total_threads - $threads_page;
|
||||
//echo 'There are ' . $hidden_threads . ' undisplayed threads. I\'ll make a pagination for them all...' ;
|
||||
//$output_html .= 'There are ' . $hidden_threads . ' undisplayed threads. I\'ll make a pagination for them all...' ;
|
||||
|
||||
}
|
||||
|
||||
@ -321,29 +329,30 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . $threads[$key]['id'] . '/recents.php';
|
||||
$post_number_op = $threads[$key]['id'];
|
||||
|
||||
echo '<div data-thread="' . $post_number_op . '" class="container">';
|
||||
$output_html .= '<div data-thread="' . $post_number_op . '" class="container">';
|
||||
//SHOW THREADS
|
||||
include $path . '/templates/thread.html';
|
||||
include $path . '/templates/thread.php';
|
||||
//SHOW SHOW REPLIES
|
||||
|
||||
foreach (array_keys($recents) as $rkey => $value) {
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . $post_number_op . '/' . $recents[$value] . '.php';
|
||||
$post_number_reply = $recents[$value];
|
||||
include $path . '/templates/reply.html';
|
||||
include $path . '/templates/reply.php';
|
||||
}
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
if ($key != array_key_last($threads)) {
|
||||
echo '<hr data-thread="' . $post_number_op . '">';
|
||||
$output_html .= '<hr data-thread="' . $post_number_op . '">';
|
||||
}
|
||||
}
|
||||
echo '<hr>';
|
||||
$output_html .= '<hr>';
|
||||
if ($catalog_enable == true) {
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
}
|
||||
echo '[<a href="#top">Top</a>] ';
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
$output_html .= '[<a href="#top">Top</a>] ';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
|
||||
@ -352,9 +361,9 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
// IF THREAD
|
||||
if (htmlspecialchars($_GET["thread"]) != '') {
|
||||
if (isset($_GET["theme"])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET["theme"]) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
if (!is_numeric($_GET["thread"])) {
|
||||
error('Thread number must be a number.');
|
||||
@ -362,19 +371,20 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
//IF DOESNT EXIST
|
||||
if (!file_exists($path . '/' . $database_folder . '/boards/' . $current_board . '/' . htmlspecialchars($_GET["thread"]))) {
|
||||
$title = "Oh no!! A 404...";
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
include $path . '/templates/page-info.html';
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
echo '<hr>';
|
||||
echo '<div class="message">This thread doesn\'t exist.. Did the glowies get it — or worse, a janny??<br><img style="height: 500px;width: 500px;margin-top: 5px;" src="'. $prefix_folder . '/assets/img/404.png" width="" height=""></div><style>.message { margin-top: 0!important }</style>';
|
||||
echo '<div class="message">[<a href="' . $prefix_folder . $main_file . '?board=' . $current_board . '">Return</a>]</div>';
|
||||
echo '<hr>';
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
include $path . '/templates/footer.html';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
include $path . '/templates/page-info.php';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
$output_html .= '<hr>';
|
||||
$output_html .= '<div class="message">This thread doesn\'t exist.. Did the glowies get it — or worse, a janny??<br><img style="height: 500px;width: 500px;margin-top: 5px;" src="'. $prefix_folder . '/assets/img/404.png" width="" height=""></div><style>.message { margin-top: 0!important }</style>';
|
||||
$output_html .= '<div class="message">[<a href="' . $prefix_folder . $main_file . '?board=' . $current_board . '">Return</a>]</div>';
|
||||
$output_html .= '<hr>';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
include $path . '/templates/footer.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
} else {
|
||||
@ -389,27 +399,27 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
$title = '/' . $current_board . '/' . ' - ' . $op_subject . ' - ' . $config['boards'][$current_board]['title'] . ' - ' . $site_name;
|
||||
}
|
||||
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
include $path . '/templates/page-info.html';
|
||||
include $path . '/templates/post-form.html';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="' . $current_page . '">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
include $path . '/templates/page-info.php';
|
||||
include $path . '/templates/post-form.php';
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . $post_number_op . "/info.php";
|
||||
$thread_stats = '<span class="thread-stats">Replies: ' . $info_replies . ' Posters: ' . $info_uniqueids . '</span>';
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
if ($catalog_enable == true) {
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
}
|
||||
echo '[<a href="#bottom">Bottom</a>] ';
|
||||
echo $thread_stats;
|
||||
echo '<hr>';
|
||||
$output_html .= '[<a href="#bottom">Bottom</a>] ';
|
||||
$output_html .= $thread_stats;
|
||||
$output_html .= '<hr>';
|
||||
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . htmlspecialchars($_GET["thread"]) . '/OP.php';
|
||||
$post_number_op = htmlspecialchars($_GET["thread"]);
|
||||
echo '<div data-thread="' . $post_number_op . '" class="container">'; //start thread
|
||||
include $path . '/templates/thread.html';
|
||||
$output_html .= '<div data-thread="' . $post_number_op . '" class="container">'; //start thread
|
||||
include $path . '/templates/thread.php';
|
||||
$current_thread = $post_number_op;
|
||||
|
||||
|
||||
@ -429,20 +439,22 @@ if (in_Array(htmlspecialchars($_GET["board"]), $config['boardlist'])) {
|
||||
foreach (array_keys($replies) as $key => $value) {
|
||||
include $path . '/' . $database_folder . '/boards/' . $current_board . '/' . $post_number_op . '/' . $replies[$value] . '.php';
|
||||
$post_number_reply = $replies[$value];
|
||||
include $path . '/templates/reply.html';
|
||||
include $path . '/templates/reply.php';
|
||||
}
|
||||
echo '</div>'; //end thread
|
||||
$output_html .= '</div>'; //end thread
|
||||
|
||||
echo '<hr>';
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
$output_html .= '<hr>';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '">Return</a>] ';
|
||||
if ($catalog_enable == true) {
|
||||
echo '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
$output_html .= '[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&page=catalog">Catalog</a>] ';
|
||||
}
|
||||
echo '[<a href="#top">Top</a>] ';
|
||||
echo $thread_stats;
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
$output_html .= '[<a href="#top">Top</a>] ';
|
||||
$output_html .= $thread_stats;
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
|
23
mod.php
23
mod.php
@ -121,19 +121,20 @@ if ($_GET["page"] == 'bans') {
|
||||
//If literally none of the above activates.
|
||||
$title = 'Error! - ' . $site_name;
|
||||
if (isset($_GET['theme'])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
//include $path . '/templates/boardlist.html';
|
||||
echo '<div class="message">Gomen nasai... Woah — Unknown Error!<br>Please leave a detailed bug report... Page may not exist, if this was unintended please let me know.</div>';
|
||||
//include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
//include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="message">Gomen nasai... Woah — Unknown Error!<br>Please leave a detailed bug report... Page may not exist, if this was unintended please let me know.</div>';
|
||||
//include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
?>
|
11
post.php
11
post.php
@ -31,7 +31,8 @@ if (file_exists($path . '/' . $database_folder . '/bans/' . $check_ban)) {
|
||||
if ($ban['is_active'] == "1") {
|
||||
if ($ban['duration'] == 'permanent') {
|
||||
//SHOW BAN MESSAGE
|
||||
include $path . '/templates/banned.html';
|
||||
include $path . '/templates/banned.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
if (($ban['time'] + $ban['duration']) < time()) {
|
||||
@ -40,11 +41,12 @@ if (file_exists($path . '/' . $database_folder . '/bans/' . $check_ban)) {
|
||||
$edit_ban = preg_replace('/ban\[\'is_active\'\] = "1";/i' , 'ban[\'is_active\'] = "0";' , $edit_ban);
|
||||
//save as expired
|
||||
file_put_contents($bans, $edit_ban);
|
||||
$ban['is_active'] = "0"; //remind banned.html that its no longer active
|
||||
$ban['is_active'] = "0"; //remind banned.php that its no longer active
|
||||
} else {
|
||||
//this ban hasnt expired...
|
||||
//SHOW BAN MESSAGE
|
||||
include $path . '/templates/banned.html';
|
||||
include $path . '/templates/banned.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
@ -55,7 +57,8 @@ if (file_exists($path . '/' . $database_folder . '/bans/' . $check_ban)) {
|
||||
$edit_ban = preg_replace('/ban\[\'is_read\'\] = "0";/i' , 'ban[\'is_read\'] = "1";' , $edit_ban);
|
||||
file_put_contents($bans, $edit_ban);
|
||||
//SHOW BAN MESSAGE
|
||||
include $path . '/templates/banned.html';
|
||||
include $path . '/templates/banned.php';
|
||||
echo $output_html;
|
||||
exit();
|
||||
}
|
||||
//cool lets continue
|
||||
|
@ -3,8 +3,14 @@
|
||||
// INSTALL LOCATION
|
||||
$path = dirname(__FILE__);
|
||||
|
||||
// CONFIGURATIONS
|
||||
//is API call?
|
||||
if ($_GET['api']) {
|
||||
$api = true;
|
||||
} else {
|
||||
$api = false;
|
||||
}
|
||||
|
||||
// CONFIGURATIONS
|
||||
require $path . '/includes/default.php'; //sets defaults
|
||||
|
||||
// DATABASE
|
||||
|
@ -1,69 +0,0 @@
|
||||
<?php
|
||||
if ($ban['duration'] == 'warning') {
|
||||
$title = 'Uh oh! Warning...';
|
||||
} else {
|
||||
$title = 'Uh oh! Banned...';
|
||||
}
|
||||
|
||||
$current_board = phpClean($_POST["board"]);
|
||||
|
||||
include $path . '/templates/header.html';
|
||||
?>
|
||||
<div class="main first banned">
|
||||
<h2>
|
||||
<?php if ($ban['duration'] == 'warning') {
|
||||
echo 'Warning!';
|
||||
} else {
|
||||
echo 'Banned!';
|
||||
}
|
||||
?>
|
||||
</h2>
|
||||
<?php
|
||||
echo '<img class="banned" src="' . $prefix_folder . '/assets/img/banned.png' . '">';
|
||||
|
||||
echo '<p>How did you manage this...</p>';
|
||||
|
||||
echo '<div class="post reply banned">';
|
||||
if ($ban['post-body'] != false ) {
|
||||
echo '<div class="post-info">';
|
||||
if ($ban['post-subject'] != '') {
|
||||
echo '<span class="subject">'.$ban['post-subject'].' </span>';
|
||||
}
|
||||
if ($ban['post-email'] != '') {
|
||||
echo '<span class="name"><a href="mailto:'.$ban['post-email'].'">'.$ban['post-name'].'</a> </span>';
|
||||
} else {
|
||||
echo '<span class="name">'.$ban['post-name'].' </span>';
|
||||
}
|
||||
echo '<span class="post-time" data-tooltip="'.timeConvert($ban['post-time'], $time_method_hover).'" data-timestamp="'.$ban['post-time'].'">'.timeConvert($ban['post-time'], $time_method).' </span>';
|
||||
echo '<span class="post-number">No.'.$ban['reply'].'</span>';
|
||||
echo '</div><blockquote class="post-content">'.$ban['post-body'].'</blockquote>';
|
||||
} else {
|
||||
echo 'Manual ban.';
|
||||
}
|
||||
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '<p style="word-break:break-word;">';
|
||||
|
||||
if ($ban['duration'] != 'warning') {
|
||||
if ($ban['duration'] == 'permanent') {
|
||||
echo 'You were permanently banned on ' . timeConvert($ban['time'], $method = "compactsince") . '. This ban will not expire.';
|
||||
} elseif ($ban['is_active'] == "1") {
|
||||
echo 'You were banned on ' . timeConvert($ban['time'], $method = "compactsince") . ' and your ban expires on ' . timeConvert($ban['time'] + $ban['duration'], $method = "compact") . ' (in ' . timeuntil($ban['time'] + $ban['duration']) . ').';
|
||||
} else {
|
||||
echo 'You were banned on ' . timeConvert($ban['time'], $method = "compactsince") . ' and your ban <b>expired</b> ' . timeago($ban['time']) . '. You may now continue posting.';
|
||||
}
|
||||
} else {
|
||||
echo 'You received a warning on ' . timeConvert($ban['time'], $method = "compactsince") . '. You may now continue posting.';
|
||||
}
|
||||
echo '</p>';
|
||||
echo '<p><b>Reason:</b> ' . $ban['reason'] . '</p>';
|
||||
|
||||
echo '<p><b>IP:</b> ' . $ban['original_ip'] . '</p>';
|
||||
|
||||
?>
|
||||
<br>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="message" style="margin-top:0;">[<a href="<?php echo $prefix_folder . '/' . $main_file ?>">Return</a>]</div>
|
68
templates/banned.php
Normal file
68
templates/banned.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if ($ban['duration'] == 'warning') {
|
||||
$title = 'Uh oh! Warning...';
|
||||
} else {
|
||||
$title = 'Uh oh! Banned...';
|
||||
}
|
||||
|
||||
$current_board = phpClean($_POST["board"]);
|
||||
|
||||
include $path . '/templates/header.php';
|
||||
|
||||
$output_html .= '<div class="main first banned">
|
||||
<h2>';
|
||||
if ($ban['duration'] == 'warning') {
|
||||
$output_html .= 'Warning!';
|
||||
} else {
|
||||
$output_html .= 'Banned!';
|
||||
}
|
||||
$output_html .= '</h2>';
|
||||
|
||||
$output_html .= '<img class="banned" src="' . $prefix_folder . '/assets/img/banned.png' . '">';
|
||||
|
||||
$output_html .= '<p>How did you manage this...</p>';
|
||||
|
||||
$output_html .= '<div class="post reply banned">';
|
||||
if ($ban['post-body'] != false ) {
|
||||
$output_html .= '<div class="post-info">';
|
||||
if ($ban['post-subject'] != '') {
|
||||
$output_html .= '<span class="subject">'.$ban['post-subject'].' </span>';
|
||||
}
|
||||
if ($ban['post-email'] != '') {
|
||||
$output_html .= '<span class="name"><a href="mailto:'.$ban['post-email'].'">'.$ban['post-name'].'</a> </span>';
|
||||
} else {
|
||||
$output_html .= '<span class="name">'.$ban['post-name'].' </span>';
|
||||
}
|
||||
$output_html .= '<span class="post-time" data-tooltip="'.timeConvert($ban['post-time'], $time_method_hover).'" data-timestamp="'.$ban['post-time'].'">'.timeConvert($ban['post-time'], $time_method).' </span>';
|
||||
$output_html .= '<span class="post-number">No.'.$ban['reply'].'</span>';
|
||||
$output_html .= '</div><blockquote class="post-content">'.$ban['post-body'].'</blockquote>';
|
||||
} else {
|
||||
$output_html .= 'Manual ban.';
|
||||
}
|
||||
|
||||
|
||||
$output_html .= '</div>';
|
||||
|
||||
$output_html .= '<p style="word-break:break-word;">';
|
||||
|
||||
if ($ban['duration'] != 'warning') {
|
||||
if ($ban['duration'] == 'permanent') {
|
||||
$output_html .= 'You were permanently banned on ' . timeConvert($ban['time'], $method = "compactsince") . '. This ban will not expire.';
|
||||
} elseif ($ban['is_active'] == "1") {
|
||||
$output_html .= 'You were banned on ' . timeConvert($ban['time'], $method = "compactsince") . ' and your ban expires on ' . timeConvert($ban['time'] + $ban['duration'], $method = "compact") . ' (in ' . timeuntil($ban['time'] + $ban['duration']) . ').';
|
||||
} else {
|
||||
$output_html .= 'You were banned on ' . timeConvert($ban['time'], $method = "compactsince") . ' and your ban <b>expired</b> ' . timeago($ban['time']) . '. You may now continue posting.';
|
||||
}
|
||||
} else {
|
||||
$output_html .= 'You received a warning on ' . timeConvert($ban['time'], $method = "compactsince") . '. You may now continue posting.';
|
||||
}
|
||||
$output_html .= '</p>';
|
||||
$output_html .= '<p><b>Reason:</b> ' . $ban['reason'] . '</p>';
|
||||
|
||||
$output_html .= '<p><b>IP:</b> ' . $ban['original_ip'] . '</p>';
|
||||
|
||||
$output_html .= '
|
||||
<br>
|
||||
</div>
|
||||
<br><br>
|
||||
<div class="message" style="margin-top:0;">[<a href="' . $prefix_folder . '/' . $main_file . '">Return</a>]</div>';
|
@ -1,29 +0,0 @@
|
||||
<a name="top"></a>
|
||||
<div id="boardlist">
|
||||
[<?php
|
||||
echo '<a href="' . $prefix_folder . '/' . $main_file . '">';
|
||||
echo 'Home</a>';
|
||||
?>
|
||||
]
|
||||
|
||||
[<?php
|
||||
foreach ($config['boards'] as $boards) {
|
||||
if (($boards['hidden'] === 0) || ($config['mod']['mod_only'] <= $mod_level)) {
|
||||
if ($boards['url'] != array_key_first($config['boards'])) {
|
||||
echo ' / ';
|
||||
}
|
||||
if ($boardlist == "title") {
|
||||
echo '<a href="' . $prefix_folder . '/' . $main_file . '?board=';
|
||||
echo $boards['url'];
|
||||
echo '">' . $boards["title"] . '</a>';
|
||||
} else {
|
||||
echo '<a href="' . $prefix_folder . '/' . $main_file . '?board=';
|
||||
echo $boards['url'];
|
||||
echo '">' . $boards["url"] . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
]
|
||||
</div>
|
23
templates/boardlist.php
Normal file
23
templates/boardlist.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
$output_html .= '<a name="top"></a>
|
||||
<div id="boardlist">[<a href="' . $prefix_folder . '/' . $main_file . '">Home</a>] [ ';
|
||||
|
||||
foreach ($config['boards'] as $boards) {
|
||||
if (($boards['hidden'] === 0) || ($config['mod']['mod_only'] <= $mod_level)) {
|
||||
if ($boards['url'] != array_key_first($config['boards'])) {
|
||||
$output_html .= ' / ';
|
||||
}
|
||||
if ($boardlist == "title") {
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $main_file . '?board=';
|
||||
$output_html .= $boards['url'];
|
||||
$output_html .= '">' . $boards["title"] . '</a>';
|
||||
} else {
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $main_file . '?board=';
|
||||
$output_html .= $boards['url'];
|
||||
$output_html .= '">' . $boards["url"] . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$output_html .= ' ]</div>';
|
@ -1,93 +0,0 @@
|
||||
<div class="thread <?php echo $post_number_op ?>">
|
||||
|
||||
<span class="icons">
|
||||
<?php
|
||||
if ($info_sticky == 1) {
|
||||
echo '<span title="Sticky" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_sticky . '"/></span>';
|
||||
}
|
||||
if ($info_locked == 1) {
|
||||
echo '<span title="Locked" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_locked . '"/></span>';
|
||||
}
|
||||
if ($info_autosage == 1) {
|
||||
echo '<span title="Autosage" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_autosage . '"/></span>';
|
||||
}
|
||||
?>
|
||||
</span>
|
||||
|
||||
<div class="post op <?php echo $post_number_op ?>" id="<?php echo $post_number_op; ?>">
|
||||
<?php
|
||||
if ($op_file[0][0] == "deleted") {
|
||||
echo '<div class="post-file"><img class="file-deleted" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_deleted . '"/></div>';
|
||||
}
|
||||
elseif ($op_file[0][0] != '') {
|
||||
|
||||
echo '<div class="post-file">';
|
||||
if ($op_file[0][0] == 'image') {
|
||||
echo '<div class="post-image">';
|
||||
|
||||
$thmb_width = preg_replace('/x[^x]*$/', '', $op_file[0][7]);
|
||||
$thmb_height = preg_replace('/^[^x]*x/', '', $op_file[0][7]);
|
||||
$full_width = preg_replace('/x[^x]*$/', '', $op_file[0][3]);
|
||||
$full_height = preg_replace('/^[^x]*x/', '', $op_file[0][3]);
|
||||
|
||||
if ($op_file[0][5] != "1") {
|
||||
echo '<img id="'.$post_number_op.'" class="thumb" width="'.$thmb_width.'" height="'.$thmb_height.'" src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][6] . '"/>';
|
||||
} else {
|
||||
echo '<img id="'.$post_number_op.'" class="thumb" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_spoiler . '"/>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
if (preg_match('/audio/', $op_file[0][0])) {
|
||||
echo '<div class="post-image">';
|
||||
echo '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_audio . '"/>';
|
||||
echo '</div>';
|
||||
}
|
||||
if (preg_match('/video/', $op_file[0][0])) {
|
||||
echo '<div class="post-image">';
|
||||
echo '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_video . '"/>';
|
||||
echo '</div>';
|
||||
}
|
||||
if ($op_file[0][0] == 'download') {
|
||||
echo '<div class="post-image">';
|
||||
echo '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_download . '"/>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
//reset files
|
||||
$op_file = false;
|
||||
|
||||
?>
|
||||
<div class="post-info" data-tooltip="<?php echo timeConvert($op_time, $time_method_hover); ?>"><?php if ($op_subject != '') { echo '<span class="subject">' . $op_subject . '</span><br>'; }?><?php if (($op_email != '') && ($show_email != false)) { echo '<a href="mailto:' . $op_email . '">';}?><span class="<?php if(($op_email != '') && ($show_email != false)) { echo 'link '; } ?>name"><?php echo $op_name; ?></span><?php if ($op_email != '') { echo '</a>'; }?></div>
|
||||
|
||||
<div class="stats">
|
||||
<?php
|
||||
echo 'Replies: ' . $info_replies . ' Posters: ' . $info_uniqueids;
|
||||
?>
|
||||
</div>
|
||||
|
||||
<blockquote class="post-content">
|
||||
<?php echo $op_body; ?>
|
||||
<?php
|
||||
if (($current_page == 'index') && ($replies_omitted > 1)) {
|
||||
echo '<br><br><div class="omitted"> ' . $replies_omitted . ' Replies omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
} elseif (($current_page == 'index') && ($replies_omitted > 0)) {
|
||||
echo '<br><br><div class="omitted"> ' . $replies_omitted . ' Reply omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
//reset stuff
|
||||
$info_locked = 0;
|
||||
$info_sticky = 0;
|
||||
$info_autosage = 0;
|
||||
?>
|
@ -1,92 +0,0 @@
|
||||
<hr class="footer <?php if (!isset($current_board) || $current_board == '') { echo 'static'; } ?>">
|
||||
|
||||
<?php
|
||||
if (!isset($current_board) || $current_board == '') {
|
||||
echo '<div class="static footer">';
|
||||
echo '<ul>';
|
||||
foreach ($config['footer'] as $link) {
|
||||
echo '<li><a href="' . $link[1] . '">' . $link[0] . '</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="abovefooter">
|
||||
<?php
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if (isset($current_page) && $current_page == 'index' && $pages > 1) {
|
||||
echo '<div class="float-left pager">';
|
||||
echo '<table>';
|
||||
echo '<tr>';
|
||||
echo '<td>' . $prevlink . '</td>';
|
||||
echo '<td>' . $all_pages . '</td>';
|
||||
echo '<td>' . $nextlink . '</td>';
|
||||
echo '</tr>';
|
||||
echo '</table>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="float-right">
|
||||
<select id="themes">
|
||||
<?php
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
foreach($config['css_text'] as $theme) {
|
||||
echo '<option value="' . $theme . '">' . $theme . '</option>';
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
echo '<option value="' . $theme . '">' . $theme . '</option>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
echo '<option value="' . $theme . '">' . $theme . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</select>
|
||||
<noscript>
|
||||
<style>select#themes { display: none; }</style>
|
||||
<details><summary style="text-align:right">Themes</summary>
|
||||
<?php
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
foreach($config['css_text'] as $theme) {
|
||||
echo ' [<a href="' . $prefix_folder . $main_file . '/?board=' . $current_board . '&thread=' . $current_thread . '&theme=' . rawurlencode($theme) . '">' . $theme . '</a>]';
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
echo ' [<a href="' . $prefix_folder . $main_file . '/?board=' . $current_board . '&thread=' . $current_thread . '&theme=' . rawurlencode($theme) . '">' . $theme . '</a>]';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
echo ' [<a href="' . $prefix_folder . $main_file . '/?board=' . $current_board . '&thread=' . $current_thread . '&theme=' . rawurlencode($theme) . '">' . $theme . '</a>]';
|
||||
}
|
||||
}
|
||||
?> </details>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>ImoutoIB</p>
|
||||
<?php if ($display_version == true) { echo '<p>' . $version . '</p>'; } ?>
|
||||
<?php
|
||||
if ($config['generated_in'] === true) {
|
||||
$end_time = microtime(true);
|
||||
$generation_time = round($end_time - $start_time, 5);
|
||||
echo '<p class="small">Page generated in ' . $generation_time . ' seconds.</p>';
|
||||
}
|
||||
?>
|
||||
<br>
|
||||
<a name="bottom"></a>
|
||||
</div>
|
92
templates/footer.php
Normal file
92
templates/footer.php
Normal file
@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
$output_html .= '<hr class="footer';
|
||||
if (!isset($current_board) || $current_board == '') {
|
||||
$output_html .= ' static';
|
||||
}
|
||||
$output_html .= '">';
|
||||
|
||||
if (!isset($current_board) || $current_board == '') {
|
||||
$output_html .= '<div class="static footer">';
|
||||
$output_html .= '<ul>';
|
||||
foreach ($config['footer'] as $link) {
|
||||
$output_html .= '<li><a href="' . $link[1] . '">' . $link[0] . '</a></li>';
|
||||
}
|
||||
$output_html .= '</ul>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
|
||||
$output_html .= '<div class="abovefooter">';
|
||||
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if (isset($current_page) && $current_page == 'index' && $pages > 1) {
|
||||
$output_html .= '<div class="float-left pager">';
|
||||
$output_html .= '<table>';
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<td>' . $prevlink . '</td>';
|
||||
$output_html .= '<td>' . $all_pages . '</td>';
|
||||
$output_html .= '<td>' . $nextlink . '</td>';
|
||||
$output_html .= '</tr>';
|
||||
$output_html .= '</table>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$output_html .= '<div class="float-right"><select id="themes">';
|
||||
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
foreach($config['css_text'] as $theme) {
|
||||
$output_html .= '<option value="' . $theme . '">' . $theme . '</option>';
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
$output_html .= '<option value="' . $theme . '">' . $theme . '</option>';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
$output_html .= '<option value="' . $theme . '">' . $theme . '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
$output_html .= '
|
||||
</select>
|
||||
<noscript>
|
||||
<style>select#themes { display: none; }</style>
|
||||
<details><summary style="text-align:right">Themes</summary>';
|
||||
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
foreach($config['css_text'] as $theme) {
|
||||
$output_html .= ' [<a href="' . $prefix_folder . $main_file . '/?board=' . $current_board . '&thread=' . $current_thread . '&theme=' . rawurlencode($theme) . '">' . $theme . '</a>]';
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
$output_html .= ' [<a href="' . $prefix_folder . $main_file . '/?board=' . $current_board . '&thread=' . $current_thread . '&theme=' . rawurlencode($theme) . '">' . $theme . '</a>]';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
foreach($config['css'] as $theme) {
|
||||
$output_html .= ' [<a href="' . $prefix_folder . $main_file . '/?board=' . $current_board . '&thread=' . $current_thread . '&theme=' . rawurlencode($theme) . '">' . $theme . '</a>]';
|
||||
}
|
||||
}
|
||||
$output_html .='</details>
|
||||
</noscript>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
|
||||
$output_html .= '<div class="footer">
|
||||
<p>ImoutoIB</p>';
|
||||
if ($display_version == true) { $output_html .= '<p>' . $version . '</p>'; }
|
||||
if ($config['generated_in'] === true) {
|
||||
$end_time = microtime(true);
|
||||
$generation_time = round($end_time - $start_time, 5);
|
||||
$output_html .= '<p class="small">Page generated in ' . $generation_time . ' seconds.</p>';
|
||||
}
|
||||
$output_html .= '
|
||||
<br>
|
||||
<a name="bottom"></a>
|
||||
</div>';
|
||||
|
@ -1,55 +0,0 @@
|
||||
<?php if ($config['display_banner'] === true) {
|
||||
include $path . '/assets/img/banner.php';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="page-info">
|
||||
<h1><?php echo $site_name; ?></h1>
|
||||
<span class="small"><?php echo $site_slogan; ?></span>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="main first">
|
||||
<h2>Live Demo</h2>
|
||||
<p> This software is probably riddled with bugs and exploits.<br>Please send me questions, feature requests, and bug reports on <a href="https://github.com/ithrts/ImoutoIB" target="_blank">Github</a>.<br><br>You should not use ImoutoIB in any serious capacity.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<br>
|
||||
<div class="main">
|
||||
<h2>Boards</h2>
|
||||
<?php
|
||||
echo '<table id="boards">';
|
||||
echo '<thead><th>Board</th><th>Description</th><th>Posts</th></thead>';
|
||||
echo '<tbody>';
|
||||
foreach ($config['boards'] as $boards) {
|
||||
if ($boards['hidden'] === 0) {
|
||||
echo '<tr><th><a href="' . $prefix_folder . '/' . $main_file . '?board=';
|
||||
echo $boards['url'];
|
||||
echo '">';
|
||||
echo '/' . $boards['url'] . '/' . ' - ' . $boards['title'];
|
||||
echo '</a></th><th>' . $boards['description'] . '</th>';
|
||||
$board_counter = file_get_contents($path . '/' . $database_folder . '/boards/' . $boards['url'] . '/counter.php') - 1;
|
||||
echo '<th>' . $board_counter . '</th>';
|
||||
}
|
||||
}
|
||||
echo '</tr></tbody>';
|
||||
echo '</table>';
|
||||
|
||||
?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<div class="main">
|
||||
<h2>Stats</h2>
|
||||
<div class="stats">
|
||||
<div><b>Total Posts:</b> <?php echo $total_posts; ?></div>
|
||||
<div><b>Unique Posters:</b>
|
||||
<?php
|
||||
@include $path . '/' . $database_folder . '/frontpage.php';
|
||||
echo $frontpage_uniqueids;
|
||||
?></div>
|
||||
<div><b>Active Content:</b> <?php echo formatBytes($frontpage_active); ?></div>
|
||||
</div>
|
||||
</div>
|
55
templates/frontpage.php
Normal file
55
templates/frontpage.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
if ($config['display_banner'] === true) {
|
||||
include $path . '/assets/img/banner.php';
|
||||
}
|
||||
|
||||
|
||||
$output_html .= '<div class="page-info">
|
||||
<h1><?php echo $site_name; ?></h1>
|
||||
<span class="small"><?php echo $site_slogan; ?></span>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="main first">
|
||||
<h2>Live Demo</h2>
|
||||
<p> This software is probably riddled with bugs and exploits.<br>Please send me questions, feature requests, and bug reports on <a href="https://github.com/ithrts/ImoutoIB" target="_blank">Github</a>.<br><br>You should not use ImoutoIB in any serious capacity.</p>
|
||||
</div>';
|
||||
|
||||
|
||||
$output_html .= '<br>
|
||||
<div class="main">
|
||||
<h2>Boards</h2>';
|
||||
|
||||
$output_html .= '<table id="boards">';
|
||||
$output_html .= '<thead><th>Board</th><th>Description</th><th>Posts</th></thead>';
|
||||
$output_html .= '<tbody>';
|
||||
foreach ($config['boards'] as $boards) {
|
||||
if ($boards['hidden'] === 0) {
|
||||
$output_html .= '<tr><th><a href="' . $prefix_folder . '/' . $main_file . '?board=';
|
||||
$output_html .= $boards['url'];
|
||||
$output_html .= '">';
|
||||
$output_html .= '/' . $boards['url'] . '/' . ' - ' . $boards['title'];
|
||||
$output_html .= '</a></th><th>' . $boards['description'] . '</th>';
|
||||
$board_counter = file_get_contents($path . '/' . $database_folder . '/boards/' . $boards['url'] . '/counter.php') - 1;
|
||||
$output_html .= '<th>' . $board_counter . '</th>';
|
||||
}
|
||||
}
|
||||
$output_html .= '</tr></tbody>';
|
||||
$output_html .= '</table>';
|
||||
|
||||
$output_html .= '</div>
|
||||
|
||||
<br>
|
||||
<div class="main">
|
||||
<h2>Stats</h2>
|
||||
<div class="stats">
|
||||
<div><b>Total Posts:</b> <?php echo $total_posts; ?></div>
|
||||
<div><b>Unique Posters:</b> ';
|
||||
@include $path . '/' . $database_folder . '/frontpage.php';
|
||||
$output_html .= $frontpage_uniqueids;
|
||||
$output_html .= '</div>
|
||||
<div><b>Active Content:</b> ' . formatBytes($frontpage_active) . '</div>
|
||||
</div>
|
||||
</div>';
|
@ -1,58 +0,0 @@
|
||||
<title><?php echo $title; ?></title>
|
||||
|
||||
<!--SETTINGS-->
|
||||
<script>
|
||||
<?php if ($captcha_requires = true) { echo 'var captcha_required = true;'; } ?>
|
||||
var install_location = '<?php echo $prefix_folder; ?>';
|
||||
var default_theme = '<?php echo $default_theme ?>';
|
||||
<?php
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
echo "var board_type = 'txt';";
|
||||
} else {
|
||||
echo "var board_type = 'img';";
|
||||
}
|
||||
} else {
|
||||
echo "var board_type = 'img';";
|
||||
}
|
||||
?>
|
||||
</script>
|
||||
|
||||
<!--LOAD THEME IMMEDIATELY-->
|
||||
<script>
|
||||
<?php
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
echo 'if (localStorage.theme !== undefined) {';
|
||||
echo 'document.documentElement.setAttribute("data-stylesheet", localStorage.text_theme);';
|
||||
echo '};';
|
||||
} else {
|
||||
echo 'if (localStorage.theme !== undefined) {';
|
||||
echo 'document.documentElement.setAttribute("data-stylesheet", localStorage.theme);';
|
||||
echo '};';
|
||||
}
|
||||
} else {
|
||||
echo 'if (localStorage.theme !== undefined) {';
|
||||
echo 'document.documentElement.setAttribute("data-stylesheet", localStorage.theme);';
|
||||
echo '};';
|
||||
}
|
||||
?>
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
echo '<link rel="icon" type="image/png" href="' . $prefix_folder . '/assets/img/favicon.png"/>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
foreach ($config['css'] as $css) {
|
||||
echo '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/' . rawurlencode($css) . '.css">';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
foreach ($config['js'] as $js) {
|
||||
echo '<script type="text/javascript" src="' . $prefix_folder . '/assets/js/' . $js . '"></script>';
|
||||
}
|
||||
?>
|
||||
|
56
templates/header.php
Normal file
56
templates/header.php
Normal file
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
$output_html .= '<title>' . $title . '</title>';
|
||||
|
||||
$output_html .= '<!--SETTINGS--> <script>';
|
||||
|
||||
if ($captcha_requires = true) {
|
||||
$output_html .= 'var captcha_required = true;';
|
||||
}
|
||||
|
||||
$output_html .= 'var install_location = "' . $prefix_folder . '";';
|
||||
$output_html .= 'var default_theme = "' . $default_theme . '";';
|
||||
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
$output_html .= 'var board_type = "txt";';
|
||||
} else {
|
||||
$output_html .= 'var board_type = "img";';
|
||||
}
|
||||
} else {
|
||||
$output_html .= 'var board_type = "img";';
|
||||
}
|
||||
$output_html .= '</script>';
|
||||
|
||||
$output_html .= '<!--LOAD THEME IMMEDIATELY--> <script>';
|
||||
|
||||
if (isset($current_board) && $current_board != '') {
|
||||
if ($config["boards"][$current_board]["type"] == "txt") {
|
||||
$output_html .= 'if (localStorage.theme !== undefined) {';
|
||||
$output_html .= 'document.documentElement.setAttribute("data-stylesheet", localStorage.text_theme);';
|
||||
$output_html .= '};';
|
||||
} else {
|
||||
$output_html .= 'if (localStorage.theme !== undefined) {';
|
||||
$output_html .= 'document.documentElement.setAttribute("data-stylesheet", localStorage.theme);';
|
||||
$output_html .= '};';
|
||||
}
|
||||
} else {
|
||||
$output_html .= 'if (localStorage.theme !== undefined) {';
|
||||
$output_html .= 'document.documentElement.setAttribute("data-stylesheet", localStorage.theme);';
|
||||
$output_html .= '};';
|
||||
}
|
||||
|
||||
$output_html .= '
|
||||
</script>';
|
||||
|
||||
$output_html .= '<link rel="icon" type="image/png" href="' . $prefix_folder . '/assets/img/favicon.png"/>';
|
||||
|
||||
foreach ($config['css'] as $css) {
|
||||
$output_html .= '<link rel="stylesheet" type="text/css" href="' . $prefix_folder . '/assets/css/' . rawurlencode($css) . '.css">';
|
||||
}
|
||||
|
||||
foreach ($config['js'] as $js) {
|
||||
$output_html .= '<script type="text/javascript" src="' . $prefix_folder . '/assets/js/' . $js . '"></script>';
|
||||
}
|
||||
|
||||
|
@ -2,33 +2,33 @@
|
||||
|
||||
$title = 'Account - ' . $site_name;
|
||||
if (isset($_GET['theme'])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
echo '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
echo $logged_in_as;
|
||||
echo '</div>';
|
||||
echo $dashboard_notifications;
|
||||
echo '<br>';
|
||||
echo '<div class="box flex">';
|
||||
echo $mod_navigation;
|
||||
echo '<div class="container-right">';
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Account</h2>';
|
||||
echo '<div class="box-content">';
|
||||
echo '<p>';
|
||||
echo 'Username: ' . $username;
|
||||
echo '</p>';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
$output_html .= $logged_in_as;
|
||||
$output_html .= '</div>';
|
||||
$output_html .= $dashboard_notifications;
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box flex">';
|
||||
$output_html .= $mod_navigation;
|
||||
$output_html .= '<div class="container-right">';
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Account</h2>';
|
||||
$output_html .= '<div class="box-content">';
|
||||
$output_html .= '<p>';
|
||||
$output_html .= 'Username: ' . $username;
|
||||
$output_html .= '</p>';
|
||||
|
||||
//CHANGE PASSWORD
|
||||
echo '<details><summary>Edit Password</summary>';
|
||||
echo ' <form name="edit-password" action="' . $prefix_folder . '/mod.php" method="post">
|
||||
$output_html .= '<details><summary>Edit Password</summary>';
|
||||
$output_html .= ' <form name="edit-password" action="' . $prefix_folder . '/mod.php" method="post">
|
||||
<table id="post-form" style="width:initial;">
|
||||
<tr><th>Current Password:</th><td><input type="password" name="old-password" size="25" maxlength="256" autocomplete="off" placeholder="Password" required></td></tr>
|
||||
<tr><th>New Password:</th><td><input type="password" name="new-password" size="25" maxlength="256" autocomplete="off" placeholder="Password" required></td></tr>
|
||||
@ -36,17 +36,18 @@
|
||||
<tr><th style="visibility:hidden;"></th><td><input type="submit" name="post" value="Edit Password" style="float: right;"></td></tr>
|
||||
</table>
|
||||
</form>';
|
||||
echo '</details>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
$output_html .= '</details>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
?>
|
@ -10,30 +10,30 @@
|
||||
|
||||
$title = 'Manage Bans - ' . $site_name;
|
||||
if (isset($_GET['theme'])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
echo '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
echo $logged_in_as;
|
||||
echo '</div>';
|
||||
echo $dashboard_notifications;
|
||||
echo '<br>';
|
||||
echo '<div class="box flex">';
|
||||
echo $mod_navigation;
|
||||
echo '<div class="container-right">';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
$output_html .= $logged_in_as;
|
||||
$output_html .= '</div>';
|
||||
$output_html .= $dashboard_notifications;
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box flex">';
|
||||
$output_html .= $mod_navigation;
|
||||
$output_html .= '<div class="container-right">';
|
||||
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Ban IP</h2>';
|
||||
echo '<div class="box-content">';
|
||||
echo '<p>';
|
||||
echo '<details><summary>Ban IP</summary>';
|
||||
echo '<form name="create-ban" action="' . $prefix_folder . '/mod.php?page=bans" method="post">
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Ban IP</h2>';
|
||||
$output_html .= '<div class="box-content">';
|
||||
$output_html .= '<p>';
|
||||
$output_html .= '<details><summary>Ban IP</summary>';
|
||||
$output_html .= '<form name="create-ban" action="' . $prefix_folder . '/mod.php?page=bans" method="post">
|
||||
<table id="post-form" style="width:initial;">
|
||||
<tbody><tr><th>IP:</th><td><input type="text" name="create-ban-ip" size="25" maxlength="32" autocomplete="off" placeholder="IP (hash)" required></td></tr>
|
||||
<tr><th>Reason:</th><td><input type="text" name="create-ban-reason" size="25" maxlength="256" autocomplete="off" placeholder="Reason" required></td></tr>
|
||||
@ -54,20 +54,20 @@
|
||||
<tr><th style="visibility:hidden;"></th><td><input type="submit" name="create-ban" value="Create Ban" style="float: right;"></td></tr>
|
||||
</tbody></table>
|
||||
</form>';
|
||||
echo '</details>';
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
$output_html .= '</details>';
|
||||
$output_html .= '</p>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
echo '<br>';
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Manage Bans</h2>'; //at some point i will need to rewrite this+reports+users to have pages if it grows large!!!
|
||||
echo '<div class="box-content">';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Manage Bans</h2>'; //at some point i will need to rewrite this+reports+users to have pages if it grows large!!!
|
||||
$output_html .= '<div class="box-content">';
|
||||
|
||||
//foreach
|
||||
|
||||
echo '<table><thead> <td>ID</td> <td>IP</td> <td>Reason</td> <td>Expires</td> <td>Read</td> <td>Actions</td></thead>';
|
||||
echo '<tbody>';
|
||||
$output_html .= '<table><thead> <td>ID</td> <td>IP</td> <td>Reason</td> <td>Expires</td> <td>Read</td> <td>Actions</td></thead>';
|
||||
$output_html .= '<tbody>';
|
||||
|
||||
//TO DO: multiarray and sort by ID, alternatively use JS.
|
||||
// I should also first take the admins, sort them by id, then the mods by id, then the jannies by id, etc.
|
||||
@ -84,87 +84,88 @@
|
||||
include $banfile;
|
||||
|
||||
if ($ban['duration'] == 'warning') {
|
||||
echo '<tr style="text-decoration:line-through;">';
|
||||
$output_html .= '<tr style="text-decoration:line-through;">';
|
||||
} elseif (($ban['duration'] != 'permanent') && (($ban['time'] + $ban['duration']) < time())) { //if warning or expired
|
||||
echo '<tr style="text-decoration:line-through;">';
|
||||
$output_html .= '<tr style="text-decoration:line-through;">';
|
||||
} else {
|
||||
echo '<tr>';
|
||||
$output_html .= '<tr>';
|
||||
}
|
||||
|
||||
echo '<td>' . $ban['id'] . '</td>';
|
||||
echo '<td>' . $ban['original_ip'] . '</td>';
|
||||
echo '<td title="' . $ban['reason'] . '"style="white-space:pre;word-wrap:break-word;max-width:150px;overflow:hidden;text-overflow:ellipsis">' . $ban['reason'] . '</td>';
|
||||
$output_html .= '<td>' . $ban['id'] . '</td>';
|
||||
$output_html .= '<td>' . $ban['original_ip'] . '</td>';
|
||||
$output_html .= '<td title="' . $ban['reason'] . '"style="white-space:pre;word-wrap:break-word;max-width:150px;overflow:hidden;text-overflow:ellipsis">' . $ban['reason'] . '</td>';
|
||||
|
||||
if ($ban['duration'] == 'warning') {
|
||||
echo '<td>---------</td>';
|
||||
$output_html .= '<td>---------</td>';
|
||||
} elseif ($ban['duration'] == 'permanent') {
|
||||
echo '<td>Never</td>';
|
||||
$output_html .= '<td>Never</td>';
|
||||
} elseif (($ban['time'] + $ban['duration']) < time()) {
|
||||
echo '<td>'. timeago($ban['time'] + $ban['duration']) .'</td>';
|
||||
$output_html .= '<td>'. timeago($ban['time'] + $ban['duration']) .'</td>';
|
||||
} else {
|
||||
echo '<td>'. timeuntil($ban['time'] + $ban['duration']) .'</td>';
|
||||
$output_html .= '<td>'. timeuntil($ban['time'] + $ban['duration']) .'</td>';
|
||||
}
|
||||
|
||||
echo '<td>' . $ban['is_read'] . '</td>';
|
||||
echo '<td>';
|
||||
echo '<details><summary>More</summary>';
|
||||
$output_html .= '<td>' . $ban['is_read'] . '</td>';
|
||||
$output_html .= '<td>';
|
||||
$output_html .= '<details><summary>More</summary>';
|
||||
|
||||
if ($ban["post-body"] != false) { //manual ban or not?
|
||||
echo '<details><summary class="small">View</summary>'; //see post that caused ban
|
||||
echo '<div class="post reply banned"><div class="post-info">';
|
||||
$output_html .= '<details><summary class="small">View</summary>'; //see post that caused ban
|
||||
$output_html .= '<div class="post reply banned"><div class="post-info">';
|
||||
if ($ban['post-subject'] != '') {
|
||||
echo '<span class="subject">'.$ban['post-subject'].' </span>';
|
||||
$output_html .= '<span class="subject">'.$ban['post-subject'].' </span>';
|
||||
}
|
||||
if ($ban['post-email'] != '') {
|
||||
echo '<span class="name"><a href="mailto:'.$ban['post-email'].'">'.$ban['post-name'].'</a> </span>';
|
||||
$output_html .= '<span class="name"><a href="mailto:'.$ban['post-email'].'">'.$ban['post-name'].'</a> </span>';
|
||||
} else {
|
||||
echo '<span class="name">'.$ban['post-name'].' </span>';
|
||||
$output_html .= '<span class="name">'.$ban['post-name'].' </span>';
|
||||
}
|
||||
|
||||
echo '<span class="post-time" data-tooltip="'.timeConvert($ban['post-time'], $time_method_hover).'" data-timestamp="'.$ban['post-time'].'">'.timeConvert($ban['post-time'], $time_method).' </span>';
|
||||
echo '<span class="post-number">No.'.$ban['reply'].'</span>';
|
||||
echo '</div><blockquote class="post-content">'.$ban['post-body'].'</blockquote></div>';
|
||||
echo '</details>'; //"view file"
|
||||
$output_html .= '<span class="post-time" data-tooltip="'.timeConvert($ban['post-time'], $time_method_hover).'" data-timestamp="'.$ban['post-time'].'">'.timeConvert($ban['post-time'], $time_method).' </span>';
|
||||
$output_html .= '<span class="post-number">No.'.$ban['reply'].'</span>';
|
||||
$output_html .= '</div><blockquote class="post-content">'.$ban['post-body'].'</blockquote></div>';
|
||||
$output_html .= '</details>'; //"view file"
|
||||
} else {
|
||||
echo 'Manual ban.';
|
||||
$output_html .= 'Manual ban.';
|
||||
}
|
||||
|
||||
//delete
|
||||
echo '<details><summary class="small">Delete</summary><details><summary>Are you sure you want to remove this ban?</summary>';
|
||||
echo ' <form name="delete-ban" action="' . $prefix_folder . '/mod.php?page=bans" method="post">
|
||||
$output_html .= '<details><summary class="small">Delete</summary><details><summary>Are you sure you want to remove this ban?</summary>';
|
||||
$output_html .= ' <form name="delete-ban" action="' . $prefix_folder . '/mod.php?page=bans" method="post">
|
||||
<input type="hidden" name="delete-ban-ip" value="' . $ban['ip'] . '">
|
||||
<input type="hidden" name="delete-ban-id" value="' . $ban['id'] . '">
|
||||
<input type="submit" name="delete-ban" value="Delete"></td>
|
||||
</form>';
|
||||
echo '</details></details>';
|
||||
$output_html .= '</details></details>';
|
||||
|
||||
echo '</details></td>';
|
||||
echo '<tr>';
|
||||
$output_html .= '</details></td>';
|
||||
$output_html .= '<tr>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</tbody></table>';
|
||||
$output_html .= '</tbody></table>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
if ($ban_removed == true) {
|
||||
echo '<div class="message" style="margin-top:0;">Ban has been deleted.</div>';
|
||||
$output_html .= '<div class="message" style="margin-top:0;">Ban has been deleted.</div>';
|
||||
}
|
||||
if ($ban_created == true) {
|
||||
echo '<div class="message" style="margin-top:0;">Ban has been created.</div>';
|
||||
$output_html .= '<div class="message" style="margin-top:0;">Ban has been created.</div>';
|
||||
}
|
||||
if ($warning_created == true) {
|
||||
echo '<div class="message" style="margin-top:0;">Warning has been created.</div>';
|
||||
$output_html .= '<div class="message" style="margin-top:0;">Warning has been created.</div>';
|
||||
}
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
?>
|
@ -2,36 +2,37 @@
|
||||
|
||||
$title = 'Mod Dashboard - ' . $site_name;
|
||||
if (isset($_GET["theme"])) {
|
||||
echo '<html data-stylesheet="' . htmlspecialchars($_GET['theme']) . '">';
|
||||
$output_html .= '<html data-stylesheet="' . htmlspecialchars($_GET['theme']) . '">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="' . $current_theme . '">';
|
||||
$output_html .= '<html data-stylesheet="' . $current_theme . '">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
echo '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
echo $logged_in_as;
|
||||
echo '</div>';
|
||||
echo $dashboard_notifications;
|
||||
echo '<br>';
|
||||
echo '<div class="box flex">';
|
||||
echo $mod_navigation;
|
||||
echo '<div class="container-right">';
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Content</h2>';
|
||||
echo '<div class="box-content">';
|
||||
echo '<p>Welcome to the moderator dashboard.</p>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
echo '</div>';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
$output_html .= $logged_in_as;
|
||||
$output_html .= '</div>';
|
||||
$output_html .= $dashboard_notifications;
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box flex">';
|
||||
$output_html .= $mod_navigation;
|
||||
$output_html .= '<div class="container-right">';
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Content</h2>';
|
||||
$output_html .= '<div class="box-content">';
|
||||
$output_html .= '<p>Welcome to the moderator dashboard.</p>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
?>
|
@ -13,30 +13,30 @@
|
||||
|
||||
$title = 'Global Reports - ' . $site_name;
|
||||
if (isset($_GET['theme'])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
echo '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
echo $logged_in_as;
|
||||
echo '</div>';
|
||||
echo $dashboard_notifications;
|
||||
echo '<br>';
|
||||
echo '<div class="box flex">';
|
||||
echo $mod_navigation;
|
||||
echo '<div class="container-right">';
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Global Reports</h2>';
|
||||
echo '<div class="box-content">';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
$output_html .= $logged_in_as;
|
||||
$output_html .= '</div>';
|
||||
$output_html .= $dashboard_notifications;
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box flex">';
|
||||
$output_html .= $mod_navigation;
|
||||
$output_html .= '<div class="container-right">';
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Global Reports</h2>';
|
||||
$output_html .= '<div class="box-content">';
|
||||
|
||||
echo '<table style="width:100%">';
|
||||
echo '<thead> <td>Board</td> <td>Post</td> <td>Report IP</td> <td>Reason</td> <td>View</td> <td>Actions</td>';
|
||||
echo '<tbody>';
|
||||
$output_html .= '<table style="width:100%">';
|
||||
$output_html .= '<thead> <td>Board</td> <td>Post</td> <td>Report IP</td> <td>Reason</td> <td>View</td> <td>Actions</td>';
|
||||
$output_html .= '<tbody>';
|
||||
|
||||
//FIND REPORTS
|
||||
$reports = [];
|
||||
@ -51,40 +51,41 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>/' . $report_board . '/</td>';
|
||||
echo '<td>' . $report_reply . '@' . $report_thread . '</td>';
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<td>/' . $report_board . '/</td>';
|
||||
$output_html .= '<td>' . $report_reply . '@' . $report_thread . '</td>';
|
||||
if ($user_mod_level >= $config['mod']['ip']) {
|
||||
echo '<td>' . $report_ip . '</td>';
|
||||
$output_html .= '<td>' . $report_ip . '</td>';
|
||||
} else {
|
||||
echo '<td>No Perm</td>';
|
||||
$output_html .= '<td>No Perm</td>';
|
||||
}
|
||||
echo '<td title="' . $report_reason . '"style="white-space:pre;word-wrap:break-word;max-width:150px;overflow:hidden;text-overflow:ellipsis">' . $report_reason . '</td>';
|
||||
echo '<td><a href="' . $prefix_folder . '/' . $main_file . '?board='. $report_board . '&thread=' . $report_thread . '#' . $report_reply . '" target="_blank">View</a></td>';
|
||||
echo '<td><details><summary>More</summary>';
|
||||
$output_html .= '<td title="' . $report_reason . '"style="white-space:pre;word-wrap:break-word;max-width:150px;overflow:hidden;text-overflow:ellipsis">' . $report_reason . '</td>';
|
||||
$output_html .= '<td><a href="' . $prefix_folder . '/' . $main_file . '?board='. $report_board . '&thread=' . $report_thread . '#' . $report_reply . '" target="_blank">View</a></td>';
|
||||
$output_html .= '<td><details><summary>More</summary>';
|
||||
|
||||
echo ' <form name="dismiss-report-global" action="' . $prefix_folder . '/mod.php?page=global_reports" method="post">
|
||||
$output_html .= ' <form name="dismiss-report-global" action="' . $prefix_folder . '/mod.php?page=global_reports" method="post">
|
||||
<input type="hidden" name="board" value="' . $report_board . '">
|
||||
<input type="hidden" name="report" value="' . basename($report) . '">
|
||||
<input type="submit" name="dismiss_global" value="Dismiss"></td>
|
||||
</form>';
|
||||
|
||||
echo '</details><td>';
|
||||
echo '</tr>';
|
||||
$output_html .= '</details><td>';
|
||||
$output_html .= '</tr>';
|
||||
}
|
||||
}
|
||||
echo '</tbody>';
|
||||
echo '</table>';
|
||||
$output_html .= '</tbody>';
|
||||
$output_html .= '</table>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
?>
|
@ -13,30 +13,30 @@
|
||||
|
||||
$title = 'Reports - ' . $site_name;
|
||||
if (isset($_GET['theme'])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
echo '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
echo $logged_in_as;
|
||||
echo '</div>';
|
||||
echo $dashboard_notifications;
|
||||
echo '<br>';
|
||||
echo '<div class="box flex">';
|
||||
echo $mod_navigation;
|
||||
echo '<div class="container-right">';
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Reports</h2>';
|
||||
echo '<div class="box-content">';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
$output_html .= $logged_in_as;
|
||||
$output_html .= '</div>';
|
||||
$output_html .= $dashboard_notifications;
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box flex">';
|
||||
$output_html .= $mod_navigation;
|
||||
$output_html .= '<div class="container-right">';
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Reports</h2>';
|
||||
$output_html .= '<div class="box-content">';
|
||||
|
||||
echo '<table style="width:100%">';
|
||||
echo '<thead> <td>Board</td> <td>Post</td> <td>Report IP</td> <td>Reason</td> <td>View</td> <td>Actions</td>';
|
||||
echo '<tbody>';
|
||||
$output_html .= '<table style="width:100%">';
|
||||
$output_html .= '<thead> <td>Board</td> <td>Post</td> <td>Report IP</td> <td>Reason</td> <td>View</td> <td>Actions</td>';
|
||||
$output_html .= '<tbody>';
|
||||
|
||||
//FIND REPORTS
|
||||
$report_boards = glob($path . '/' . $database_folder . '/reports/*', GLOB_ONLYDIR); //find boards
|
||||
@ -54,41 +54,42 @@
|
||||
continue;
|
||||
}
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>/' . basename($board) . '/</td>';
|
||||
echo '<td>' . $report_reply . '@' . $report_thread . '</td>';
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<td>/' . basename($board) . '/</td>';
|
||||
$output_html .= '<td>' . $report_reply . '@' . $report_thread . '</td>';
|
||||
if ($user_mod_level >= $config['mod']['ip']) {
|
||||
echo '<td>' . $report_ip . '</td>';
|
||||
$output_html .= '<td>' . $report_ip . '</td>';
|
||||
} else {
|
||||
echo '<td>No Perm</td>';
|
||||
$output_html .= '<td>No Perm</td>';
|
||||
}
|
||||
echo '<td title="' . $report_reason . '"style="white-space:pre;word-wrap:break-word;max-width:150px;overflow:hidden;text-overflow:ellipsis">' . $report_reason . '</td>';
|
||||
echo '<td><a href="' . $prefix_folder . '/' . $main_file . '?board='. basename($board) . '&thread=' . $report_thread . '#' . $report_reply . '" target="_blank">View</a></td>';
|
||||
echo '<td><details><summary>More</summary>';
|
||||
$output_html .= '<td title="' . $report_reason . '"style="white-space:pre;word-wrap:break-word;max-width:150px;overflow:hidden;text-overflow:ellipsis">' . $report_reason . '</td>';
|
||||
$output_html .= '<td><a href="' . $prefix_folder . '/' . $main_file . '?board='. basename($board) . '&thread=' . $report_thread . '#' . $report_reply . '" target="_blank">View</a></td>';
|
||||
$output_html .= '<td><details><summary>More</summary>';
|
||||
|
||||
echo ' <form name="dismiss-report" action="' . $prefix_folder . '/mod.php?page=reports" method="post">
|
||||
$output_html .= ' <form name="dismiss-report" action="' . $prefix_folder . '/mod.php?page=reports" method="post">
|
||||
<input type="hidden" name="board" value="' . basename($board) . '">
|
||||
<input type="hidden" name="report" value="' . basename($report) . '">
|
||||
<input type="submit" name="dismiss" value="Dismiss"></td>
|
||||
</form>';
|
||||
|
||||
echo '</details><td>';
|
||||
echo '</tr>';
|
||||
$output_html .= '</details><td>';
|
||||
$output_html .= '</tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '</tbody>';
|
||||
echo '</table>';
|
||||
$output_html .= '</tbody>';
|
||||
$output_html .= '</table>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
?>
|
@ -4,31 +4,31 @@
|
||||
}
|
||||
$title = 'Manage Users - ' . $site_name;
|
||||
if (isset($_GET['theme'])) {
|
||||
echo '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
$output_html .= '<html data-stylesheet="'. htmlspecialchars($_GET['theme']) .'">';
|
||||
} else {
|
||||
echo '<html data-stylesheet="'. $current_theme .'">';
|
||||
$output_html .= '<html data-stylesheet="'. $current_theme .'">';
|
||||
}
|
||||
echo '<head>';
|
||||
include $path . '/templates/header.html';
|
||||
echo '</head>';
|
||||
echo '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.html';
|
||||
echo '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
echo $logged_in_as;
|
||||
echo '</div>';
|
||||
echo $dashboard_notifications;
|
||||
echo '<br>';
|
||||
echo '<div class="box flex">';
|
||||
echo $mod_navigation;
|
||||
echo '<div class="container-right">';
|
||||
$output_html .= '<head>';
|
||||
include $path . '/templates/header.php';
|
||||
$output_html .= '</head>';
|
||||
$output_html .= '<body class="frontpage">';
|
||||
include $path . '/templates/boardlist.php';
|
||||
$output_html .= '<div class="page-info"><h1>Dashbord</h1><div class="small">Try not to ruin everything.</div>';
|
||||
$output_html .= $logged_in_as;
|
||||
$output_html .= '</div>';
|
||||
$output_html .= $dashboard_notifications;
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box flex">';
|
||||
$output_html .= $mod_navigation;
|
||||
$output_html .= '<div class="container-right">';
|
||||
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Create User</h2>';
|
||||
echo '<div class="box-content">';
|
||||
echo '<p>';
|
||||
echo '<details><summary>Create User</summary>';
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Create User</h2>';
|
||||
$output_html .= '<div class="box-content">';
|
||||
$output_html .= '<p>';
|
||||
$output_html .= '<details><summary>Create User</summary>';
|
||||
//CREATE USER
|
||||
echo '<form name="create-user" action="' . $prefix_folder . '/mod.php?page=users" method="post">
|
||||
$output_html .= '<form name="create-user" action="' . $prefix_folder . '/mod.php?page=users" method="post">
|
||||
<table id="post-form" style="width:initial;">
|
||||
<tbody><tr><th>Username:</th><td><input type="text" name="create-username" size="25" maxlength="32" autocomplete="off" placeholder="Username" required></td></tr>
|
||||
<tr><th>Password:</th><td><input type="password" name="create-password" size="25" maxlength="256" autocomplete="off" placeholder="Password" required></td></tr>
|
||||
@ -44,20 +44,20 @@
|
||||
<tr><th style="visibility:hidden;"></th><td><input type="submit" name="create-user" value="Create User" style="float: right;"></td></tr>
|
||||
</tbody></table>
|
||||
</form>';
|
||||
echo '</details>';
|
||||
echo '</p>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
$output_html .= '</details>';
|
||||
$output_html .= '</p>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
echo '<br>';
|
||||
echo '<div class="box right">';
|
||||
echo '<h2>Manage Users</h2>';
|
||||
echo '<div class="box-content">';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '<div class="box right">';
|
||||
$output_html .= '<h2>Manage Users</h2>';
|
||||
$output_html .= '<div class="box-content">';
|
||||
|
||||
//foreach
|
||||
|
||||
echo '<table><thead> <td>ID</td> <td>Username</td> <td>Mod Level</td> <td>Actions</td></thead>';
|
||||
echo '<tbody>';
|
||||
$output_html .= '<table><thead> <td>ID</td> <td>Username</td> <td>Mod Level</td> <td>Actions</td></thead>';
|
||||
$output_html .= '<tbody>';
|
||||
|
||||
//TO DO: multiarray and sort by ID, alternatively use JS.
|
||||
// I should also first take the admins, sort them by id, then the mods by id, then the jannies by id, etc.
|
||||
@ -69,33 +69,33 @@
|
||||
continue; //not a user, go next iteration
|
||||
}
|
||||
include $user;
|
||||
echo '<tr>';
|
||||
echo '<td>' . $user_id . '</td>';
|
||||
echo '<td>' . $username . '</td>';
|
||||
echo '<td>';
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<td>' . $user_id . '</td>';
|
||||
$output_html .= '<td>' . $username . '</td>';
|
||||
$output_html .= '<td>';
|
||||
switch ($user_mod_level) {
|
||||
case 9001:
|
||||
echo 'Admin';
|
||||
$output_html .= 'Admin';
|
||||
break;
|
||||
case 40:
|
||||
echo 'Mod';
|
||||
$output_html .= 'Mod';
|
||||
break;
|
||||
case 10:
|
||||
echo 'Janitor';
|
||||
$output_html .= 'Janitor';
|
||||
break;
|
||||
case 0:
|
||||
echo 'User';
|
||||
$output_html .= 'User';
|
||||
break;
|
||||
default:
|
||||
echo 'Unknown';
|
||||
$output_html .= 'Unknown';
|
||||
break;
|
||||
}
|
||||
echo ' (' . $user_mod_level . ')</td>';
|
||||
echo '<td><details><summary>More</summary>';
|
||||
echo '<details><summary style="font-size:smaller;">Edit</summary>';
|
||||
$output_html .= ' (' . $user_mod_level . ')</td>';
|
||||
$output_html .= '<td><details><summary>More</summary>';
|
||||
$output_html .= '<details><summary style="font-size:smaller;">Edit</summary>';
|
||||
|
||||
//EDIT USER
|
||||
echo '<form name="edit-user" action="' . $prefix_folder . '/mod.php?page=users" method="post">
|
||||
$output_html .= '<form name="edit-user" action="' . $prefix_folder . '/mod.php?page=users" method="post">
|
||||
<table id="post-form" style="width:initial;">
|
||||
<tbody><tr><th>Username:</th><td><input type="hidden" name="edit-username" value="' . $username . '"><input type="text" name="edit-username-view" size="25" maxlength="32" autocomplete="off" value="' . $username . '" disabled></td></tr>
|
||||
<!---<tr><th>Password:</th><td><input type="password" name="edit-password" size="25" maxlength="256" autocomplete="off" placeholder="Leave Empty To Not Change"></td></tr>
|
||||
@ -105,65 +105,66 @@
|
||||
|
||||
switch ($user_mod_level) {
|
||||
case 9001:
|
||||
echo '<option value="9001" selected>Admin (9001)</option>
|
||||
$output_html .= '<option value="9001" selected>Admin (9001)</option>
|
||||
<option value="40">Moderator (40)</option>
|
||||
<option value="10">Janitor (10)</option>
|
||||
<option value="0">User (0)</option>';
|
||||
break;
|
||||
case 40:
|
||||
echo '<option value="9001">Admin (9001)</option>
|
||||
$output_html .= '<option value="9001">Admin (9001)</option>
|
||||
<option value="40" selected>Moderator (40)</option>
|
||||
<option value="10">Janitor (10)</option>
|
||||
<option value="0">User (0)</option>';
|
||||
break;
|
||||
case 10:
|
||||
echo '<option value="9001">Admin (9001)</option>
|
||||
$output_html .= '<option value="9001">Admin (9001)</option>
|
||||
<option value="40">Moderator (40)</option>
|
||||
<option value="10" selected>Janitor (10)</option>
|
||||
<option value="0">User (0)</option>';
|
||||
break;
|
||||
default:
|
||||
echo '<option value="9001">Admin (9001)</option>
|
||||
$output_html .= '<option value="9001">Admin (9001)</option>
|
||||
<option value="40" selected>Moderator (40)</option>
|
||||
<option value="10">Janitor (10)</option>
|
||||
<option value="0" selected>User (0)</option>';
|
||||
break;
|
||||
}
|
||||
|
||||
echo ' </select>
|
||||
$output_html .= ' </select>
|
||||
</td></tr>
|
||||
<tr><th style="visibility:hidden;"></th><td><input type="submit" name="edit-user" value="Edit User" style="float: right;"></td></tr>
|
||||
</tbody></table>
|
||||
</form>';
|
||||
|
||||
echo '</details>';
|
||||
echo '<details><summary style="font-size:smaller;">Delete</summary><details><summary>Are you sure you want to delete this user ('.$username.')?</summary><details><summary>Yes!</summary><form name="delete-user" action="' . $prefix_folder . '/mod.php?page=users" method="post"><input type="hidden" id="delete-username" name="delete-username" value="' . $username . '"><input type="Submit" name="delete-user" value="Delete"></form></details></details></details>';
|
||||
echo '</details></td>';
|
||||
echo '</tr>';
|
||||
$output_html .= '</details>';
|
||||
$output_html .= '<details><summary style="font-size:smaller;">Delete</summary><details><summary>Are you sure you want to delete this user ('.$username.')?</summary><details><summary>Yes!</summary><form name="delete-user" action="' . $prefix_folder . '/mod.php?page=users" method="post"><input type="hidden" id="delete-username" name="delete-username" value="' . $username . '"><input type="Submit" name="delete-user" value="Delete"></form></details></details></details>';
|
||||
$output_html .= '</details></td>';
|
||||
$output_html .= '</tr>';
|
||||
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
$output_html .= '</tbody></table>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '<br>';
|
||||
echo '</div>';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<br>';
|
||||
$output_html .= '</div>';
|
||||
|
||||
if ($user_created == true) {
|
||||
echo '<div class="message" style="margin-top:0;">User created.</div>';
|
||||
$output_html .= '<div class="message" style="margin-top:0;">User created.</div>';
|
||||
}
|
||||
if ($user_edited == true) {
|
||||
echo '<div class="message" style="margin-top:0;">User edited.</div>';
|
||||
$output_html .= '<div class="message" style="margin-top:0;">User edited.</div>';
|
||||
}
|
||||
if ($user_deleted == true) {
|
||||
echo '<div class="message" style="margin-top:0;">User deleted.</div>';
|
||||
$output_html .= '<div class="message" style="margin-top:0;">User deleted.</div>';
|
||||
}
|
||||
|
||||
include $path . '/templates/footer.html';
|
||||
echo '</body>';
|
||||
echo '</html>';
|
||||
include $path . '/templates/footer.php';
|
||||
$output_html .= '</body>';
|
||||
$output_html .= '</html>';
|
||||
echo $output_html;
|
||||
exit();
|
||||
|
||||
?>
|
@ -1,20 +0,0 @@
|
||||
<?php if ($config['display_banner'] === true) {
|
||||
include $path . '/assets/img/banner.php';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="page-info">
|
||||
<h1><?php echo '/' . $current_board . '/ - ' . $board_title; ?></h1>
|
||||
<span class="small"><?php echo $board_description; ?></span>
|
||||
|
||||
<?php
|
||||
|
||||
if ($logged_in == true) {
|
||||
echo '<hr>You are logged in.<br>[<a href="' . $prefix_folder . '/mod.php">Return to Dashboard</a>]';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
<hr>
|
18
templates/page-info.php
Normal file
18
templates/page-info.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
if ($config['display_banner'] === true) {
|
||||
include $path . '/assets/img/banner.php';
|
||||
}
|
||||
|
||||
|
||||
$output_html .= '<div class="page-info">
|
||||
<h1>/' . $current_board . '/ - ' . $board_title . '</h1>
|
||||
<span class="small">' . $board_slogan . '</span>';
|
||||
|
||||
if ($logged_in == true) {
|
||||
$output_html .= '<hr>You are logged in.<br>[<a href="' . $prefix_folder . '/mod.php">Return to Dashboard</a>]';
|
||||
}
|
||||
|
||||
$output_html .= '
|
||||
</div>
|
||||
<hr>';
|
@ -1,154 +0,0 @@
|
||||
<?php if ($current_page === 'thread') { echo '<div class="postingmode">Posting mode: Reply</div>'; } ?>
|
||||
<?php if ($current_page != ('thread') && $current_page != ('index') && $current_page != ('catalog')) { echo '<style>#post-form { display: none; }</style><div class="blotter">(Locked!)</div>'; } ?>
|
||||
<div id="post-form">
|
||||
<form enctype="multipart/form-data" name="post" action="<?php echo $prefix_folder; ?>/post.php" method="post">
|
||||
<table>
|
||||
|
||||
<!--Hidden Inputs-->
|
||||
<?php echo '<input type="hidden" id="board" name="board" value="' . $current_board .'">';?>
|
||||
<?php if ($current_page === 'thread') { echo '<input type="hidden" id="thread" name="thread" value="thread">'; } ?>
|
||||
<?php if ($current_page === 'thread') { echo '<input type="hidden" id="thread_number" name="thread_number" value="' . $post_number_op . '">'; } ?>
|
||||
<?php if ($current_page === 'index' || $current_page === 'catalog') { echo '<input type="hidden" id="index" name="index" value="index">'; } ?>
|
||||
|
||||
<?php
|
||||
if ($forced_anon !== true) {
|
||||
echo '<tr>';
|
||||
echo '<th>Name</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="text" name="name" size="25" maxlength="256" autocomplete="off" placeholder="' . $default_name . '" disabled=""></td>';
|
||||
} else {
|
||||
echo '<td><input type="text" name="name" size="25" maxlength="256" autocomplete="off" placeholder="' . $default_name . '"></td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($disable_email !== true) {
|
||||
echo '<tr>';
|
||||
echo '<th>Email</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="text" name="link" size="25" maxlength="256" autocomplete="off" disabled></td>';
|
||||
} else {
|
||||
echo '<td><input type="text" name="link" size="25" maxlength="256" autocomplete="off"></td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo '<tr>';
|
||||
echo '<th>Subject</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off" disabled> <input type="submit" name="post" value="Locked" disabled></td>';
|
||||
} elseif ($info_locked == 1 && $config['mod']['post_in_locked'] <= $mod_level) {
|
||||
echo '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off"> <input type="submit" name="post" value="Locked"></td>';
|
||||
} else {
|
||||
echo '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off"> ';
|
||||
if ($current_page == 'index' || $current_page == 'catalog') {
|
||||
echo '<input type="submit" name="post" value="Submit"></td>';
|
||||
}
|
||||
if ($current_page == 'thread') {
|
||||
echo '<input type="submit" name="post" value="Reply"></td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo '<tr>';
|
||||
echo '<th>Comment</th>';
|
||||
echo '<td>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<textarea name="body" id="body" rows="5" cols="30" disabled></textarea>';
|
||||
} else {
|
||||
echo '<textarea name="body" id="body" rows="5" cols="30"></textarea>';
|
||||
}
|
||||
echo '<input style="height:1;width:1;z-index:-10;margin-left:-100px;margin-top:5px;position: absolute;" type="text" id="username" name="username" value=""></td></tr>';
|
||||
?>
|
||||
<?php if ($captcha_required == (true) && ($current_page == ('thread') && ($info_locked != 1 || $config['mod']['post_in_locked'] <= $mod_level) || $current_page == ('index') || $current_page == ('catalog'))) {
|
||||
echo '<tr><th>Verification</th><td>
|
||||
<details class="js-captcha"><summary id="load-captcha">View Verification</summary>
|
||||
<span class="js-captcha">
|
||||
<img title="Click Here To Refresh" height="50" width="198" id="captcha" js-src="' . $prefix_folder . '/captcha.php' .'"/><br>
|
||||
</span>
|
||||
</details>
|
||||
<noscript>
|
||||
<style>.js-captcha { display:none }</style>
|
||||
<img height="50" width="198" id="captcha" src="' . $prefix_folder . '/captcha.php' .'"/><br>
|
||||
</noscript>
|
||||
<input id="captcha-field" type="text" name="captcha" minlength="6" maxlength="6" autocomplete="off" required>
|
||||
</td>
|
||||
';
|
||||
}?>
|
||||
|
||||
<?php
|
||||
if ($allow_files == true) {
|
||||
echo '<tr>';
|
||||
echo '<th>File</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
echo '<td><input type="file" name="file" id="upload" disabled></td>';
|
||||
} else {
|
||||
echo '<td><input type="file" name="file" id="upload"></td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<details>
|
||||
<summary>More</summary>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Password</th>
|
||||
<td><input id="post_password" type="password" name="password" size="25" maxlength="256" value="<?php echo $_COOKIE['post_password']; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Options</th>
|
||||
<td>
|
||||
<?php
|
||||
if (($spoiler_enabled == true) && ($allow_files == true)) {
|
||||
echo '
|
||||
<label for="spoiler"><input type="checkbox" id="spoiler" name="spoiler" autocomplete="off"> Spoiler Image</label>
|
||||
<div class="small">You may also type <i>spoiler</i> in the email field.</div>
|
||||
'; }
|
||||
?>
|
||||
<label for="sage"><input type="checkbox" id="sage" name="sage" autocomplete="off"> No Bump</label>
|
||||
<div class="small">You may also type <i>sage</i> in the email field.</div>
|
||||
|
||||
<?php
|
||||
if ($current_page != 'thread' && $mod_level > 0) {
|
||||
echo '<div class="small"><b>Moderator tools:</b></div>';
|
||||
if ($config['mod']['thread_sticky'] <= $mod_level) {
|
||||
echo '
|
||||
<label for="sticky"><input type="checkbox" id="sticky" name="sticky" autocomplete="off"> Sticky Thread</label><br>
|
||||
';
|
||||
}
|
||||
if ($config['mod']['thread_lock'] <= $mod_level) {
|
||||
echo '
|
||||
<label for="lock"><input type="checkbox" id="lock" name="lock" autocomplete="off"> Lock Thread</label><br>
|
||||
';
|
||||
}
|
||||
if ($config['mod']['thread_autosage'] <= $mod_level) {
|
||||
echo '
|
||||
<label for="autosage"><input type="checkbox" id="autosage" name="autosage" autocomplete="off"> Autosage Thread</label><br>
|
||||
';
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['mod']['public_mod_level'] <= $mod_level) {
|
||||
echo '
|
||||
<label for="mod_level"><input type="checkbox" id="mod_level" name="mod_level" autocomplete="off"> Display Mod Level</label>
|
||||
<div class="small">You may also type <i>showlevel</i> in the email field.</div>
|
||||
';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</details>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<hr>
|
144
templates/post-form.php
Normal file
144
templates/post-form.php
Normal file
@ -0,0 +1,144 @@
|
||||
<?php
|
||||
|
||||
if ($current_page === 'thread') {
|
||||
$output_html .= '<div class="postingmode">Posting mode: Reply</div>';
|
||||
}
|
||||
if ($current_page != ('thread') && $current_page != ('index') && $current_page != ('catalog')) {
|
||||
$output_html .= '<style>#post-form { display: none; }</style><div class="blotter">(Locked!)</div>';
|
||||
}
|
||||
|
||||
$output_html .= '<div id="post-form">
|
||||
<form enctype="multipart/form-data" name="post" action="' . $prefix_folder . '/post.php" method="post">
|
||||
<table>';
|
||||
|
||||
$output_html .= '<!--Hidden Inputs-->';
|
||||
$output_html .= '<input type="hidden" id="board" name="board" value="' . $current_board .'">';
|
||||
if ($current_page === 'thread') { $output_html .= '<input type="hidden" id="thread" name="thread" value="thread">'; }
|
||||
if ($current_page === 'thread') { $output_html .= '<input type="hidden" id="thread_number" name="thread_number" value="' . $post_number_op . '">'; }
|
||||
if ($current_page === 'index' || $current_page === 'catalog') { $output_html .= '<input type="hidden" id="index" name="index" value="index">'; }
|
||||
|
||||
if ($forced_anon !== true) {
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<th>Name</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
$output_html .= '<td><input type="text" name="name" size="25" maxlength="256" autocomplete="off" placeholder="' . $default_name . '" disabled=""></td>';
|
||||
} else {
|
||||
$output_html .= '<td><input type="text" name="name" size="25" maxlength="256" autocomplete="off" placeholder="' . $default_name . '"></td>';
|
||||
}
|
||||
$output_html .= '</tr>';
|
||||
}
|
||||
|
||||
if ($disable_email !== true) {
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<th>Email</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
$output_html .= '<td><input type="text" name="link" size="25" maxlength="256" autocomplete="off" disabled></td>';
|
||||
} else {
|
||||
$output_html .= '<td><input type="text" name="link" size="25" maxlength="256" autocomplete="off"></td>';
|
||||
}
|
||||
$output_html .= '</tr>';
|
||||
}
|
||||
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<th>Subject</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
$output_html .= '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off" disabled> <input type="submit" name="post" value="Locked" disabled></td>';
|
||||
} elseif ($info_locked == 1 && $config['mod']['post_in_locked'] <= $mod_level) {
|
||||
$output_html .= '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off"> <input type="submit" name="post" value="Locked"></td>';
|
||||
} else {
|
||||
$output_html .= '<td><input type="text" name="subject" size="25" maxlength="256" autocomplete="off"> ';
|
||||
if ($current_page == 'index' || $current_page == 'catalog') {
|
||||
$output_html .= '<input type="submit" name="post" value="Submit"></td>';
|
||||
}
|
||||
if ($current_page == 'thread') {
|
||||
$output_html .= '<input type="submit" name="post" value="Reply"></td>';
|
||||
}
|
||||
$output_html .= '</tr>';
|
||||
}
|
||||
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<th>Comment</th>';
|
||||
$output_html .= '<td>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
$output_html .= '<textarea name="body" id="body" rows="5" cols="30" disabled></textarea>';
|
||||
} else {
|
||||
$output_html .= '<textarea name="body" id="body" rows="5" cols="30"></textarea>';
|
||||
}
|
||||
$output_html .= '<input style="height:1px;width:1px;z-index:-10;margin-left:-100px;margin-top:5px;position: absolute;" type="text" id="username" name="username" value=""></td></tr>';
|
||||
|
||||
if ($captcha_required == (true) && ($current_page == ('thread') && ($info_locked != 1 || $config['mod']['post_in_locked'] <= $mod_level) || $current_page == ('index') || $current_page == ('catalog'))) {
|
||||
$output_html .= '<tr><th>Verification</th><td>
|
||||
<details class="js-captcha"><summary id="load-captcha">View Verification</summary>
|
||||
<span class="js-captcha">
|
||||
<img title="Click Here To Refresh" height="50" width="198" id="captcha" js-src="' . $prefix_folder . '/captcha.php' .'"/><br>
|
||||
</span>
|
||||
</details>
|
||||
<noscript>
|
||||
<style>.js-captcha { display:none }</style>
|
||||
<img height="50" width="198" id="no-js-captcha" src="' . $prefix_folder . '/captcha.php' .'"/><br>
|
||||
</noscript>
|
||||
<input id="captcha-field" type="text" name="captcha" minlength="6" maxlength="6" autocomplete="off" required>
|
||||
</td>
|
||||
';
|
||||
}
|
||||
|
||||
if ($allow_files == true) {
|
||||
$output_html .= '<tr>';
|
||||
$output_html .= '<th>File</th>';
|
||||
if ($info_locked == 1 && $config['mod']['post_in_locked'] > $mod_level) {
|
||||
$output_html .= '<td><input type="file" name="file" id="upload" disabled></td>';
|
||||
} else {
|
||||
$output_html .= '<td><input type="file" name="file" id="upload"></td>';
|
||||
}
|
||||
$output_html .= '</tr>';
|
||||
}
|
||||
|
||||
$output_html .= '
|
||||
</table>
|
||||
<details>
|
||||
<summary>More</summary>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Password</th>
|
||||
<td><input id="post_password" type="password" name="password" size="25" maxlength="256" value="' . $_COOKIE['post_password'] . '"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Options</th>
|
||||
<td>';
|
||||
if (($spoiler_enabled == true) && ($allow_files == true)) {
|
||||
$output_html .= '
|
||||
<label for="spoiler"><input type="checkbox" id="spoiler" name="spoiler" autocomplete="off"> Spoiler Image</label>
|
||||
<div class="small">You may also type <i>spoiler</i> in the email field.</div>';
|
||||
}
|
||||
$output_html .= '<label for="sage"><input type="checkbox" id="sage" name="sage" autocomplete="off"> No Bump</label>
|
||||
<div class="small">You may also type <i>sage</i> in the email field.</div>';
|
||||
|
||||
if ($current_page != 'thread' && $mod_level > 0) {
|
||||
$output_html .= '<div class="small"><b>Moderator tools:</b></div>';
|
||||
if ($config['mod']['thread_sticky'] <= $mod_level) {
|
||||
$output_html .= '<label for="sticky"><input type="checkbox" id="sticky" name="sticky" autocomplete="off"> Sticky Thread</label><br>';
|
||||
}
|
||||
if ($config['mod']['thread_lock'] <= $mod_level) {
|
||||
$output_html .= '<label for="lock"><input type="checkbox" id="lock" name="lock" autocomplete="off"> Lock Thread</label><br>';
|
||||
}
|
||||
if ($config['mod']['thread_autosage'] <= $mod_level) {
|
||||
$output_html .= '<label for="autosage"><input type="checkbox" id="autosage" name="autosage" autocomplete="off"> Autosage Thread</label><br>';
|
||||
}
|
||||
}
|
||||
|
||||
if ($config['mod']['public_mod_level'] <= $mod_level) {
|
||||
$output_html .= '
|
||||
<label for="mod_level"><input type="checkbox" id="mod_level" name="mod_level" autocomplete="off"> Display Mod Level</label>
|
||||
<div class="small">You may also type <i>showlevel</i> in the email field.</div>';
|
||||
}
|
||||
|
||||
$output_html .= '
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</details>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<hr>';
|
||||
|
@ -1,188 +0,0 @@
|
||||
<div class="post-arrows">>></div>
|
||||
<div class="post reply" id="<?php echo $post_number_reply; ?>">
|
||||
<div class="post-info">
|
||||
|
||||
<?php if ($post_buttons == true) {
|
||||
echo '
|
||||
<details>
|
||||
<summary></summary>
|
||||
<form name="post_button" action="' . $prefix_folder . '/delete-report.php" method="post">
|
||||
<table>
|
||||
<tbody>';
|
||||
|
||||
if ($mod_level > 0) {
|
||||
echo '<tr><td><div class="small"><b>Moderator Tools:</b></div>';
|
||||
if ($config['mod']['ban'] <= $mod_level) {
|
||||
echo '<details><summary>Ban</summary><table id="post-form" style="width:initial;">
|
||||
<tbody>
|
||||
<tr><th>Reason:</th><td><input type="text" name="ban-reason" size="25" maxlength="256" autocomplete="off" placeholder="Reason"></td></tr>
|
||||
<tr><th>Duration:</th><td>
|
||||
<select name="ban-expire">
|
||||
<option value="permanent">Permanent</option>
|
||||
<option value="31104000">1 Year</option>
|
||||
<option value="7776000">3 Months</option>
|
||||
<option value="2592000">1 Month</option>
|
||||
<option value="1209600">2 Weeks</option>
|
||||
<option value="604800">1 Week</option>
|
||||
<option value="259200">3 Days</option>
|
||||
<option value="86400">1 Day</option>
|
||||
<option value="3600">1 Hour</option>
|
||||
<option value="warning" selected>Warning</option>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><th>Public:</th><td><label for="public_' . $post_number_reply . '"><input type="checkbox" id="public_' . $post_number_reply . '" name="public">Public Ban Message</label><input type="text" name="ban-message" size="25" maxlength="256" autocomplete="off" placeholder="(User was banned for this post.)"></td></tr>
|
||||
<tr><th style="visibility:hidden;"></th><td><details style="float:right;"><summary style="text-align:right;">Ban</summary><input type="submit" name="create-ban" value="Create Ban"></details></td></tr>
|
||||
</tbody></table></details>';
|
||||
}
|
||||
|
||||
echo '<hr></td></tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
echo '
|
||||
<input type="hidden" name="board" value="' . $current_board . '"/>
|
||||
<input type="hidden" name="thread" value="' . $post_number_op . '"/>
|
||||
<input type="hidden" name="reply" value="' . $post_number_reply . '"/>
|
||||
<tr>
|
||||
<td><input type="password" id="password_' . $post_number_reply . '" name="password" maxlength="256" placeholder="Password" value="' . $_COOKIE['post_password'] . '"></td>
|
||||
<td><input type="submit" name="delete" value="Delete"></td>
|
||||
<td><label for="file_' . $post_number_reply . '"><input type="checkbox" id="file_' . $post_number_reply . '" name="file">File only</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" id="reason_' . $post_number_reply . '" name="reason" maxlength="256" autocomplete="off" value="" placeholder="Reason"></td>
|
||||
<td><input type="submit" name="report" value="Report"></td>
|
||||
<td><label for="global_' . $post_number_reply . '"><input type="checkbox" id="global_' . $post_number_reply . '" name="global">Global</label></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</details>';
|
||||
}?>
|
||||
|
||||
<?php if ($reply_subject != '') { echo '<span class="subject">' . $reply_subject . ' </span>'; }?>
|
||||
<?php if (($reply_email != '') && ($show_email != false)) { echo '<a href="mailto:' . $reply_email . '">';}?><span class="<?php if(($reply_email != '') && ($show_email != false)) { echo 'link '; } ?>name"><?php echo $reply_name; ?></span><?php if (($reply_email != '') && ($show_email != false)) { echo '</a>'; }?>
|
||||
<span class="post-time" data-timestamp="<?php echo $reply_time;?>" data-tooltip="<?php echo timeConvert($reply_time, $time_method_hover); ?>"><?php echo timeConvert($reply_time, $time_method); ?></span>
|
||||
<?php
|
||||
if ($display_id == true) {
|
||||
echo '<span class="id">ID: ';
|
||||
if ($reply_email == "sage") {
|
||||
echo 'Heaven';
|
||||
} else {
|
||||
$idhash = md5($current_board . $post_number_op);
|
||||
$reply_id = crypt($reply_ip, $idhash);
|
||||
$reply_id = preg_replace("/\./", "", $reply_id);
|
||||
echo substr($reply_id, -8);
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo '<span class="post-number">';
|
||||
echo '<a class="anchor" name="' . $post_number_reply . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_reply . '">No.</a>';
|
||||
echo '<a class="click" num="' . $post_number_reply . '" id="cite_' . $post_number_reply . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#q' . $post_number_reply . '">' . $post_number_reply . '</a>';
|
||||
echo ' </span>';
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
if ($reply_file[0][0] == "deleted") {
|
||||
echo '<div class="post-file"><div class="file-info deleted">File Deleted</div><div class="post-image"><img class="file-deleted" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_deleted . '"/></div></div>';
|
||||
}
|
||||
elseif ($reply_file[0][0] != '') {
|
||||
|
||||
echo '<div class="post-file" data-file="'.$reply_file[0][0].'">';
|
||||
echo '<div class="file-info">';
|
||||
if ($original_filename == true && strlen($reply_file[0][2]) > $max_filename ) {
|
||||
echo 'File: <a title="' . $reply_file[0][2] . '" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
echo substr($reply_file[0][2], 0, $max_filename) . '(...).' . getExt($reply_file[0][2]);
|
||||
echo '</a>';
|
||||
} elseif ($original_filename == true) {
|
||||
echo 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
echo $reply_file[0][2];
|
||||
echo '</a>';
|
||||
} else {
|
||||
echo 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
echo $reply_file[0][1];
|
||||
echo '</a>';
|
||||
}
|
||||
|
||||
if (isset($file_download)) {
|
||||
switch($file_download) {
|
||||
case 'original':
|
||||
echo ' <a title="Download as ' . $reply_file[0][2] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" download="' . $reply_file[0][2] . '">➜</a>';
|
||||
break;
|
||||
case 'server':
|
||||
echo ' <a title="Download as ' . $reply_file[0][1] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" download="' . $reply_file[0][1] . '">➜</a>';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($reply_file[0][0] == 'image') {
|
||||
echo ' (' . formatBytes($reply_file[0][4]) . ', ' . $reply_file[0][3] . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="'.$reply_file[0][0].'">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
|
||||
$thmb_width = preg_replace('/x[^x]*$/', '', $reply_file[0][7]);
|
||||
$thmb_height = preg_replace('/^[^x]*x/', '', $reply_file[0][7]);
|
||||
$full_width = preg_replace('/x[^x]*$/', '', $reply_file[0][3]);
|
||||
$full_height = preg_replace('/^[^x]*x/', '', $reply_file[0][3]);
|
||||
|
||||
if ($reply_file[0][5] != "1") {
|
||||
echo '<img img-id="'.$post_number_reply.'" class="thumb" width="'.$thmb_width.'" height="'.$thmb_height.'" src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][6] . '"/>';
|
||||
} else {
|
||||
echo '<img img-id="'.$post_number_reply.'" class="thumb" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_spoiler . '"/>';
|
||||
}
|
||||
echo '<img img-id="'.$post_number_reply.'" class="expand dnone" data-width="'.$full_width.'" data-height="'.$full_height.'" img-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '"/>';
|
||||
//image full
|
||||
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
if (preg_match('/audio/', $reply_file[0][0])) {
|
||||
echo ' (' . formatBytes($reply_file[0][4]) . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="'.$reply_file[0][0].'">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
echo '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_audio . '"/>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
if (preg_match('/video/', $reply_file[0][0])) {
|
||||
echo ' (' . formatBytes($reply_file[0][4]) . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="video">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
echo '<img class="thumb" vid-id="'.$post_number_reply.'" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_video . '"/>';
|
||||
echo ' <video class="dnone" vid-type="'.$reply_file[0][0].'" vid-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" vid-id="'.$post_number_reply.'" width="320" height="240" controls autoplay>
|
||||
Your browser does not support the video tag.
|
||||
</video>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
if ($reply_file[0][0] == 'download') {
|
||||
echo ' (' . formatBytes($reply_file[0][4]) . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="'.$reply_file[0][0].'">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
echo '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_download . '"/>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
//reset files
|
||||
$reply_file = false;
|
||||
|
||||
?>
|
||||
|
||||
<blockquote class="post-content"><?php echo $reply_body; ?></blockquote>
|
||||
</div>
|
182
templates/reply.php
Normal file
182
templates/reply.php
Normal file
@ -0,0 +1,182 @@
|
||||
<?php
|
||||
|
||||
$output_html .= '<div class="post-arrows">>></div>
|
||||
<div class="post reply" id="' . $post_number_reply . '">
|
||||
<div class="post-info">';
|
||||
|
||||
if ($post_buttons == true) {
|
||||
$output_html .= '
|
||||
<details>
|
||||
<summary></summary>
|
||||
<form name="post_button" action="' . $prefix_folder . '/delete-report.php" method="post">
|
||||
<table>
|
||||
<tbody>';
|
||||
|
||||
if ($mod_level > 0) {
|
||||
$output_html .= '<tr><td><div class="small"><b>Moderator Tools:</b></div>';
|
||||
if ($config['mod']['ban'] <= $mod_level) {
|
||||
$output_html .= '<details><summary>Ban</summary><table id="post-form" style="width:initial;">
|
||||
<tbody>
|
||||
<tr><th>Reason:</th><td><input type="text" name="ban-reason" size="25" maxlength="256" autocomplete="off" placeholder="Reason"></td></tr>
|
||||
<tr><th>Duration:</th><td>
|
||||
<select name="ban-expire">
|
||||
<option value="permanent">Permanent</option>
|
||||
<option value="31104000">1 Year</option>
|
||||
<option value="7776000">3 Months</option>
|
||||
<option value="2592000">1 Month</option>
|
||||
<option value="1209600">2 Weeks</option>
|
||||
<option value="604800">1 Week</option>
|
||||
<option value="259200">3 Days</option>
|
||||
<option value="86400">1 Day</option>
|
||||
<option value="3600">1 Hour</option>
|
||||
<option value="warning" selected>Warning</option>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><th>Public:</th><td><label for="public_' . $post_number_reply . '"><input type="checkbox" id="public_' . $post_number_reply . '" name="public">Public Ban Message</label><input type="text" name="ban-message" size="25" maxlength="256" autocomplete="off" placeholder="(User was banned for this post.)"></td></tr>
|
||||
<tr><th style="visibility:hidden;"></th><td><details style="float:right;"><summary style="text-align:right;">Ban</summary><input type="submit" name="create-ban" value="Create Ban"></details></td></tr>
|
||||
</tbody></table></details>';
|
||||
}
|
||||
|
||||
$output_html .= '<hr></td></tr>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
$output_html .= '
|
||||
<input type="hidden" name="board" value="' . $current_board . '"/>
|
||||
<input type="hidden" name="thread" value="' . $post_number_op . '"/>
|
||||
<input type="hidden" name="reply" value="' . $post_number_reply . '"/>
|
||||
<tr>
|
||||
<td><input type="password" id="password_' . $post_number_reply . '" name="password" maxlength="256" placeholder="Password" value="' . $_COOKIE['post_password'] . '"></td>
|
||||
<td><input type="submit" name="delete" value="Delete"></td>
|
||||
<td><label for="file_' . $post_number_reply . '"><input type="checkbox" id="file_' . $post_number_reply . '" name="file">File only</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" id="reason_' . $post_number_reply . '" name="reason" maxlength="256" autocomplete="off" value="" placeholder="Reason"></td>
|
||||
<td><input type="submit" name="report" value="Report"></td>
|
||||
<td><label for="global_' . $post_number_reply . '"><input type="checkbox" id="global_' . $post_number_reply . '" name="global">Global</label></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</details>';
|
||||
}
|
||||
|
||||
if ($reply_subject != '') { $output_html .= '<span class="subject">' . $reply_subject . ' </span>'; }
|
||||
if (($reply_email != '') && ($show_email != false)) { $output_html .= '<a href="mailto:' . $reply_email . '">';} $output_html .= '<span class="'; if(($reply_email != '') && ($show_email != false)) { $output_html .= 'link '; } $output_html .= 'name">' . $reply_name . '</span>'; if (($reply_email != '') && ($show_email != false)) { $output_html .= '</a>'; }
|
||||
$output_html .= '<span class="post-time" data-timestamp="' . $reply_time . '" data-tooltip="' . timeConvert($reply_time, $time_method_hover) . '"> ' . timeConvert($reply_time, $time_method) . '</span>';
|
||||
|
||||
if ($display_id == true) {
|
||||
$output_html .= '<span class="id"> ID: ';
|
||||
if ($reply_email == "sage") {
|
||||
$output_html .= 'Heaven';
|
||||
} else {
|
||||
$idhash = md5($current_board . $post_number_op);
|
||||
$reply_id = crypt($reply_ip, $idhash);
|
||||
$reply_id = preg_replace("/\./", "", $reply_id);
|
||||
$output_html .= substr($reply_id, -8);
|
||||
}
|
||||
$output_html .= '</span>';
|
||||
}
|
||||
|
||||
$output_html .= '<span class="post-number">';
|
||||
$output_html .= '<a class="anchor" name="' . $post_number_reply . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_reply . '"> No.</a>';
|
||||
$output_html .= '<a class="click" num="' . $post_number_reply . '" id="cite_' . $post_number_reply . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#q' . $post_number_reply . '">' . $post_number_reply . '</a>';
|
||||
$output_html .= ' </span>';
|
||||
|
||||
$output_html .= '</div>';
|
||||
|
||||
if ($reply_file[0][0] == "deleted") {
|
||||
$output_html .= '<div class="post-file"><div class="file-info deleted">File Deleted</div><div class="post-image"><img class="file-deleted" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_deleted . '"/></div></div>';
|
||||
}
|
||||
elseif ($reply_file[0][0] != '') {
|
||||
|
||||
$output_html .= '<div class="post-file" data-file="'.$reply_file[0][0].'">';
|
||||
$output_html .= '<div class="file-info">';
|
||||
if ($original_filename == true && strlen($reply_file[0][2]) > $max_filename ) {
|
||||
$output_html .= 'File: <a title="' . $reply_file[0][2] . '" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
$output_html .= substr($reply_file[0][2], 0, $max_filename) . '(...).' . getExt($reply_file[0][2]);
|
||||
$output_html .= '</a>';
|
||||
} elseif ($original_filename == true) {
|
||||
$output_html .= 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
$output_html .= $reply_file[0][2];
|
||||
$output_html .= '</a>';
|
||||
} else {
|
||||
$output_html .= 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
$output_html .= $reply_file[0][1];
|
||||
$output_html .= '</a>';
|
||||
}
|
||||
|
||||
if (isset($file_download)) {
|
||||
switch($file_download) {
|
||||
case 'original':
|
||||
$output_html .= ' <a title="Download as ' . $reply_file[0][2] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" download="' . $reply_file[0][2] . '">➜</a>';
|
||||
break;
|
||||
case 'server':
|
||||
$output_html .= ' <a title="Download as ' . $reply_file[0][1] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" download="' . $reply_file[0][1] . '">➜</a>';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($reply_file[0][0] == 'image') {
|
||||
$output_html .= ' (' . formatBytes($reply_file[0][4]) . ', ' . $reply_file[0][3] . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="'.$reply_file[0][0].'">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
|
||||
$thmb_width = preg_replace('/x[^x]*$/', '', $reply_file[0][7]);
|
||||
$thmb_height = preg_replace('/^[^x]*x/', '', $reply_file[0][7]);
|
||||
$full_width = preg_replace('/x[^x]*$/', '', $reply_file[0][3]);
|
||||
$full_height = preg_replace('/^[^x]*x/', '', $reply_file[0][3]);
|
||||
|
||||
if ($reply_file[0][5] != "1") {
|
||||
$output_html .= '<img img-id="'.$post_number_reply.'" class="thumb" width="'.$thmb_width.'" height="'.$thmb_height.'" src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][6] . '"/>';
|
||||
} else {
|
||||
$output_html .= '<img img-id="'.$post_number_reply.'" class="thumb" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_spoiler . '"/>';
|
||||
}
|
||||
$output_html .= '<img img-id="'.$post_number_reply.'" class="expand dnone" data-width="'.$full_width.'" data-height="'.$full_height.'" img-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '"/>';
|
||||
//image full
|
||||
|
||||
$output_html .= '</a>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if (preg_match('/audio/', $reply_file[0][0])) {
|
||||
$output_html .= ' (' . formatBytes($reply_file[0][4]) . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="'.$reply_file[0][0].'">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
$output_html .= '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_audio . '"/>';
|
||||
$output_html .= '</a>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if (preg_match('/video/', $reply_file[0][0])) {
|
||||
$output_html .= ' (' . formatBytes($reply_file[0][4]) . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="video">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
$output_html .= '<img class="thumb" vid-id="'.$post_number_reply.'" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_video . '"/>';
|
||||
$output_html .= '</a>';
|
||||
$output_html .= ' <video class="dnone" vid-type="'.$reply_file[0][0].'" vid-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '" vid-id="'.$post_number_reply.'" width="320" height="240" controls autoplay>Your browser does not support the video tag.</video>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if ($reply_file[0][0] == 'download') {
|
||||
$output_html .= ' (' . formatBytes($reply_file[0][4]) . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="'.$reply_file[0][0].'">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $reply_file[0][1] . '">';
|
||||
$output_html .= '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_download . '"/>';
|
||||
$output_html .= '</a>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
//reset files
|
||||
$reply_file = false;
|
||||
$output_html .= '
|
||||
<blockquote class="post-content">' . $reply_body . '</blockquote>
|
||||
</div>';
|
||||
|
99
templates/thread-catalog.php
Normal file
99
templates/thread-catalog.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
$output_html .= '<div class="thread' . $post_number_op . '">';
|
||||
|
||||
$output_html .= '<span class="icons">';
|
||||
|
||||
if ($info_sticky == 1) {
|
||||
$output_html .= '<span title="Sticky" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_sticky . '"/></span>';
|
||||
}
|
||||
if ($info_locked == 1) {
|
||||
$output_html .= '<span title="Locked" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_locked . '"/></span>';
|
||||
}
|
||||
if ($info_autosage == 1) {
|
||||
$output_html .= '<span title="Autosage" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_autosage . '"/></span>';
|
||||
}
|
||||
|
||||
$output_html .= '</span>';
|
||||
|
||||
$output_html .= '<div class="post op ' . $post_number_op . '" id="' . $post_number_op . '">';
|
||||
|
||||
if ($op_file[0][0] == "deleted") {
|
||||
$output_html .= '<div class="post-file"><img class="file-deleted" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_deleted . '"/></div>';
|
||||
}
|
||||
elseif ($op_file[0][0] != '') {
|
||||
$output_html .= '<div class="post-file">';
|
||||
if ($op_file[0][0] == 'image') {
|
||||
$output_html .= '<div class="post-image">';
|
||||
|
||||
$thmb_width = preg_replace('/x[^x]*$/', '', $op_file[0][7]);
|
||||
$thmb_height = preg_replace('/^[^x]*x/', '', $op_file[0][7]);
|
||||
$full_width = preg_replace('/x[^x]*$/', '', $op_file[0][3]);
|
||||
$full_height = preg_replace('/^[^x]*x/', '', $op_file[0][3]);
|
||||
|
||||
if ($op_file[0][5] != "1") {
|
||||
$output_html .= '<img id="'.$post_number_op.'" class="thumb" width="'.$thmb_width.'" height="'.$thmb_height.'" src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][6] . '"/>';
|
||||
} else {
|
||||
$output_html .= '<img id="'.$post_number_op.'" class="thumb" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_spoiler . '"/>';
|
||||
}
|
||||
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if (preg_match('/audio/', $op_file[0][0])) {
|
||||
$output_html .= '<div class="post-image">';
|
||||
$output_html .= '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_audio . '"/>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if (preg_match('/video/', $op_file[0][0])) {
|
||||
$output_html .= '<div class="post-image">';
|
||||
$output_html .= '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_video . '"/>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if ($op_file[0][0] == 'download') {
|
||||
$output_html .= '<div class="post-image">';
|
||||
$output_html .= '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_download . '"/>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
|
||||
|
||||
//reset files
|
||||
$op_file = false;
|
||||
|
||||
$output_html .= '<div class="post-info" data-tooltip="' . timeConvert($op_time, $time_method_hover) . '">';
|
||||
|
||||
if ($op_subject != '') { $output_html .= '<span class="subject">' . $op_subject . '</span><br>'; }
|
||||
if (($op_email != '') && ($show_email != false)) { $output_html .= '<a href="mailto:' . $op_email . '">';}
|
||||
|
||||
$output_html .= '<span class="';
|
||||
if(($op_email != '') && ($show_email != false)) { $output_html .= 'link '; } $output_html .= 'name">' . $op_name . '</span>'; if ($op_email != '') { $output_html .= '</a>'; } $output_html .= '</div>';
|
||||
|
||||
|
||||
$output_html .='
|
||||
<div class="stats">
|
||||
Replies: ' . $info_replies . ' Posters: ' . $info_uniqueids . '
|
||||
</div>';
|
||||
|
||||
|
||||
$output_html .= '
|
||||
<blockquote class="post-content">
|
||||
' . $op_body;
|
||||
|
||||
if (($current_page == 'index') && ($replies_omitted > 1)) {
|
||||
$output_html .= '<br><br><div class="omitted"> ' . $replies_omitted . ' Replies omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
} elseif (($current_page == 'index') && ($replies_omitted > 0)) {
|
||||
$output_html .= '<br><br><div class="omitted"> ' . $replies_omitted . ' Reply omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
}
|
||||
$output_html .= '
|
||||
</blockquote>
|
||||
|
||||
</div>
|
||||
|
||||
</div>';
|
||||
|
||||
//reset stuff
|
||||
$info_locked = 0;
|
||||
$info_sticky = 0;
|
||||
$info_autosage = 0;
|
||||
|
@ -1,244 +0,0 @@
|
||||
<div class="thread <?php echo $post_number_op ?>">
|
||||
|
||||
<div class="post op" id="<?php echo $post_number_op; ?>">
|
||||
<?php
|
||||
if ($op_file[0][0] == "deleted") {
|
||||
echo '<div class="post-file"><div class="file-info deleted">File Deleted</div><div class="post-image"><img class="file-deleted" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_deleted . '"/></div></div>';
|
||||
}
|
||||
elseif ($op_file[0][0] != '') {
|
||||
|
||||
echo '<div class="post-file" data-file="'.$op_file[0][0].'">';
|
||||
echo '<div class="file-info">';
|
||||
if ($original_filename == true && strlen($op_file[0][2]) > $max_filename ) {
|
||||
echo 'File: <a title="' . $op_file[0][2] . '" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
echo substr($op_file[0][2], 0, $max_filename) . '(...).' . getExt($op_file[0][2]);
|
||||
echo '</a>';
|
||||
} elseif ($original_filename == true) {
|
||||
echo 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
echo $op_file[0][2];
|
||||
echo '</a>';
|
||||
} else {
|
||||
echo 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
echo $op_file[0][1];
|
||||
echo '</a>';
|
||||
}
|
||||
|
||||
if (isset($file_download)) {
|
||||
switch($file_download) {
|
||||
case 'original':
|
||||
echo ' <a title="Download as ' . $op_file[0][2] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" download="' . $op_file[0][2] . '">➜</a>';
|
||||
break;
|
||||
case 'server':
|
||||
echo ' <a title="Download as ' . $op_file[0][1] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" download="' . $op_file[0][1] . '">➜</a>';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($op_file[0][0] == 'image') {
|
||||
echo ' (' . formatBytes($op_file[0][4]) . ', ' . $op_file[0][3] . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="'.$op_file[0][0].'">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
|
||||
$thmb_width = preg_replace('/x[^x]*$/', '', $op_file[0][7]);
|
||||
$thmb_height = preg_replace('/^[^x]*x/', '', $op_file[0][7]);
|
||||
$full_width = preg_replace('/x[^x]*$/', '', $op_file[0][3]);
|
||||
$full_height = preg_replace('/^[^x]*x/', '', $op_file[0][3]);
|
||||
|
||||
if ($op_file[0][5] != "1") {
|
||||
echo '<img img-id="'.$post_number_op.'" class="thumb" width="'.$thmb_width.'" height="'.$thmb_height.'" src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][6] . '"/>';
|
||||
} else {
|
||||
echo '<img img-id="'.$post_number_op.'" class="thumb" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_spoiler . '"/>';
|
||||
}
|
||||
echo '<img img-id="'.$post_number_op.'" class="expand dnone" data-width="'.$full_width.'" data-height="'.$full_height.'" img-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '"/>';
|
||||
//image full
|
||||
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
if (preg_match('/audio/', $op_file[0][0])) {
|
||||
echo ' (' . formatBytes($op_file[0][4]) . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="'.$op_file[0][0].'">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
echo '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_audio . '"/>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
if (preg_match('/video/', $op_file[0][0])) {
|
||||
echo ' (' . formatBytes($op_file[0][4]) . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="video">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
echo '<img class="thumb" vid-id="'.$post_number_op.'" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_video . '"/>';
|
||||
echo ' <video class="dnone" vid-type="'.$op_file[0][0].'" vid-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" vid-id="'.$post_number_op.'" width="320" height="240" controls autoplay>
|
||||
Your browser does not support the video tag.
|
||||
</video>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
if ($op_file[0][0] == 'download') {
|
||||
echo ' (' . formatBytes($op_file[0][4]) . ')';
|
||||
echo '</div>';
|
||||
echo '<div class="post-image" data-file="'.$op_file[0][0].'">';
|
||||
echo '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
echo '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_download . '"/>';
|
||||
echo '</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
|
||||
//reset files
|
||||
$op_file = false;
|
||||
|
||||
?>
|
||||
<div class="post-info">
|
||||
|
||||
<?php if ($post_buttons == true) {
|
||||
echo '
|
||||
<details>
|
||||
<summary></summary>
|
||||
<form name="post_button" action="' . $prefix_folder . '/delete-report.php" method="post">
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
';
|
||||
if ($mod_level > 0) {
|
||||
echo '<tr><td><div class="small"><b>Moderator Tools:</b></div>';
|
||||
if ($config['mod']['thread_sticky'] <= $mod_level) {
|
||||
if ($info_sticky == 0) {
|
||||
echo '<input type="submit" name="sticky" value="Sticky"> ';
|
||||
} else {
|
||||
echo '<input type="submit" name="sticky" value="Unsticky"> ';
|
||||
}
|
||||
}
|
||||
if ($config['mod']['thread_lock'] <= $mod_level) {
|
||||
if ($info_locked == 0) {
|
||||
echo '<input type="submit" name="lock" value="Lock"> ';
|
||||
} else {
|
||||
echo '<input type="submit" name="lock" value="Unlock"> ';
|
||||
}
|
||||
}
|
||||
if ($config['mod']['thread_autosage'] <= $mod_level) {
|
||||
if ($info_autosage == 0) {
|
||||
echo '<input type="submit" name="autosage" value="Autosage"> ';
|
||||
} else {
|
||||
echo '<input type="submit" name="autosage" value="Unautosage"> ';
|
||||
}
|
||||
}
|
||||
if ($config['mod']['ban'] <= $mod_level) {
|
||||
echo '<details><summary>Ban</summary><table id="post-form" style="width:initial;">
|
||||
<tbody>
|
||||
<tr><th>Reason:</th><td><input type="text" name="ban-reason" size="25" maxlength="256" autocomplete="off" placeholder="Reason"></td></tr>
|
||||
<tr><th>Duration:</th><td>
|
||||
<select name="ban-expire">
|
||||
<option value="permanent">Permanent</option>
|
||||
<option value="31104000">1 Year</option>
|
||||
<option value="7776000">3 Months</option>
|
||||
<option value="2592000">1 Month</option>
|
||||
<option value="1209600">2 Weeks</option>
|
||||
<option value="604800">1 Week</option>
|
||||
<option value="259200">3 Days</option>
|
||||
<option value="86400">1 Day</option>
|
||||
<option value="3600">1 Hour</option>
|
||||
<option value="warning" selected>Warning</option>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><th>Public:</th><td><label for="public_' . $post_number_op . '"><input type="checkbox" id="public_' . $post_number_op . '" name="public">Public Ban Message</label><input type="text" name="ban-message" size="25" maxlength="256" autocomplete="off" placeholder="(User was banned for this post.)"></td></tr>
|
||||
<tr><th style="visibility:hidden;"></th><td><details style="float:right;"><summary style="text-align:right;">Ban</summary><input type="submit" name="create-ban" value="Create Ban"></details></td></tr>
|
||||
</tbody></table></details>';
|
||||
}
|
||||
|
||||
echo '<hr></td></tr>';
|
||||
}
|
||||
|
||||
echo '
|
||||
|
||||
<input type="hidden" name="board" value="' . $current_board . '"/>
|
||||
<input type="hidden" name="thread" value="' . $post_number_op . '"/>
|
||||
<input type="hidden" name="reply" value="' . $post_number_op . '"/>
|
||||
<tr>
|
||||
<td><input type="password" id="password_' . $post_number_op . '" name="password" maxlength="256" placeholder="Password" value="'. $_COOKIE['post_password'] . '"></td>
|
||||
<td><input type="submit" name="delete" value="Delete"></td>
|
||||
<td><label for="file_' . $post_number_op . '"><input type="checkbox" id="file_' . $post_number_op . '" name="file">File only</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" id="reason_' . $post_number_op . '" name="reason" maxlength="256" autocomplete="off" value="" placeholder="Reason"></td>
|
||||
<td><input type="submit" name="report" value="Report"></td>
|
||||
<td><label for="global_' . $post_number_op . '"><input type="checkbox" id="global_' . $post_number_op . '" name="global">Global</label></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</details>';
|
||||
}?>
|
||||
|
||||
<?php if ($op_subject != '') { echo '<span class="subject">' . $op_subject . ' </span>'; }?>
|
||||
<?php if (($op_email != '') && ($show_email != false)) { echo '<a href="mailto:' . $op_email . '">';}?><span class="<?php if(($op_email != '') && ($show_email != false)) { echo 'link '; } ?>name"><?php echo $op_name; ?></span><?php if ($op_email != '') { echo '</a>'; }?>
|
||||
<span class="post-time" data-timestamp="<?php echo $op_time;?>" data-tooltip="<?php echo timeConvert($op_time, $time_method_hover); ?>"><?php echo timeConvert($op_time, $time_method); ?></span>
|
||||
|
||||
<?php
|
||||
if ($display_id == true) {
|
||||
echo '<span class="id">ID: ';
|
||||
if ($op_email == "sage") {
|
||||
echo 'Heaven';
|
||||
} else {
|
||||
$idhash = md5($current_board . $post_number_op);
|
||||
$op_id = crypt($op_ip, $idhash);
|
||||
$op_id = preg_replace("/\./", "", $op_id);
|
||||
echo substr($op_id, -8);
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo '<span class="post-number">';
|
||||
echo '<a class="anchor" name="' . $post_number_op . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">No.</a>';
|
||||
echo '<a class="click" num="' . $post_number_op . '" id="cite_' . $post_number_op . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#q' . $post_number_op . '">' . $post_number_op . '</a>';
|
||||
echo ' </span>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($info_sticky == 1) {
|
||||
echo '<span title="Sticky" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_sticky . '"/></span>';
|
||||
}
|
||||
if ($info_locked == 1) {
|
||||
echo '<span title="Locked" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_locked . '"/></span>';
|
||||
}
|
||||
if ($info_autosage == 1) {
|
||||
echo '<span title="Autosage" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_autosage . '"/></span>';
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($current_page === 'index') {
|
||||
echo ' <span>[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '">Reply</a>]</span>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
<blockquote class="post-content">
|
||||
<?php echo $op_body; ?>
|
||||
<?php
|
||||
if (($current_page == 'index') && ($replies_omitted > 1)) {
|
||||
echo '<br><br><div class="omitted"> ' . $replies_omitted . ' Replies omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
} elseif (($current_page == 'index') && ($replies_omitted > 0)) {
|
||||
echo '<br><br><div class="omitted"> ' . $replies_omitted . ' Reply omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
}
|
||||
?>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
//reset stuff
|
||||
$info_locked = 0;
|
||||
$info_sticky = 0;
|
||||
$info_autosage = 0;
|
||||
?>
|
235
templates/thread.php
Normal file
235
templates/thread.php
Normal file
@ -0,0 +1,235 @@
|
||||
<?php
|
||||
|
||||
$output_html .= '<div class="thread" data-thread="' . $post_number_op . '">';
|
||||
|
||||
$output_html .= '<div class="post op" id="' . $post_number_op . '">';
|
||||
|
||||
if ($op_file[0][0] == "deleted") {
|
||||
$output_html .= '<div class="post-file"><div class="file-info deleted">File Deleted</div><div class="post-image"><img class="file-deleted" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_deleted . '"/></div></div>';
|
||||
}
|
||||
elseif ($op_file[0][0] != '') {
|
||||
|
||||
$output_html .= '<div class="post-file" data-file="'.$op_file[0][0].'">';
|
||||
$output_html .= '<div class="file-info">';
|
||||
if ($original_filename == true && strlen($op_file[0][2]) > $max_filename ) {
|
||||
$output_html .= 'File: <a title="' . $op_file[0][2] . '" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
$output_html .= substr($op_file[0][2], 0, $max_filename) . '(...).' . getExt($op_file[0][2]);
|
||||
$output_html .= '</a>';
|
||||
} elseif ($original_filename == true) {
|
||||
$output_html .= 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
$output_html .= $op_file[0][2];
|
||||
$output_html .= '</a>';
|
||||
} else {
|
||||
$output_html .= 'File: <a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
$output_html .= $op_file[0][1];
|
||||
$output_html .= '</a>';
|
||||
}
|
||||
|
||||
if (isset($file_download)) {
|
||||
switch($file_download) {
|
||||
case 'original':
|
||||
$output_html .= ' <a title="Download as ' . $op_file[0][2] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" download="' . $op_file[0][2] . '">➜</a>';
|
||||
break;
|
||||
case 'server':
|
||||
$output_html .= ' <a title="Download as ' . $op_file[0][1] . '" class="download" href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" download="' . $op_file[0][1] . '">➜</a>';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ($op_file[0][0] == 'image') {
|
||||
$output_html .= ' (' . formatBytes($op_file[0][4]) . ', ' . $op_file[0][3] . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="'.$op_file[0][0].'">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
|
||||
$thmb_width = preg_replace('/x[^x]*$/', '', $op_file[0][7]);
|
||||
$thmb_height = preg_replace('/^[^x]*x/', '', $op_file[0][7]);
|
||||
$full_width = preg_replace('/x[^x]*$/', '', $op_file[0][3]);
|
||||
$full_height = preg_replace('/^[^x]*x/', '', $op_file[0][3]);
|
||||
|
||||
if ($op_file[0][5] != "1") {
|
||||
$output_html .= '<img img-id="'.$post_number_op.'" class="thumb" width="'.$thmb_width.'" height="'.$thmb_height.'" src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][6] . '"/>';
|
||||
} else {
|
||||
$output_html .= '<img img-id="'.$post_number_op.'" class="thumb" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_spoiler . '"/>';
|
||||
}
|
||||
$output_html .= '<img img-id="'.$post_number_op.'" class="expand dnone" data-width="'.$full_width.'" data-height="'.$full_height.'" img-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '"/>';
|
||||
//image full
|
||||
|
||||
$output_html .= '</a>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if (preg_match('/audio/', $op_file[0][0])) {
|
||||
$output_html .= ' (' . formatBytes($op_file[0][4]) . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="'.$op_file[0][0].'">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
$output_html .= '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_audio . '"/>';
|
||||
$output_html .= '</a>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if (preg_match('/video/', $op_file[0][0])) {
|
||||
$output_html .= ' (' . formatBytes($op_file[0][4]) . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="video">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
$output_html .= '<img class="thumb" vid-id="'.$post_number_op.'" width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_video . '"/>';
|
||||
$output_html .= '</a>';
|
||||
$output_html .= '<video class="dnone" vid-type="'.$op_file[0][0].'" vid-src="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '" vid-id="'.$post_number_op.'" width="320" height="240" controls autoplay> Your browser does not support the video tag.</video>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
if ($op_file[0][0] == 'download') {
|
||||
$output_html .= ' (' . formatBytes($op_file[0][4]) . ')';
|
||||
$output_html .= '</div>';
|
||||
$output_html .= '<div class="post-image" data-file="'.$op_file[0][0].'">';
|
||||
$output_html .= '<a href="' . $prefix_folder . '/' . $uploads_folder . '/' . $current_board . '/' . $op_file[0][1] . '">';
|
||||
$output_html .= '<img width="'.$thumb_res_reply.'" height="'.$thumb_res_reply.'" src="' . $prefix_folder . '/assets/img/' . $thumb_download . '"/>';
|
||||
$output_html .= '</a>';
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
$output_html .= '</div>';
|
||||
}
|
||||
|
||||
//reset files
|
||||
$op_file = false;
|
||||
|
||||
|
||||
$output_html .= '<div class="post-info">';
|
||||
|
||||
if ($post_buttons == true) {
|
||||
$output_html .= '
|
||||
<details>
|
||||
<summary></summary>
|
||||
<form name="post_button" action="' . $prefix_folder . '/delete-report.php" method="post">
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
';
|
||||
if ($mod_level > 0) {
|
||||
$output_html .= '<tr><td><div class="small"><b>Moderator Tools:</b></div>';
|
||||
if ($config['mod']['thread_sticky'] <= $mod_level) {
|
||||
if ($info_sticky == 0) {
|
||||
$output_html .= '<input type="submit" name="sticky" value="Sticky"> ';
|
||||
} else {
|
||||
$output_html .= '<input type="submit" name="sticky" value="Unsticky"> ';
|
||||
}
|
||||
}
|
||||
if ($config['mod']['thread_lock'] <= $mod_level) {
|
||||
if ($info_locked == 0) {
|
||||
$output_html .= '<input type="submit" name="lock" value="Lock"> ';
|
||||
} else {
|
||||
$output_html .= '<input type="submit" name="lock" value="Unlock"> ';
|
||||
}
|
||||
}
|
||||
if ($config['mod']['thread_autosage'] <= $mod_level) {
|
||||
if ($info_autosage == 0) {
|
||||
$output_html .= '<input type="submit" name="autosage" value="Autosage"> ';
|
||||
} else {
|
||||
$output_html .= '<input type="submit" name="autosage" value="Unautosage"> ';
|
||||
}
|
||||
}
|
||||
if ($config['mod']['ban'] <= $mod_level) {
|
||||
$output_html .= '<details><summary>Ban</summary><table id="post-form" style="width:initial;">
|
||||
<tbody>
|
||||
<tr><th>Reason:</th><td><input type="text" name="ban-reason" size="25" maxlength="256" autocomplete="off" placeholder="Reason"></td></tr>
|
||||
<tr><th>Duration:</th><td>
|
||||
<select name="ban-expire">
|
||||
<option value="permanent">Permanent</option>
|
||||
<option value="31104000">1 Year</option>
|
||||
<option value="7776000">3 Months</option>
|
||||
<option value="2592000">1 Month</option>
|
||||
<option value="1209600">2 Weeks</option>
|
||||
<option value="604800">1 Week</option>
|
||||
<option value="259200">3 Days</option>
|
||||
<option value="86400">1 Day</option>
|
||||
<option value="3600">1 Hour</option>
|
||||
<option value="warning" selected>Warning</option>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr><th>Public:</th><td><label for="public_' . $post_number_op . '"><input type="checkbox" id="public_' . $post_number_op . '" name="public">Public Ban Message</label><input type="text" name="ban-message" size="25" maxlength="256" autocomplete="off" placeholder="(User was banned for this post.)"></td></tr>
|
||||
<tr><th style="visibility:hidden;"></th><td><details style="float:right;"><summary style="text-align:right;">Ban</summary><input type="submit" name="create-ban" value="Create Ban"></details></td></tr>
|
||||
</tbody></table></details>';
|
||||
}
|
||||
|
||||
$output_html .= '<hr></td></tr>';
|
||||
}
|
||||
|
||||
$output_html .= '
|
||||
|
||||
<input type="hidden" name="board" value="' . $current_board . '"/>
|
||||
<input type="hidden" name="thread" value="' . $post_number_op . '"/>
|
||||
<input type="hidden" name="reply" value="' . $post_number_op . '"/>
|
||||
<tr>
|
||||
<td><input type="password" id="password_' . $post_number_op . '" name="password" maxlength="256" placeholder="Password" value="' . $_COOKIE['post_password'] . '"></td>
|
||||
<td><input type="submit" name="delete" value="Delete"></td>
|
||||
<td><label for="file_' . $post_number_op . '"><input type="checkbox" id="file_' . $post_number_op . '" name="file">File only</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="text" id="reason_' . $post_number_op . '" name="reason" maxlength="256" autocomplete="off" value="" placeholder="Reason"></td>
|
||||
<td><input type="submit" name="report" value="Report"></td>
|
||||
<td><label for="global_' . $post_number_op . '"><input type="checkbox" id="global_' . $post_number_op . '" name="global">Global</label></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</details>';
|
||||
|
||||
}
|
||||
|
||||
if ($op_subject != '') { $output_html .= '<span class="subject">' . $op_subject . ' </span>'; }
|
||||
if (($op_email != '') && ($show_email != false)) { $output_html .= '<a href="mailto:' . $op_email . '">';} $output_html .= '<span class="'; if(($op_email != '') && ($show_email != false)) { $output_html .= 'link '; } $output_html .= 'name">' . $op_name . '</span>'; if ($op_email != '') { $output_html .= '</a>'; }
|
||||
$output_html .= '<span class="post-time" data-timestamp="' . $op_time . '" data-tooltip="' . timeConvert($op_time, $time_method_hover) . '"> ' . timeConvert($op_time, $time_method) . '</span>';
|
||||
|
||||
if ($display_id == true) {
|
||||
$output_html .= '<span class="id"> ID: ';
|
||||
if ($op_email == "sage") {
|
||||
$output_html .= 'Heaven';
|
||||
} else {
|
||||
$idhash = md5($current_board . $post_number_op);
|
||||
$op_id = crypt($op_ip, $idhash);
|
||||
$op_id = preg_replace("/\./", "", $op_id);
|
||||
$output_html .= substr($op_id, -8);
|
||||
}
|
||||
$output_html .= '</span>';
|
||||
}
|
||||
|
||||
$output_html .= '<span class="post-number">';
|
||||
$output_html .= '<a class="anchor" name="' . $post_number_op . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '"> No.</a>';
|
||||
$output_html .= '<a class="click" num="' . $post_number_op . '" id="cite_' . $post_number_op . '" href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#q' . $post_number_op . '">' . $post_number_op . '</a>';
|
||||
$output_html .= ' </span>';
|
||||
|
||||
if ($info_sticky == 1) {
|
||||
$output_html .= '<span title="Sticky" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_sticky . '"/></span>';
|
||||
}
|
||||
if ($info_locked == 1) {
|
||||
$output_html .= '<span title="Locked" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_locked . '"/></span>';
|
||||
}
|
||||
if ($info_autosage == 1) {
|
||||
$output_html .= '<span title="Autosage" class="icon"><img width="16" height="16" src="'. $prefix_folder .'/assets/img/' . $icon_autosage . '"/></span>';
|
||||
}
|
||||
|
||||
if ($current_page === 'index') {
|
||||
$output_html .= ' <span>[<a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '">Reply</a>]</span>';
|
||||
}
|
||||
|
||||
$output_html .= '</div>
|
||||
<blockquote class="post-content">';
|
||||
$output_html .= $op_body;
|
||||
|
||||
if (($current_page == 'index') && ($replies_omitted > 1)) {
|
||||
$output_html .= '<br><br><div class="omitted"> ' . $replies_omitted . ' Replies omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
} elseif (($current_page == 'index') && ($replies_omitted > 0)) {
|
||||
$output_html .= '<br><br><div class="omitted"> ' . $replies_omitted . ' Reply omitted. Click <a href="' . $prefix_folder . '/' . $main_file . '?board=' . $current_board . '&thread=' . $post_number_op . '#' . $post_number_op . '">here</a> to view.</div>';
|
||||
}
|
||||
$output_html .= '
|
||||
</blockquote>
|
||||
</div>
|
||||
|
||||
</div>';
|
||||
|
||||
//reset stuff
|
||||
$info_locked = 0;
|
||||
$info_sticky = 0;
|
||||
$info_autosage = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user