chore: format views and remove some unused classes and divs

This commit is contained in:
Floorb 2023-06-01 17:48:58 -04:00
parent 19b2deda2a
commit 5362be443c
15 changed files with 305 additions and 236 deletions

View file

@ -51,9 +51,7 @@
</style> </style>
<main class="bd-main"> <main class="bd-main">
<div class="preloader"></div> <div class="container">
<div class="bd-side-background"></div>
<div class="bd-main-container container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<article class="message is-info"> <article class="message is-info">
@ -67,7 +65,8 @@
<h1 class="title is-4">Pastes Archive</h1> <h1 class="title is-4">Pastes Archive</h1>
<form class="table_filterer" method="GET"> <form class="table_filterer" method="GET">
<label><i class="fa fa-search"></i> <label><i class="fa fa-search"></i>
<input class="search" type="search" name="q" placeholder="Filter..." value="<?= pp_html_escape($filter_value); ?>" /> <input class="search" type="search" name="q" placeholder="Filter..."
value="<?= pp_html_escape($filter_value); ?>"/>
</label> </label>
<label> <label>
Show&nbsp; Show&nbsp;

View file

@ -14,8 +14,8 @@ $flashes = getFlashes();
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<title> <title>
<?php <?php
@ -97,9 +97,11 @@ $flashes = getFlashes();
</a> </a>
<?php if ($current_user !== null && $current_user->role >= User::ROLE_MODERATOR): ?> <?php if ($current_user !== null && $current_user->role >= User::ROLE_MODERATOR): ?>
<?php $has_reports = Report::where(['open' => true])->count() > 0; ?> <?php $has_reports = Report::where(['open' => true])->count() > 0; ?>
<a class="button navbar-item mx-2" href="/admin" <?= $has_reports ? 'style="color: red;"' : '' ?>> <a class="button navbar-item mx-2"
href="/admin" <?= $has_reports ? 'style="color: red;"' : '' ?>>
<span class="icon has-text-info"> <span class="icon has-text-info">
<i class="fa <?= $has_reports ? 'fa-exclamation' : 'fa-toolbox' ?>" aria-hidden="true" <?= $has_reports ? 'style="color: red;"' : '' ?>></i> <i class="fa <?= $has_reports ? 'fa-exclamation' : 'fa-toolbox' ?>"
aria-hidden="true" <?= $has_reports ? 'style="color: red;"' : '' ?>></i>
</span> </span>
<span>Admin</span> <span>Admin</span>
</a> </a>
@ -107,14 +109,15 @@ $flashes = getFlashes();
<?php endif; /* !$site_is_private */ ?> <?php endif; /* !$site_is_private */ ?>
<div class="navbar-item has-dropdown is-hoverable"> <div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" role="presentation"><?= pp_html_escape($current_user->username) ?></a> <a class="navbar-link"
role="presentation"><?= pp_html_escape($current_user->username) ?></a>
<div class="navbar-dropdown"> <div class="navbar-dropdown">
<a class="navbar-item" href="<?= urlForMember($current_user) ?>">Pastes</a> <a class="navbar-item" href="<?= urlForMember($current_user) ?>">Pastes</a>
<a class="navbar-item" href="<?= urlForPage('profile') ?>">Settings</a> <a class="navbar-item" href="<?= urlForPage('profile') ?>">Settings</a>
<hr class="navbar-divider"/> <hr class="navbar-divider"/>
<form action="<?= urlForPage('logout') ?>" method="POST"> <form action="<?= urlForPage('logout') ?>" method="POST">
<input class="button navbar-link" type="submit" value="Logout" <input class="button navbar-link" type="submit" value="Logout"
style="border:none;padding: 0.375rem 1rem;" /> style="border:none;padding: 0.375rem 1rem;"/>
</form> </form>
</div> </div>
</div> </div>
@ -140,7 +143,8 @@ $flashes = getFlashes();
<span>Events</span> <span>Events</span>
</a> </a>
<?php endif; ?> <?php endif; ?>
<a class="button is-info modal-button" data-target="#signin" href="/login?login">Sign In / Up</a> <a class="button is-info modal-button" data-target="#signin" href="/login?login">Sign In /
Up</a>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
@ -150,7 +154,8 @@ $flashes = getFlashes();
</nav> </nav>
<?php if ($current_user): ?> <?php if ($current_user): ?>
<div class="hidden" id="js-data-holder" data-user-id="<?= $current_user->id ?>" data-csrf-token="<?= $csrf_token ?>"></div> <div class="hidden" id="js-data-holder" data-user-id="<?= $current_user->id ?>"
data-csrf-token="<?= $csrf_token ?>"></div>
<?php endif; ?> <?php endif; ?>
<div id="#signin" class="modal modal-fx-fadeInScale"> <div id="#signin" class="modal modal-fx-fadeInScale">
@ -235,19 +240,19 @@ $flashes = getFlashes();
</div> </div>
<div class="field"> <div class="field">
<div class="captcha_container"> <div class="captcha_container">
<img src="/captcha?t=<?= $captcha_token = setupCaptcha() ?>" alt="CAPTCHA Image" /> <img src="/captcha?t=<?= $captcha_token = setupCaptcha() ?>" alt="CAPTCHA Image"/>
<span id="captcha_refresh" style="height: 100%;"> <span id="captcha_refresh" style="height: 100%;">
<a href="javascript:void(0)"> <a href="javascript:void(0)">
<i class="fa fa-refresh" style="height: 100%;"></i> <i class="fa fa-refresh" style="height: 100%;"></i>
</a> </a>
</span> </span>
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>" /> <input type="hidden" name="captcha_token" value="<?= $captcha_token ?>"/>
<input type="text" class="input" name="captcha_answer" placeholder="Enter the CAPTCHA" /> <input type="text" class="input" name="captcha_answer" placeholder="Enter the CAPTCHA"/>
<p class="is-size-6 has-text-grey-light has-text-left mt-2">and press "Enter"</p> <p class="is-size-6 has-text-grey-light has-text-left mt-2">and press "Enter"</p>
</div> </div>
</div> </div>
</div> </div>
<input class="button is-link is-fullwidth my-4" type="submit" name="signup" /> <input class="button is-link is-fullwidth my-4" type="submit" name="signup"/>
<div class="field"> <div class="field">
<p style="float:left;">By signing up you agree to our <a href="page/privacy">Privacy policy </a> <p style="float:left;">By signing up you agree to our <a href="page/privacy">Privacy policy </a>
and <a href="page/rules">Site rules</a>. This site may contain material not suitable for and <a href="page/rules">Site rules</a>. This site may contain material not suitable for

View file

@ -20,11 +20,12 @@ function outputPasteCard($paste) {
</div> </div>
</div></div>'; </div></div>';
} }
?> ?>
<main class="bd-main"> <main class="bd-main">
<!-- START CONTAINER --> <!-- START CONTAINER -->
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<!-- Start Row --> <!-- Start Row -->

View file

@ -1,6 +1,6 @@
<main class="bd-main"> <main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<?php if (isset($error)): ?> <?php if (isset($error)): ?>
@ -10,10 +10,10 @@
<form method="post"> <form method="post">
<div class="field has-addons"> <div class="field has-addons">
<div class="control"> <div class="control">
<input type="hidden" name="id" value="<?= $paste->id; ?>" /> <input type="hidden" name="id" value="<?= $paste->id; ?>"/>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<input type="password" class="input" name="mypass" <input type="password" class="input" name="mypass"
placeholder="Password" /> placeholder="Password"/>
</div> </div>
</div> </div>
<button type="submit" name="submit" class="button is-info">Submit</button> <button type="submit" name="submit" class="button is-info">Submit</button>

View file

@ -35,8 +35,8 @@
</script> </script>
<main class="bd-main"> <main class="bd-main">
<!-- START CONTAINER --> <!-- START CONTAINER -->
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<!-- Start Row --> <!-- Start Row -->

View file

View file

@ -1,10 +1,12 @@
<main class="bd-main"> <main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<?php if (isset($success)): ?> <?php if (isset($success)): ?>
<div class="notification is-success"><i class="fa fa-exclamation-circle" aria-hidden="true"></i><?= pp_html_escape($success); ?></div> <div class="notification is-success"><i class="fa fa-exclamation-circle"
aria-hidden="true"></i><?= pp_html_escape($success); ?>
</div>
<?php if (isset($new_password)): ?> <?php if (isset($new_password)): ?>
<p>Your new password is as follows:</p> <p>Your new password is as follows:</p>
<code><?= pp_html_escape($new_password); ?></code> <code><?= pp_html_escape($new_password); ?></code>
@ -13,12 +15,15 @@
<?php if (isset($recovery_code)): ?> <?php if (isset($recovery_code)): ?>
<br><span class="tag is-danger is-medium">IMPORTANT!</span> <br><span class="tag is-danger is-medium">IMPORTANT!</span>
<p><b>If you wish to recover your account later, you will need the following code. Store it in a safe place!</b></p> <p><b>If you wish to recover your account later, you will need the following code. Store it in a
safe place!</b></p>
<code id="recovery"><?= pp_html_escape($recovery_code); ?></code> <code id="recovery"><?= pp_html_escape($recovery_code); ?></code>
<p>If you do not save this code, and you forget your password, there is no way to get your account back!</p> <p>If you do not save this code, and you forget your password, there is no way to get your
account back!</p>
<?php endif; ?> <?php endif; ?>
<?php elseif (isset($error)): ?> <?php elseif (isset($error)): ?>
<div class="notification is-info"><i class="fa fa-exclamation-circle" aria-hidden="true"></i><?= pp_html_escape($error); ?></p></div> <div class="notification is-info"><i class="fa fa-exclamation-circle"
aria-hidden="true"></i><?= pp_html_escape($error); ?></p></div>
<?php endif; ?> <?php endif; ?>
<?php outputFlashes($flashes); ?> <?php outputFlashes($flashes); ?>
<?php if (isset($_GET['register'])) { ?> <?php if (isset($_GET['register'])) { ?>
@ -54,20 +59,23 @@
<div class="field"> <div class="field">
<div class="notification"> <div class="notification">
<div class="captcha_container"> <div class="captcha_container">
<img src="/captcha?t=<?= $captcha_token = setupCaptcha() ?>" alt="CAPTCHA Image" /> <img src="/captcha?t=<?= $captcha_token = setupCaptcha() ?>"
alt="CAPTCHA Image"/>
<span id="captcha_refresh" style="height: 100%;"> <span id="captcha_refresh" style="height: 100%;">
<a href="javascript:void(0)"> <a href="javascript:void(0)">
<i class="fa fa-refresh" style="height: 100%;"></i> <i class="fa fa-refresh" style="height: 100%;"></i>
</a> </a>
</span> </span>
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>" /> <input type="hidden" name="captcha_token" value="<?= $captcha_token ?>"/>
<input type="text" class="input" name="captcha_answer" placeholder="Enter the CAPTCHA" /> <input type="text" class="input" name="captcha_answer"
<p class="is-size-6 has-text-grey-light has-text-left mt-2">and press "Enter"</p> placeholder="Enter the CAPTCHA"/>
<p class="is-size-6 has-text-grey-light has-text-left mt-2">and press
"Enter"</p>
</div> </div>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<input class="button is-info" type="submit" name="signup" value="Register" /> <input class="button is-info" type="submit" name="signup" value="Register"/>
</div> </div>
<hr> <hr>
</div> </div>
@ -82,7 +90,7 @@
not suitable for those aged under 18.</p> not suitable for those aged under 18.</p>
</div> </div>
</form> </form>
<?php } elseif (isset($_GET['forgotpassw'])) { ?> <?php } elseif (isset($_GET['forgotpassw'])) { ?>
<form action="/forgot" method="post"> <form action="/forgot" method="post">
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
@ -119,48 +127,48 @@
</div> </div>
</form> </form>
<?php } else { ?> <?php } else { ?>
<form action="/login" method="post"> <form action="/login" method="post">
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<h1 class="title is-4">Login</h1> <h1 class="title is-4">Login</h1>
<div class="field"> <div class="field">
<label class="label">Username</label> <label class="label">Username</label>
<div class="control has-icons-left has-icons-right"> <div class="control has-icons-left has-icons-right">
<input type="text" class="input" name="username" placeholder="Username"> <input type="text" class="input" name="username" placeholder="Username">
<span class="icon is-small is-left"> <span class="icon is-small is-left">
<i class="fas fa-user"></i> <i class="fas fa-user"></i>
</span> </span>
</div>
</div> </div>
</div> <div class="field">
<div class="field"> <label class="label">Password</label>
<label class="label">Password</label> <div class="control has-icons-left has-icons-right">
<div class="control has-icons-left has-icons-right"> <input type="password" class="input" name="password" placeholder="Password">
<input type="password" class="input" name="password" placeholder="Password"> <span class="icon is-small is-left">
<span class="icon is-small is-left">
<i class="fas fa-key"></i> <i class="fas fa-key"></i>
</span> </span>
</div>
</div> </div>
</div> <div class="field">
<div class="field"> <div class="b-checkbox is-info is-inline">
<div class="b-checkbox is-info is-inline"> <input class="is-checkradio is-info" id="rememberme" name="remember_me"
<input class="is-checkradio is-info" id="rememberme" name="remember_me" type="checkbox" checked="">
type="checkbox" checked=""> <label for="rememberme">
<label for="rememberme"> Remember Me
Remember Me </label>
</label> </div>
</div> </div>
<div class="field">
<input class="button is-info" type="submit" name="signin" value="Login"/>
</div>
<hr>
</div> </div>
<div class="field"> <div class="column">
<input class="button is-info" type="submit" name="signin" value="Login" /> </div>
<div class="column">
</div> </div>
<hr>
</div> </div>
<div class="column"> </form>
</div>
<div class="column">
</div>
</div>
</form>
<?php } ?> <?php } ?>
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">

View file

@ -1,7 +1,7 @@
<link rel="stylesheet" href="theme/bulma/css/bulma-tagsinput.min.css"/> <link rel="stylesheet" href="theme/bulma/css/bulma-tagsinput.min.css"/>
<main class="bd-main"> <main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<?php if (isset($global_site_info['banner'])): ?> <?php if (isset($global_site_info['banner'])): ?>
@ -76,7 +76,7 @@
<small>Type a comma to separate each tag.</small> <small>Type a comma to separate each tag.</small>
<div class="control"> <div class="control">
<input name="tag_input" class="input js-tag-input" id="field_tags" <input name="tag_input" class="input js-tag-input" id="field_tags"
value="<?= (isset($_POST['tag_input'])) ? pp_html_escape($_POST['tag_input']) : ''; ?>" /> value="<?= (isset($_POST['tag_input'])) ? pp_html_escape($_POST['tag_input']) : ''; ?>"/>
</div> </div>
</div> </div>
</div> </div>
@ -93,7 +93,9 @@
<div class="level-item is-pulled-left mr-1"> <div class="level-item is-pulled-left mr-1">
<div class="field"> <div class="field">
<div class="subtitle has-text-weight-semibold " <div class="subtitle has-text-weight-semibold "
style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">Expiry</div> style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">
Expiry
</div>
<div class="control"> <div class="control">
<div class="select"> <div class="select">
<?php <?php
@ -107,8 +109,8 @@
<select name="paste_expire_date"> <select name="paste_expire_date">
<?= optionsForSelect( <?= optionsForSelect(
['Never', 'View Once', '10 minutes', '1 hour', '1 day', '1 week', '2 weeks', '1 month'], ['Never', 'View Once', '10 minutes', '1 hour', '1 day', '1 week', '2 weeks', '1 month'],
['N', 'self', '0Y0M0DT0H10M', '1H', '1D', '1W', '2W', '1M'], ['N', 'self', '0Y0M0DT0H10M', '1H', '1D', '1W', '2W', '1M'],
$post_expire $post_expire
); ?> ); ?>
</select> </select>
@ -119,7 +121,8 @@
<div class="level-item is-pulled-left mx-1"> <div class="level-item is-pulled-left mx-1">
<div class="field"> <div class="field">
<div class="subtitle has-text-weight-semibold " <div class="subtitle has-text-weight-semibold "
style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">Visibility style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">
Visibility
&nbsp;&nbsp; &nbsp;&nbsp;
</div> </div>
<div class="control"> <div class="control">
@ -133,14 +136,17 @@
} }
?> ?>
<select name="visibility"> <select name="visibility">
<option value="0" <?php echo ($post_visibility == "0") ? 'selected="selected"' : ''; ?>> <option
value="0" <?php echo ($post_visibility == "0") ? 'selected="selected"' : ''; ?>>
Public Public
</option> </option>
<option value="1" <?php echo ($post_visibility == "1") ? 'selected="selected"' : ''; ?>> <option
value="1" <?php echo ($post_visibility == "1") ? 'selected="selected"' : ''; ?>>
Unlisted Unlisted
</option> </option>
<?php if ($current_user) { ?> <?php if ($current_user) { ?>
<option value="2" <?php echo ($post_visibility == "2") ? 'selected="selected"' : ''; ?>> <option
value="2" <?php echo ($post_visibility == "2") ? 'selected="selected"' : ''; ?>>
Private Private
</option> </option>
<?php } else { ?> <?php } else { ?>
@ -186,20 +192,23 @@
<?php if ($captcha_enabled && $current_user === null): ?> <?php if ($captcha_enabled && $current_user === null): ?>
<div class="is-one-quarter"> <div class="is-one-quarter">
<div class="captcha_container"> <div class="captcha_container">
<img src="/captcha?t=<?= $captcha_token = setupCaptcha() ?>" alt="CAPTCHA Image" /> <img src="/captcha?t=<?= $captcha_token = setupCaptcha() ?>"
alt="CAPTCHA Image"/>
<span id="captcha_refresh" style="height: 100%;"> <span id="captcha_refresh" style="height: 100%;">
<a href="javascript:void(0)"> <a href="javascript:void(0)">
<i class="fa fa-refresh" style="height: 100%;"></i> <i class="fa fa-refresh" style="height: 100%;"></i>
</a> </a>
</span> </span>
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>" /> <input type="hidden" name="captcha_token" value="<?= $captcha_token ?>"/>
<input type="text" class="input" name="captcha_answer" placeholder="Enter the CAPTCHA" /> <input type="text" class="input" name="captcha_answer"
<p class="is-size-6 has-text-grey-light has-text-left mt-2">and press "Enter"</p> placeholder="Enter the CAPTCHA"/>
<p class="is-size-6 has-text-grey-light has-text-left mt-2">and press
"Enter"</p>
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (isset($csrf_token)): ?> <?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>

View file

@ -1,15 +1,16 @@
<main class="bd-main"> <main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<?php if (isset($page)): ?> <?php if (isset($page)): ?>
<h1 class="title is-4"><?= pp_html_escape($page->page_title); ?><h1> <h1 class="title is-4"><?= pp_html_escape($page->page_title); ?>
<?= $page->page_content; ?> <h1>
<?php else: ?> <?= $page->page_content; ?>
<h1 class="title is-4">Page not found.</h1> <?php else: ?>
<p class="help is-danger subtitle is-6">A page with that name doesn't seem to exist.</p> <h1 class="title is-4">Page not found.</h1>
<?php endif; ?> <p class="help is-danger subtitle is-6">A page with that name doesn't seem to exist.</p>
<?php endif; ?>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,5 +1,5 @@
<main class="bd-main"> <main class="bd-main">
<div class="bd-main-container container"> <div class="container">
<div class="bd-lead"> <div class="bd-lead">
<div class="rule"> <div class="rule">
<h2>The short version</h2> <h2>The short version</h2>
@ -34,7 +34,8 @@
</ul> </ul>
<p>Additionally, cookies of users that are logged into the service may contain:</p> <p>Additionally, cookies of users that are logged into the service may contain:</p>
<ul> <ul>
<li>A random authentication secret ("remember me" token) unique to the user to persist their login</li> <li>A random authentication secret ("remember me" token) unique to the user to persist their login
</li>
</ul> </ul>
<p>These data are required for authentication, user security, or customization, which are all <p>These data are required for authentication, user security, or customization, which are all
"legitimate interests" as above, and thus we cannot ask for consent to use these "legitimate interests" as above, and thus we cannot ask for consent to use these

View file

@ -1,6 +1,6 @@
<main class="bd-main"> <main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<h1 class="title is-5">Total Pastes: <?= $total_user_pastes ?></h1> <h1 class="title is-5">Total Pastes: <?= $total_user_pastes ?></h1>
@ -79,7 +79,7 @@
<label class="label" for="password_confirmation">Confirm Password</label> <label class="label" for="password_confirmation">Confirm Password</label>
<div class="control has-icons-left has-icons-right"> <div class="control has-icons-left has-icons-right">
<input type="password" class="input" name="cpassword" id="password_confirmation" <input type="password" class="input" name="cpassword" id="password_confirmation"
placeholder="Confirm Password" /> placeholder="Confirm Password"/>
<span class="icon is-small is-left"> <span class="icon is-small is-left">
<i class="fas fa-key"></i> <i class="fas fa-key"></i>
</span> </span>
@ -87,7 +87,7 @@
</div> </div>
<div class="field"> <div class="field">
<?php if (isset($csrf_token)): ?> <?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<?php endif; ?> <?php endif; ?>
<button type="submit" name="submit" class="button is-info">Submit</button> <button type="submit" name="submit" class="button is-info">Submit</button>
</div> </div>

View file

@ -1,6 +1,6 @@
<main class="bd-main"> <main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<h1 class="title is-5">Reporting <b><?= pp_html_escape($paste->title) ?></b></h1> <h1 class="title is-5">Reporting <b><?= pp_html_escape($paste->title) ?></b></h1>
@ -19,7 +19,7 @@
</div> </div>
<div class="field"> <div class="field">
<?php if (isset($csrf_token)): ?> <?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<?php endif; ?> <?php endif; ?>
<button type="submit" class="button is-info">Report</button> <button type="submit" class="button is-info">Report</button>
</div> </div>

View file

@ -1,7 +1,7 @@
<main class="bd-main"> <main class="bd-main">
<!-- START CONTAINER --> <!-- START CONTAINER -->
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<!-- Start Row --> <!-- Start Row -->
@ -12,53 +12,72 @@
<ul class="rules"> <ul class="rules">
<li class="rule"> <li class="rule">
The paste <u>must</u> have recognizable show characters, MLP universe influences (AU allowed) and/or links to MLP content (eg. YouTube, /mlp/, pony boorus.) The paste <u>must</u> have recognizable show characters, MLP universe influences (AU
allowed) and/or links to MLP content (eg. YouTube, /mlp/, pony boorus.)
</li> </li>
<li class="rule"> <li class="rule">
Pony drama pastes are allowed, but must not contain any "dox" (information revealing an internet user's real identity), or any call to harm a real life person in any way. Pony drama pastes are allowed, but must not contain any "dox" (information revealing an
internet user's real identity), or any call to harm a real life person in any way.
</li> </li>
<li class="rule"> <li class="rule">
Storing code for pony related projects is allowed. For anything else, choose another pastebin. Storing code for pony related projects is allowed. For anything else, choose another
pastebin.
</li> </li>
<li class="rule"> <li class="rule">
Storing archived greentext/prose is allowed if the content is already publicly available. Please credit the original author in the title and/or the start of the paste, if possible. Storing archived greentext/prose is allowed if the content is already publicly available.
Please credit the original author in the title and/or the start of the paste, if possible.
</li> </li>
</ul> </ul>
<h2>2. Do not post links to illegal content</h2> <h2>2. Do not post links to illegal content</h2>
<ul class="rules"> <ul class="rules">
<li class="rule"> <li class="rule">
Links to photographs or videos depicting human minors in a pornographic, sexually suggestive, or violent manner. Links to photographs or videos depicting human minors in a pornographic, sexually
suggestive, or violent manner.
</li> </li>
<li class="rule"> <li class="rule">
Actual photographs or videos of sadistic gore or animal cruelty (Art, as in rendered drawing, is allowed) Actual photographs or videos of sadistic gore or animal cruelty (Art, as in rendered
drawing, is allowed)
</li> </li>
<li class="rule"> <li class="rule">
Do not post stories containing explicit sexual situations involving real underage humans. Do not post stories containing explicit sexual situations involving real underage humans.
</li> </li>
<li class="rule"> <li class="rule">
Pastes containing or linking calls to violence, harm, or terrorist threats to the real world <u>will be removed and the account banned/removed.</u> Pastes containing or linking calls to violence, harm, or terrorist threats to the real world
<u>will be removed and the account banned/removed.</u>
</li> </li>
<li class="rule"> <li class="rule">
<u>Unless stated what it is in the title and paste</u>, pastes containing link dumps to file upload sites or Tor (.onion) sites will be removed. <u>Unless stated what it is in the title and paste</u>, pastes containing link dumps to file
upload sites or Tor (.onion) sites will be removed.
The moderation does not know what the files are, and does not have time to verify them. The moderation does not know what the files are, and does not have time to verify them.
</li> </li>
<li class="rule">Pastes containing calls to download and/or link to copyrighted material will be removed if excessively posted and/or reported by the copyright holder.</li> <li class="rule">Pastes containing calls to download and/or link to copyrighted material will be
removed if excessively posted and/or reported by the copyright holder.
</li>
</ul> </ul>
<h2>3. Do not abuse site functionality</h2> <h2>3. Do not abuse site functionality</h2>
<ul class="rules"> <ul class="rules">
<li class="rule"> <li class="rule">
You are permitted to have multiple accounts for purposes of archiving or for personal privacy - for example, if you use multiple names. You are permitted to have multiple accounts for purposes of archiving or for personal
If you are archiving someone else's content, please do not create an account under their name. Instead, use <code>{name}-ARCHIVE</code>. privacy - for example, if you use multiple names.
If you are archiving someone else's content, please do not create an account under their
name. Instead, use <code>{name}-ARCHIVE</code>.
</li class="rule"> </li class="rule">
<li class="rule">You may not use multiple accounts for the purposes of evading bans.</li> <li class="rule">You may not use multiple accounts for the purposes of evading bans.</li>
<li class="rule"><u>Do not spam. </u>While we do understand shitposting is part of chan culture, please do not go overboard. At least put a paste expiry time. <li class="rule"><u>Do not spam. </u>While we do understand shitposting is part of chan culture,
We reserve the right to remove shitposts during database clean up.</li> please do not go overboard. At least put a paste expiry time.
<li class="rule">Do not abuse the report function. This means crying to get your greentext taken down. You posted it to a public domain (eg 4chan), it belongs to the internet now.</li> We reserve the right to remove shitposts during database clean up.
<li class="rule">If you think someone is violating a rule, submit a report instead of otherwise calling them out (such as on /mlp/). </li>
Don't submit false reports or report pastes you do not like. Don&#39;t like it, don&#39;t read it. (Unless it breaks any other rules listed here.)</li> <li class="rule">Do not abuse the report function. This means crying to get your greentext taken
down. You posted it to a public domain (eg 4chan), it belongs to the internet now.
</li>
<li class="rule">If you think someone is violating a rule, submit a report instead of otherwise
calling them out (such as on /mlp/).
Don't submit false reports or report pastes you do not like. Don&#39;t like it, don&#39;t
read it. (Unless it breaks any other rules listed here.)
</li>
</ul> </ul>
<h2>4. Keep this place tidy</h2> <h2>4. Keep this place tidy</h2>
@ -71,27 +90,34 @@
<h2>5. Using Pastedown</h2> <h2>5. Using Pastedown</h2>
<ul class="rules"> <ul class="rules">
<li class="rule">Embedded images must not contain explicit images. Non-embed links are fine. </li> <li class="rule">Embedded images must not contain explicit images. Non-embed links are fine.
</li>
<li class="rule">No non pony related images,</li> <li class="rule">No non pony related images,</li>
<li class="rule"> <li class="rule">
No embedded photographs or videos depicting human minors in a pornographic, sexually suggestive, or violent manner. No embedded photographs or videos depicting human minors in a pornographic, sexually
suggestive, or violent manner.
This will result in an instant ban. This will result in an instant ban.
</li> </li>
<li class="rule"> <li class="rule">
No foalcon, lolicon or any underage cartoon characters depicted in a sexual or nude situation. No foalcon, lolicon or any underage cartoon characters depicted in a sexual or nude
situation.
</li class="rule"> </li class="rule">
<li class="rule"> <li class="rule">
Links go through a whitelist system, thus some links will be blocked. If you believe your link should be whitelisted, please email the administrators. Links go through a whitelist system, thus some links will be blocked. If you believe your
link should be whitelisted, please email the administrators.
</li> </li>
</ul> </ul>
<h2> </h2> <h2></h2>
<h2>N. Rules are not exhaustive</h2> <h2>N. Rules are not exhaustive</h2>
<p>There may always be situations or actions that were not accounted for in the above rules, or that may be unique or extraordinary in their circumstances. <p>There may always be situations or actions that were not accounted for in the above rules, or that
All enforcement of the rules, as well as the decision as to whether something is or is not acceptable, is ultimately left up to the discretion of the site&#39;s staff. may be unique or extraordinary in their circumstances.
<span style="color:rgb(44, 53, 60); font-family:source sans pro,helvetica neue,helvetica,roboto,arial,sans-serif">There are no real rules about moderation &mdash; enjoy your ban. All enforcement of the rules, as well as the decision as to whether something is or is not
acceptable, is ultimately left up to the discretion of the site&#39;s staff.
<span
style="color:rgb(44, 53, 60); font-family:source sans pro,helvetica neue,helvetica,roboto,arial,sans-serif">There are no real rules about moderation &mdash; enjoy your ban.
</p> </p>
</div> </div>
</div> </div>

View file

@ -1,45 +1,46 @@
<?php <?php
use PonePaste\Models\Paste; use PonePaste\Models\Paste;
use PonePaste\Models\User; use PonePaste\Models\User;
$public_paste_badges = [ $public_paste_badges = [
50 => '[ProbablyAutistic] Have more than fifty pastes', 50 => '[ProbablyAutistic] Have more than fifty pastes',
25 => '[Writefag] Have twenty-five or more pastes', 25 => '[Writefag] Have twenty-five or more pastes',
5 => '[NewWritefag] Have five or more pastes', 5 => '[NewWritefag] Have five or more pastes',
0 => '[NewFriend] Have less than five pastes', 0 => '[NewFriend] Have less than five pastes',
]; ];
$unlisted_paste_badges = [ $unlisted_paste_badges = [
10 => '', 10 => '',
5 => '' 5 => ''
]; ];
$paste_view_badges = [ $paste_view_badges = [
50000 => '[HorseAyylmao] Have more than 50,000 total views', 50000 => '[HorseAyylmao] Have more than 50,000 total views',
10000 => '[HorseIlluminati] Have more than 10,000 total views', 10000 => '[HorseIlluminati] Have more than 10,000 total views',
5000 => '[HorseMaster] Have more than 5000 total views', 5000 => '[HorseMaster] Have more than 5000 total views',
3000 => '[HorseIdol] Have more than 3000 total views', 3000 => '[HorseIdol] Have more than 3000 total views',
2000 => '[HorseFamous] Have more than 2000 total views', 2000 => '[HorseFamous] Have more than 2000 total views',
1000 => '[HorseWriter] Have more than 1000 total views' 1000 => '[HorseWriter] Have more than 1000 total views'
]; ];
function outputBadges(array $badgeCandidates, int $actualValue, string $imagePrefix) : void { function outputBadges(array $badgeCandidates, int $actualValue, string $imagePrefix) : void {
foreach ($badgeCandidates as $threshold => $badgeTitle) { foreach ($badgeCandidates as $threshold => $badgeTitle) {
if ($actualValue >= $threshold) { if ($actualValue >= $threshold) {
echo "<img src=\"/img/badges/{$imagePrefix}_{$threshold}.png\" title='$badgeTitle' alt='$badgeTitle' style='margin: 5px;' />"; echo "<img src=\"/img/badges/{$imagePrefix}_{$threshold}.png\" title='$badgeTitle' alt='$badgeTitle' style='margin: 5px;' />";
break; break;
}
} }
} }
}
$tab = 'pastes'; $tab = 'pastes';
if ($is_current_user && isset($_GET['tab']) && $_GET['tab'] === 'favourites') { if ($is_current_user && isset($_GET['tab']) && $_GET['tab'] === 'favourites') {
$tab = 'favourites'; $tab = 'favourites';
} }
?> ?>
<main class="bd-main"> <main class="bd-main">
<div class="bd-side-background"></div>
<div class="bd-main-container container"> <div class="container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<div class="flex flex--space-between"> <div class="flex flex--space-between">
@ -53,11 +54,17 @@ $public_paste_badges = [
<p>Admin Actions:</p> <p>Admin Actions:</p>
<form method="post"> <form method="post">
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>">
<button class="button is-small is-success" type="submit" name="reset_password">Reset Password</button> <button class="button is-small is-success" type="submit" name="reset_password">Reset
Password
</button>
<?php if ($profile_info->role === User::ROLE_MODERATOR): ?> <?php if ($profile_info->role === User::ROLE_MODERATOR): ?>
<button class="button is-small is-warning" type="submit" name="change_role">Demote Moderator</button> <button class="button is-small is-warning" type="submit" name="change_role">Demote
Moderator
</button>
<?php elseif ($profile_info->role === 0): ?> <?php elseif ($profile_info->role === 0): ?>
<button class="button is-small is-warning" type="submit" name="change_role">Promote to Moderator</button> <button class="button is-small is-warning" type="submit" name="change_role">Promote
to Moderator
</button>
<?php endif; ?> <?php endif; ?>
</form> </form>
</div> </div>
@ -98,28 +105,31 @@ $public_paste_badges = [
<?php if ($is_current_user): ?> <?php if ($is_current_user): ?>
Some of your statistics: Some of your statistics:
<br /> <br/>
Total pastes: <?= $profile_total_pastes ?> &mdash; Total pastes: <?= $profile_total_pastes ?> &mdash;
Total public pastes: <?= $profile_total_public ?> &mdash; Total public pastes: <?= $profile_total_public ?> &mdash;
Total unlisted pastes: <?= $profile_total_unlisted ?> &mdash; Total unlisted pastes: <?= $profile_total_unlisted ?> &mdash;
Total private pastes: <?= $profile_total_private ?> &mdash; Total private pastes: <?= $profile_total_private ?> &mdash;
Total views of all your pastes: <?= $profile_total_paste_views ?> Total views of all your pastes: <?= $profile_total_paste_views ?>
<br /> <br/>
Total favourites of all your pastes: <?= $total_pfav ?> &mdash; Total favourites of all your pastes: <?= $total_pfav ?> &mdash;
Total favorites you have given: <?= $total_yfav ?> Total favorites you have given: <?= $total_yfav ?>
<br /> <br/>
<br /> <br/>
<div class="tabs"> <div class="tabs">
<ul class="tabs-menu"> <ul class="tabs-menu">
<li class="<?= $tab === 'pastes' ? 'is-active' : '' ?>" data-target="first-tab"><a href="?tab=pastes">My Pastes</a></li> <li class="<?= $tab === 'pastes' ? 'is-active' : '' ?>" data-target="first-tab"><a
<li class="<?= $tab === 'favourites' ? 'is-active' : '' ?>" data-target="second-tab"><a href="?tab=favourites">Favorites</a></li> href="?tab=pastes">My Pastes</a></li>
<li class="<?= $tab === 'favourites' ? 'is-active' : '' ?>" data-target="second-tab"><a
href="?tab=favourites">Favorites</a></li>
</ul> </ul>
</div> </div>
<?php endif;?> <?php endif; ?>
<div class="tab-content<?= $tab === 'favourites' ? ' is-hidden' : '' ?>" id="first-tab"> <div class="tab-content<?= $tab === 'favourites' ? ' is-hidden' : '' ?>" id="first-tab">
<form class="table_filterer" method="GET"> <form class="table_filterer" method="GET">
<label><i class="fa fa-search"></i> <label><i class="fa fa-search"></i>
<input class="search" type="search" name="q" placeholder="Filter..." value="<?= pp_html_escape($filter_value); ?>" /> <input class="search" type="search" name="q" placeholder="Filter..."
value="<?= pp_html_escape($filter_value); ?>"/>
</label> </label>
<label> <label>
Show&nbsp; Show&nbsp;
@ -133,7 +143,8 @@ $public_paste_badges = [
</label> </label>
<button type="submit" class="button js-hidden">Search</button> <button type="submit" class="button js-hidden">Search</button>
</form> </form>
<table id="archive" class="table is-fullwidth is-hoverable" data-user-id="<?= pp_html_escape($profile_info->id); ?>"> <table id="archive" class="table is-fullwidth is-hoverable"
data-user-id="<?= pp_html_escape($profile_info->id); ?>">
<thead> <thead>
<tr class="paginator__sort"> <tr class="paginator__sort">
<th data-sort-field="title" class="td-right">Title</th> <th data-sort-field="title" class="td-right">Title</th>
@ -151,21 +162,22 @@ $public_paste_badges = [
<tbody> <tbody>
<?php foreach ($profile_pastes as $paste): ?> <?php foreach ($profile_pastes as $paste): ?>
<?php <?php
$escaped_title = pp_html_escape(truncate($paste->title, 20, 50)); $escaped_title = pp_html_escape(truncate($paste->title, 20, 50));
$p_date = new DateTime($paste->created_at); $p_date = new DateTime($paste->created_at);
$p_visible = match (intval($paste->visible)) { $p_visible = match (intval($paste->visible)) {
0 => 'Public', 0 => 'Public',
1 => 'Unlisted', 1 => 'Unlisted',
2 => 'Private' 2 => 'Private'
}; };
$pasteJson = array_merge( $pasteJson = array_merge(
$paste->only('id', 'title', 'tags', 'views', 'created_at', 'user_id'), $paste->only('id', 'title', 'tags', 'views', 'created_at', 'user_id'),
['visibility' => $p_visible] ['visibility' => $p_visible]
); );
?> ?>
<?php if ($is_current_user || $paste->visible == Paste::VISIBILITY_PUBLIC): ?> <?php if ($is_current_user || $paste->visible == Paste::VISIBILITY_PUBLIC): ?>
<tr data-paste-info="<?= pp_html_escape(json_encode($pasteJson)); ?>"> <tr data-paste-info="<?= pp_html_escape(json_encode($pasteJson)); ?>">
<td><a href="<?= urlForPaste($paste) ?>" title="<?= $escaped_title ?>"><?= $escaped_title ?></a></td> <td><a href="<?= urlForPaste($paste) ?>"
title="<?= $escaped_title ?>"><?= $escaped_title ?></a></td>
<td data-sort="<?= $p_date->format('U') ?>" class="td-center"> <td data-sort="<?= $p_date->format('U') ?>" class="td-center">
<?= $p_date->format('d F Y') ?> <?= $p_date->format('d F Y') ?>
</td> </td>
@ -175,9 +187,9 @@ $public_paste_badges = [
<?php if (can('delete', $paste)): ?> <?php if (can('delete', $paste)): ?>
<td class="td-center"> <td class="td-center">
<form action="<?= urlForPaste($paste) ?>" method="POST"> <form action="<?= urlForPaste($paste) ?>" method="POST">
<input type="hidden" name="delete" value="delete" /> <input type="hidden" name="delete" value="delete"/>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<input type="submit" value="Delete" /> <input type="submit" value="Delete"/>
</form> </form>
</td> </td>
<?php endif; ?> <?php endif; ?>
@ -206,7 +218,8 @@ $public_paste_badges = [
</div> </div>
<?php if ($is_current_user) { ?> <?php if ($is_current_user) { ?>
<div class="tab-content<?= $tab === 'pastes' ? ' is-hidden' : '' ?>" id="second-tab"> <div class="tab-content<?= $tab === 'pastes' ? ' is-hidden' : '' ?>" id="second-tab">
<table id="favs" class="table is-fullwidth is-hoverable<?= $current_page === 'favourites' ? 'is-active' : '' ?>"> <table id="favs"
class="table is-fullwidth is-hoverable<?= $current_page === 'favourites' ? 'is-active' : '' ?>">
<thead> <thead>
<tr> <tr>
<th class="td-right">Title</th> <th class="td-right">Title</th>
@ -229,8 +242,10 @@ $public_paste_badges = [
?> ?>
<?php if ($is_current_user || $row['visible'] == Paste::VISIBILITY_PUBLIC): ?> <?php if ($is_current_user || $row['visible'] == Paste::VISIBILITY_PUBLIC): ?>
<tr data-paste-info="<?= pp_html_escape(json_encode($pasteJson)); ?>"> <tr data-paste-info="<?= pp_html_escape(json_encode($pasteJson)); ?>">
<td><a href="<?= urlForPaste($paste) ?>" title="<?= $escaped_title ?>"><?= $escaped_title ?></a></td> <td><a href="<?= urlForPaste($paste) ?>"
<td data-sort="<?= $p_date->format('U') ?>" class="td-center"><?= $f_date->format('d F Y') ?></td> title="<?= $escaped_title ?>"><?= $escaped_title ?></a></td>
<td data-sort="<?= $p_date->format('U') ?>"
class="td-center"><?= $f_date->format('d F Y') ?></td>
<td class="td-center"> <td class="td-center">
<?php if ($delta->days <= 2): ?> <?php if ($delta->days <= 2): ?>
<i class='far fa-check-square fa-lg' aria-hidden='true'></i> <i class='far fa-check-square fa-lg' aria-hidden='true'></i>

View file

@ -50,9 +50,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
} }
</style> </style>
<main class="bd-main" id="dstop-scrolling"> <main class="bd-main" id="dstop-scrolling">
<!-- <div class="preloader"></div> --> <div class="container">
<div class="bd-side-background"></div>
<div class="bd-main-container container">
<div class="bd-duo"> <div class="bd-duo">
<div class="bd-lead"> <div class="bd-lead">
<div class="content panel"> <div class="content panel">
@ -83,7 +81,8 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="column is-4 has-text-centered"> <div class="column is-4 has-text-centered">
<h1 class="title is-6" style="margin-bottom:0;"><?= pp_html_escape($paste->title); ?></h1> <h1 class="title is-6" style="margin-bottom:0;"><?= pp_html_escape($paste->title); ?></h1>
<small class="title is-6 has-text-weight-normal has-text-grey"> <small class="title is-6 has-text-weight-normal has-text-grey">
By <a href="<?= urlForMember($paste->user) ?>"><?= pp_html_escape($paste->user->username) ?></a> By <a
href="<?= urlForMember($paste->user) ?>"><?= pp_html_escape($paste->user->username) ?></a>
<br/> <br/>
Created: <?= $paste->created_at ?> Created: <?= $paste->created_at ?>
<br/> <br/>
@ -100,30 +99,32 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<?php if ($current_user !== null): ?> <?php if ($current_user !== null): ?>
<form method="POST" class="form--inline"> <form method="POST" class="form--inline">
<?php if (isset($csrf_token)): ?> <?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<?php endif; ?> <?php endif; ?>
<input type="hidden" name="fave" value="1" /> <input type="hidden" name="fave" value="1"/>
<button type="submit" class="icon tool-icon button--no-style"><i class="fas fa-star fa-lg <?= $paste_is_favourited ? '' : 'has-text-grey' ?>" title="Favourite"></i></button> <button type="submit" class="icon tool-icon button--no-style"><i
class="fas fa-star fa-lg <?= $paste_is_favourited ? '' : 'has-text-grey' ?>"
title="Favourite"></i></button>
</form> </form>
<?php endif; ?> <?php endif; ?>
<a class="icon tool-icon flip" href="<?= urlForReport($paste); ?>"><i <a class="icon tool-icon flip" href="<?= urlForReport($paste); ?>"><i
class="far fa-flag fa-lg has-text-grey" title="Report Paste"></i></a> class="far fa-flag fa-lg has-text-grey" title="Report Paste"></i></a>
<?php if ($paste['code'] != "pastedown") { ?> <?php if ($paste['code'] != "pastedown") { ?>
<a class="icon tool-icon" href="javascript:togglev();"><i <a class="icon tool-icon" href="javascript:togglev();"><i
class="fas fa-list-ol fa-lg has-text-grey" class="fas fa-list-ol fa-lg has-text-grey"
title="Toggle Line Numbers"></i></a> title="Toggle Line Numbers"></i></a>
<?php } ?> <?php } ?>
<a class="icon tool-icon" href="#" onclick="selectText('paste');"><i <a class="icon tool-icon" href="#" onclick="selectText('paste');"><i
class="far fa-clipboard fa-lg has-text-grey" class="far fa-clipboard fa-lg has-text-grey"
title="Select Text"></i></a> title="Select Text"></i></a>
<a class="icon tool-icon" href="<?php echo $p_raw; ?>"><i <a class="icon tool-icon" href="<?php echo $p_raw; ?>"><i
class="far fa-file-alt fa-lg has-text-grey" title="View Raw"></i></a> class="far fa-file-alt fa-lg has-text-grey" title="View Raw"></i></a>
<a class="icon tool-icon" href="<?php echo $p_download; ?>"><i <a class="icon tool-icon" href="<?php echo $p_download; ?>"><i
class="fas fa-file-download fa-lg has-text-grey" class="fas fa-file-download fa-lg has-text-grey"
title="Download Paste"></i></a> title="Download Paste"></i></a>
<a class="icon tool-icon embed-tool "><i <a class="icon tool-icon embed-tool "><i
class="far fa-file-code fa-lg has-text-grey" class="far fa-file-code fa-lg has-text-grey"
title="Embed This Paste"></i></a> title="Embed This Paste"></i></a>
<a class="icon tool-icon expand-tool"><i class="fas fa-expand-alt has-text-grey" <a class="icon tool-icon expand-tool"><i class="fas fa-expand-alt has-text-grey"
title="Full Screen"></i></a> title="Full Screen"></i></a>
<div class="panel-embed my-5 is-hidden"> <div class="panel-embed my-5 is-hidden">
@ -134,7 +135,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
} else { } else {
echo 'paste.php?embed&id='; echo 'paste.php?embed&id=';
} }
echo $paste->id . '"></script>'; ?>' readonly /> echo $paste->id . '"></script>'; ?>' readonly/>
</div> </div>
</div> </div>
</div> </div>
@ -164,22 +165,23 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
</div> </div>
</div> </div>
<?php else: ?> <?php else: ?>
<div id="paste" style="line-height: 18px;"><?= $p_content ?></div> <div id="paste" style="line-height: 18px;"><?= $p_content ?></div>
<?php endif; ?> <?php endif; ?>
</div> </div>
<?php if (can('hide', $paste)): ?> <?php if (can('hide', $paste)): ?>
<div class="mod-tools"> <div class="mod-tools">
<p>Moderation Tools</p> <p>Moderation Tools</p>
<form method="post"> <form method="post">
<?php if (isset($csrf_token)): ?> <?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<?php endif; ?> <?php endif; ?>
<div class="field"> <div class="field">
<input class="button is-small <?= $paste->is_hidden ? 'is-success' : 'is-danger' ?>" type="submit" name="hide" id="hide" <input class="button is-small <?= $paste->is_hidden ? 'is-success' : 'is-danger' ?>"
value="<?= $paste->is_hidden ? 'Unhide' : 'Hide' ?> Paste" /> type="submit" name="hide" id="hide"
</div> value="<?= $paste->is_hidden ? 'Unhide' : 'Hide' ?> Paste"/>
</form> </div>
</div> </form>
</div>
<?php endif; ?> <?php endif; ?>
<!-- Guests --> <!-- Guests -->
<?php if ($totalpastes !== 0 && !can('edit', $paste)) { ?> <?php if ($totalpastes !== 0 && !can('edit', $paste)) { ?>
@ -194,7 +196,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<p class="subtitle is-7">by <i><?= pp_html_escape($paste->user->username) ?></i></p> <p class="subtitle is-7">by <i><?= pp_html_escape($paste->user->username) ?></i></p>
</header> </header>
<?php } ?> <?php } ?>
<?php } else if (can('edit', $paste)) { ?> <?php } elseif (can('edit', $paste)) { ?>
<!-- Paste Panel --> <!-- Paste Panel -->
<hr> <hr>
<h1 class="title is-6 mx-1">Edit Paste</h1> <h1 class="title is-6 mx-1">Edit Paste</h1>
@ -206,7 +208,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<p class="control has-icons-left"> <p class="control has-icons-left">
<input type="text" class="input" name="title" <input type="text" class="input" name="title"
placeholder="<?= pp_html_escape($paste['title']) ?>" placeholder="<?= pp_html_escape($paste['title']) ?>"
value="<?= pp_html_escape($paste['title']) ?>" /> value="<?= pp_html_escape($paste['title']) ?>"/>
<span class="icon is-small is-left"> <span class="icon is-small is-left">
<i class="fa fa-font"></i> <i class="fa fa-font"></i>
</span> </span>
@ -229,14 +231,14 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="level-item is-pulled-left mx-1"> <div class="level-item is-pulled-left mx-1">
<a class="button" <a class="button"
onclick="highlight(document.getElementById('code')); return false;"><i onclick="highlight(document.getElementById('code')); return false;"><i
class="fa fa-indent"></i>&nbsp;Highlight</a> class="fa fa-indent"></i>&nbsp;Highlight</a>
</div> </div>
<div class="level-item mx-1"> <div class="level-item mx-1">
<?php if (isset($csrf_token)): ?> <?php if (isset($csrf_token)): ?>
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" /> <input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
<?php endif; ?> <?php endif; ?>
<input class="button is-info" type="submit" name="edit" id="edit" <input class="button is-info" type="submit" name="edit" id="edit"
value="Save Changes" /> value="Save Changes"/>
</div> </div>
</div> </div>
</nav> </nav>
@ -256,7 +258,9 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="control"> <div class="control">
<div class="control"> <div class="control">
<input name="tag_input" class="input js-tag-input" id="field_tags" <input name="tag_input" class="input js-tag-input" id="field_tags"
value="<?= pp_html_escape($paste->tags->map(function($t) { return $t->name; })->join(',')) ?>" /> value="<?= pp_html_escape($paste->tags->map(function ($t) {
return $t->name;
})->join(',')) ?>"/>
</div> </div>
</div> </div>
</div> </div>
@ -268,7 +272,8 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="level-item is-pulled-left mr-1"> <div class="level-item is-pulled-left mr-1">
<div class="field"> <div class="field">
<div class="subtitle has-text-weight-semibold " <div class="subtitle has-text-weight-semibold "
style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">Expiry</div> style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">Expiry
</div>
<div class="control"> <div class="control">
<!-- Expiry --> <!-- Expiry -->
<div class="select"> <div class="select">
@ -289,7 +294,8 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="level-item is-pulled-left mx-1"> <div class="level-item is-pulled-left mx-1">
<div class="field"> <div class="field">
<div class="subtitle has-text-weight-semibold " <div class="subtitle has-text-weight-semibold "
style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">Visibility style="margin-left: 2px; margin-bottom: 0.6rem; font-size: 1rem;">
Visibility
&nbsp;&nbsp; &nbsp;&nbsp;
</div> </div>
<div class="control"> <div class="control">
@ -297,14 +303,14 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="select"> <div class="select">
<select name="visibility"> <select name="visibility">
<?php <?php
$visibility_names = ['Public', 'Unlisted']; $visibility_names = ['Public', 'Unlisted'];
$visibility_codes = ['0', '1']; $visibility_codes = ['0', '1'];
if ($current_user) { if ($current_user) {
$visibility_names[] = 'Private'; $visibility_names[] = 'Private';
$visibility_codes[] = '2'; $visibility_codes[] = '2';
} }
echo optionsForSelect($visibility_names, $visibility_codes, $paste->visible); echo optionsForSelect($visibility_names, $visibility_codes, $paste->visible);
?> ?>
</select> </select>
</div> </div>
@ -319,7 +325,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<input type="text" class="input" name="pass" id="pass" value="" <input type="text" class="input" name="pass" id="pass" value=""
placeholder="Password" autocomplete="new-password" /> placeholder="Password" autocomplete="new-password"/>
</div> </div>
</div> </div>
</div> </div>
@ -329,7 +335,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<!-- Encrypted --> <!-- Encrypted -->
<div class="b-checkbox is-info is-inline"> <div class="b-checkbox is-info is-inline">
<input class="is-checkradio is-info" id="encrypt" name="encrypted" <input class="is-checkradio is-info" id="encrypt" name="encrypted"
type="checkbox" disabled="disabled" checked="checked" /> type="checkbox" disabled="disabled" checked="checked"/>
<label for="encrypt"> <label for="encrypt">
Encrypt on server (always enabled) Encrypt on server (always enabled)
</label> </label>
@ -338,9 +344,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
</div> </div>
</form> </form>
<?php } ?> <?php } ?>
</div> </div>
</div> </div>
</div> </div>
</main> </main>