mirror of
https://github.com/Neetpone/ponepaste.git
synced 2025-03-11 14:10:06 +01:00
chore: format views and remove some unused classes and divs
This commit is contained in:
parent
19b2deda2a
commit
5362be443c
15 changed files with 305 additions and 236 deletions
|
@ -51,9 +51,7 @@
|
|||
</style>
|
||||
|
||||
<main class="bd-main">
|
||||
<div class="preloader"></div>
|
||||
<div class="bd-side-background"></div>
|
||||
<div class="bd-main-container container">
|
||||
<div class="container">
|
||||
<div class="bd-duo">
|
||||
<div class="bd-lead">
|
||||
<article class="message is-info">
|
||||
|
@ -67,7 +65,8 @@
|
|||
<h1 class="title is-4">Pastes Archive</h1>
|
||||
<form class="table_filterer" method="GET">
|
||||
<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>
|
||||
Show
|
||||
|
|
|
@ -14,8 +14,8 @@ $flashes = getFlashes();
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta charset="UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
|
||||
<title>
|
||||
<?php
|
||||
|
@ -97,9 +97,11 @@ $flashes = getFlashes();
|
|||
</a>
|
||||
<?php if ($current_user !== null && $current_user->role >= User::ROLE_MODERATOR): ?>
|
||||
<?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">
|
||||
<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>Admin</span>
|
||||
</a>
|
||||
|
@ -107,14 +109,15 @@ $flashes = getFlashes();
|
|||
<?php endif; /* !$site_is_private */ ?>
|
||||
|
||||
<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">
|
||||
<a class="navbar-item" href="<?= urlForMember($current_user) ?>">Pastes</a>
|
||||
<a class="navbar-item" href="<?= urlForPage('profile') ?>">Settings</a>
|
||||
<hr class="navbar-divider"/>
|
||||
<form action="<?= urlForPage('logout') ?>" method="POST">
|
||||
<input class="button navbar-link" type="submit" value="Logout"
|
||||
style="border:none;padding: 0.375rem 1rem;" />
|
||||
style="border:none;padding: 0.375rem 1rem;"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -140,7 +143,8 @@ $flashes = getFlashes();
|
|||
<span>Events</span>
|
||||
</a>
|
||||
<?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>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
@ -150,7 +154,8 @@ $flashes = getFlashes();
|
|||
</nav>
|
||||
|
||||
<?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; ?>
|
||||
|
||||
<div id="#signin" class="modal modal-fx-fadeInScale">
|
||||
|
@ -235,19 +240,19 @@ $flashes = getFlashes();
|
|||
</div>
|
||||
<div class="field">
|
||||
<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%;">
|
||||
<a href="javascript:void(0)">
|
||||
<i class="fa fa-refresh" style="height: 100%;"></i>
|
||||
</a>
|
||||
</span>
|
||||
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>" />
|
||||
<input type="text" class="input" name="captcha_answer" placeholder="Enter the CAPTCHA" />
|
||||
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>"/>
|
||||
<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>
|
||||
</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">
|
||||
<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
|
||||
|
|
|
@ -20,11 +20,12 @@ function outputPasteCard($paste) {
|
|||
</div>
|
||||
</div></div>';
|
||||
}
|
||||
|
||||
?>
|
||||
<main class="bd-main">
|
||||
<!-- START CONTAINER -->
|
||||
<div class="bd-side-background"></div>
|
||||
<div class="bd-main-container container">
|
||||
|
||||
<div class="container">
|
||||
<div class="bd-duo">
|
||||
<div class="bd-lead">
|
||||
<!-- Start Row -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<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-lead">
|
||||
<?php if (isset($error)): ?>
|
||||
|
@ -10,10 +10,10 @@
|
|||
<form method="post">
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
<input type="hidden" name="id" value="<?= $paste->id; ?>" />
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" />
|
||||
<input type="hidden" name="id" value="<?= $paste->id; ?>"/>
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
|
||||
<input type="password" class="input" name="mypass"
|
||||
placeholder="Password" />
|
||||
placeholder="Password"/>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" name="submit" class="button is-info">Submit</button>
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
</script>
|
||||
<main class="bd-main">
|
||||
<!-- START CONTAINER -->
|
||||
<div class="bd-side-background"></div>
|
||||
<div class="bd-main-container container">
|
||||
|
||||
<div class="container">
|
||||
<div class="bd-duo">
|
||||
<div class="bd-lead">
|
||||
<!-- Start Row -->
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
<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-lead">
|
||||
<?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)): ?>
|
||||
<p>Your new password is as follows:</p>
|
||||
<code><?= pp_html_escape($new_password); ?></code>
|
||||
|
@ -13,12 +15,15 @@
|
|||
|
||||
<?php if (isset($recovery_code)): ?>
|
||||
<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>
|
||||
<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 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 outputFlashes($flashes); ?>
|
||||
<?php if (isset($_GET['register'])) { ?>
|
||||
|
@ -54,20 +59,23 @@
|
|||
<div class="field">
|
||||
<div class="notification">
|
||||
<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%;">
|
||||
<a href="javascript:void(0)">
|
||||
<i class="fa fa-refresh" style="height: 100%;"></i>
|
||||
</a>
|
||||
</span>
|
||||
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>" />
|
||||
<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>
|
||||
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>"/>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
<hr>
|
||||
</div>
|
||||
|
@ -82,7 +90,7 @@
|
|||
not suitable for those aged under 18.</p>
|
||||
</div>
|
||||
</form>
|
||||
<?php } elseif (isset($_GET['forgotpassw'])) { ?>
|
||||
<?php } elseif (isset($_GET['forgotpassw'])) { ?>
|
||||
<form action="/forgot" method="post">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
|
@ -119,48 +127,48 @@
|
|||
</div>
|
||||
</form>
|
||||
<?php } else { ?>
|
||||
<form action="/login" method="post">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h1 class="title is-4">Login</h1>
|
||||
<div class="field">
|
||||
<label class="label">Username</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input type="text" class="input" name="username" placeholder="Username">
|
||||
<span class="icon is-small is-left">
|
||||
<form action="/login" method="post">
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
<h1 class="title is-4">Login</h1>
|
||||
<div class="field">
|
||||
<label class="label">Username</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input type="text" class="input" name="username" placeholder="Username">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-user"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Password</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input type="password" class="input" name="password" placeholder="Password">
|
||||
<span class="icon is-small is-left">
|
||||
<div class="field">
|
||||
<label class="label">Password</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input type="password" class="input" name="password" placeholder="Password">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-key"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="b-checkbox is-info is-inline">
|
||||
<input class="is-checkradio is-info" id="rememberme" name="remember_me"
|
||||
type="checkbox" checked="">
|
||||
<label for="rememberme">
|
||||
Remember Me
|
||||
</label>
|
||||
<div class="field">
|
||||
<div class="b-checkbox is-info is-inline">
|
||||
<input class="is-checkradio is-info" id="rememberme" name="remember_me"
|
||||
type="checkbox" checked="">
|
||||
<label for="rememberme">
|
||||
Remember Me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<input class="button is-info" type="submit" name="signin" value="Login"/>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="field">
|
||||
<input class="button is-info" type="submit" name="signin" value="Login" />
|
||||
<div class="column">
|
||||
</div>
|
||||
<div class="column">
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
<div class="column">
|
||||
</div>
|
||||
<div class="column">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<div class="columns">
|
||||
<div class="column">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<link rel="stylesheet" href="theme/bulma/css/bulma-tagsinput.min.css"/>
|
||||
<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-lead">
|
||||
<?php if (isset($global_site_info['banner'])): ?>
|
||||
|
@ -76,7 +76,7 @@
|
|||
<small>Type a comma to separate each tag.</small>
|
||||
<div class="control">
|
||||
<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>
|
||||
|
@ -93,7 +93,9 @@
|
|||
<div class="level-item is-pulled-left mr-1">
|
||||
<div class="field">
|
||||
<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="select">
|
||||
<?php
|
||||
|
@ -107,8 +109,8 @@
|
|||
<select name="paste_expire_date">
|
||||
|
||||
<?= optionsForSelect(
|
||||
['Never', 'View Once', '10 minutes', '1 hour', '1 day', '1 week', '2 weeks', '1 month'],
|
||||
['N', 'self', '0Y0M0DT0H10M', '1H', '1D', '1W', '2W', '1M'],
|
||||
['Never', 'View Once', '10 minutes', '1 hour', '1 day', '1 week', '2 weeks', '1 month'],
|
||||
['N', 'self', '0Y0M0DT0H10M', '1H', '1D', '1W', '2W', '1M'],
|
||||
$post_expire
|
||||
); ?>
|
||||
</select>
|
||||
|
@ -119,7 +121,8 @@
|
|||
<div class="level-item is-pulled-left mx-1">
|
||||
<div class="field">
|
||||
<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
|
||||
|
||||
</div>
|
||||
<div class="control">
|
||||
|
@ -133,14 +136,17 @@
|
|||
}
|
||||
?>
|
||||
<select name="visibility">
|
||||
<option value="0" <?php echo ($post_visibility == "0") ? 'selected="selected"' : ''; ?>>
|
||||
<option
|
||||
value="0" <?php echo ($post_visibility == "0") ? 'selected="selected"' : ''; ?>>
|
||||
Public
|
||||
</option>
|
||||
<option value="1" <?php echo ($post_visibility == "1") ? 'selected="selected"' : ''; ?>>
|
||||
<option
|
||||
value="1" <?php echo ($post_visibility == "1") ? 'selected="selected"' : ''; ?>>
|
||||
Unlisted
|
||||
</option>
|
||||
<?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
|
||||
</option>
|
||||
<?php } else { ?>
|
||||
|
@ -186,20 +192,23 @@
|
|||
<?php if ($captcha_enabled && $current_user === null): ?>
|
||||
<div class="is-one-quarter">
|
||||
<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%;">
|
||||
<a href="javascript:void(0)">
|
||||
<i class="fa fa-refresh" style="height: 100%;"></i>
|
||||
</a>
|
||||
</span>
|
||||
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>" />
|
||||
<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>
|
||||
<input type="hidden" name="captcha_token" value="<?= $captcha_token ?>"/>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?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; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
<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-lead">
|
||||
<?php if (isset($page)): ?>
|
||||
<h1 class="title is-4"><?= pp_html_escape($page->page_title); ?><h1>
|
||||
<?= $page->page_content; ?>
|
||||
<?php else: ?>
|
||||
<h1 class="title is-4">Page not found.</h1>
|
||||
<p class="help is-danger subtitle is-6">A page with that name doesn't seem to exist.</p>
|
||||
<?php endif; ?>
|
||||
<h1 class="title is-4"><?= pp_html_escape($page->page_title); ?>
|
||||
<h1>
|
||||
<?= $page->page_content; ?>
|
||||
<?php else: ?>
|
||||
<h1 class="title is-4">Page not found.</h1>
|
||||
<p class="help is-danger subtitle is-6">A page with that name doesn't seem to exist.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<main class="bd-main">
|
||||
<div class="bd-main-container container">
|
||||
<div class="container">
|
||||
<div class="bd-lead">
|
||||
<div class="rule">
|
||||
<h2>The short version</h2>
|
||||
|
@ -34,7 +34,8 @@
|
|||
</ul>
|
||||
<p>Additionally, cookies of users that are logged into the service may contain:</p>
|
||||
<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>
|
||||
<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
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<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-lead">
|
||||
<h1 class="title is-5">Total Pastes: <?= $total_user_pastes ?></h1>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<label class="label" for="password_confirmation">Confirm Password</label>
|
||||
<div class="control has-icons-left has-icons-right">
|
||||
<input type="password" class="input" name="cpassword" id="password_confirmation"
|
||||
placeholder="Confirm Password" />
|
||||
placeholder="Confirm Password"/>
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-key"></i>
|
||||
</span>
|
||||
|
@ -87,7 +87,7 @@
|
|||
</div>
|
||||
<div class="field">
|
||||
<?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; ?>
|
||||
<button type="submit" name="submit" class="button is-info">Submit</button>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<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-lead">
|
||||
<h1 class="title is-5">Reporting <b><?= pp_html_escape($paste->title) ?></b></h1>
|
||||
|
@ -19,7 +19,7 @@
|
|||
</div>
|
||||
<div class="field">
|
||||
<?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; ?>
|
||||
<button type="submit" class="button is-info">Report</button>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<main class="bd-main">
|
||||
<!-- START CONTAINER -->
|
||||
<div class="bd-side-background"></div>
|
||||
<div class="bd-main-container container">
|
||||
|
||||
<div class="container">
|
||||
<div class="bd-duo">
|
||||
<div class="bd-lead">
|
||||
<!-- Start Row -->
|
||||
|
@ -12,53 +12,72 @@
|
|||
|
||||
<ul class="rules">
|
||||
<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 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 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 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>
|
||||
</ul>
|
||||
|
||||
<h2>2. Do not post links to illegal content</h2>
|
||||
<ul class="rules">
|
||||
<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 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 class="rule">
|
||||
Do not post stories containing explicit sexual situations involving real underage humans.
|
||||
</li>
|
||||
<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 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.
|
||||
</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>
|
||||
|
||||
<h2>3. Do not abuse site functionality</h2>
|
||||
|
||||
<ul class="rules">
|
||||
<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.
|
||||
If you are archiving someone else's content, please do not create an account under their name. Instead, use <code>{name}-ARCHIVE</code>.
|
||||
You are permitted to have multiple accounts for purposes of archiving or for personal
|
||||
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">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.
|
||||
We reserve the right to remove shitposts during database clean up.</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't like it, don't read it. (Unless it breaks any other rules listed here.)</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.
|
||||
We reserve the right to remove shitposts during database clean up.
|
||||
</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't like it, don't
|
||||
read it. (Unless it breaks any other rules listed here.)
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2>4. Keep this place tidy</h2>
|
||||
|
@ -71,27 +90,34 @@
|
|||
<h2>5. Using Pastedown</h2>
|
||||
|
||||
<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 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.
|
||||
</li>
|
||||
<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">
|
||||
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>
|
||||
</ul>
|
||||
|
||||
<h2> </h2>
|
||||
<h2></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.
|
||||
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'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 — enjoy your ban.
|
||||
<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.
|
||||
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'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 — enjoy your ban.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,45 +1,46 @@
|
|||
<?php
|
||||
|
||||
use PonePaste\Models\Paste;
|
||||
use PonePaste\Models\User;
|
||||
|
||||
$public_paste_badges = [
|
||||
50 => '[ProbablyAutistic] Have more than fifty pastes',
|
||||
25 => '[Writefag] Have twenty-five or more pastes',
|
||||
5 => '[NewWritefag] Have five or more pastes',
|
||||
0 => '[NewFriend] Have less than five pastes',
|
||||
];
|
||||
50 => '[ProbablyAutistic] Have more than fifty pastes',
|
||||
25 => '[Writefag] Have twenty-five or more pastes',
|
||||
5 => '[NewWritefag] Have five or more pastes',
|
||||
0 => '[NewFriend] Have less than five pastes',
|
||||
];
|
||||
|
||||
$unlisted_paste_badges = [
|
||||
10 => '',
|
||||
5 => ''
|
||||
];
|
||||
$unlisted_paste_badges = [
|
||||
10 => '',
|
||||
5 => ''
|
||||
];
|
||||
|
||||
$paste_view_badges = [
|
||||
50000 => '[HorseAyylmao] Have more than 50,000 total views',
|
||||
10000 => '[HorseIlluminati] Have more than 10,000 total views',
|
||||
5000 => '[HorseMaster] Have more than 5000 total views',
|
||||
3000 => '[HorseIdol] Have more than 3000 total views',
|
||||
2000 => '[HorseFamous] Have more than 2000 total views',
|
||||
1000 => '[HorseWriter] Have more than 1000 total views'
|
||||
];
|
||||
$paste_view_badges = [
|
||||
50000 => '[HorseAyylmao] Have more than 50,000 total views',
|
||||
10000 => '[HorseIlluminati] Have more than 10,000 total views',
|
||||
5000 => '[HorseMaster] Have more than 5000 total views',
|
||||
3000 => '[HorseIdol] Have more than 3000 total views',
|
||||
2000 => '[HorseFamous] Have more than 2000 total views',
|
||||
1000 => '[HorseWriter] Have more than 1000 total views'
|
||||
];
|
||||
|
||||
function outputBadges(array $badgeCandidates, int $actualValue, string $imagePrefix) : void {
|
||||
foreach ($badgeCandidates as $threshold => $badgeTitle) {
|
||||
if ($actualValue >= $threshold) {
|
||||
echo "<img src=\"/img/badges/{$imagePrefix}_{$threshold}.png\" title='$badgeTitle' alt='$badgeTitle' style='margin: 5px;' />";
|
||||
break;
|
||||
}
|
||||
function outputBadges(array $badgeCandidates, int $actualValue, string $imagePrefix) : void {
|
||||
foreach ($badgeCandidates as $threshold => $badgeTitle) {
|
||||
if ($actualValue >= $threshold) {
|
||||
echo "<img src=\"/img/badges/{$imagePrefix}_{$threshold}.png\" title='$badgeTitle' alt='$badgeTitle' style='margin: 5px;' />";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$tab = 'pastes';
|
||||
if ($is_current_user && isset($_GET['tab']) && $_GET['tab'] === 'favourites') {
|
||||
$tab = 'favourites';
|
||||
}
|
||||
$tab = 'pastes';
|
||||
if ($is_current_user && isset($_GET['tab']) && $_GET['tab'] === 'favourites') {
|
||||
$tab = 'favourites';
|
||||
}
|
||||
?>
|
||||
<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-lead">
|
||||
<div class="flex flex--space-between">
|
||||
|
@ -53,11 +54,17 @@ $public_paste_badges = [
|
|||
<p>Admin Actions:</p>
|
||||
<form method="post">
|
||||
<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): ?>
|
||||
<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): ?>
|
||||
<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; ?>
|
||||
</form>
|
||||
</div>
|
||||
|
@ -98,28 +105,31 @@ $public_paste_badges = [
|
|||
|
||||
<?php if ($is_current_user): ?>
|
||||
Some of your statistics:
|
||||
<br />
|
||||
<br/>
|
||||
Total pastes: <?= $profile_total_pastes ?> —
|
||||
Total public pastes: <?= $profile_total_public ?> —
|
||||
Total unlisted pastes: <?= $profile_total_unlisted ?> —
|
||||
Total private pastes: <?= $profile_total_private ?> —
|
||||
Total views of all your pastes: <?= $profile_total_paste_views ?>
|
||||
<br />
|
||||
<br/>
|
||||
Total favourites of all your pastes: <?= $total_pfav ?> —
|
||||
Total favorites you have given: <?= $total_yfav ?>
|
||||
<br />
|
||||
<br />
|
||||
<br/>
|
||||
<br/>
|
||||
<div class="tabs">
|
||||
<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 === 'favourites' ? 'is-active' : '' ?>" data-target="second-tab"><a href="?tab=favourites">Favorites</a></li>
|
||||
<li class="<?= $tab === 'pastes' ? 'is-active' : '' ?>" data-target="first-tab"><a
|
||||
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>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif; ?>
|
||||
<div class="tab-content<?= $tab === 'favourites' ? ' is-hidden' : '' ?>" id="first-tab">
|
||||
<form class="table_filterer" method="GET">
|
||||
<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>
|
||||
Show
|
||||
|
@ -133,7 +143,8 @@ $public_paste_badges = [
|
|||
</label>
|
||||
<button type="submit" class="button js-hidden">Search</button>
|
||||
</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>
|
||||
<tr class="paginator__sort">
|
||||
<th data-sort-field="title" class="td-right">Title</th>
|
||||
|
@ -151,21 +162,22 @@ $public_paste_badges = [
|
|||
<tbody>
|
||||
<?php foreach ($profile_pastes as $paste): ?>
|
||||
<?php
|
||||
$escaped_title = pp_html_escape(truncate($paste->title, 20, 50));
|
||||
$p_date = new DateTime($paste->created_at);
|
||||
$p_visible = match (intval($paste->visible)) {
|
||||
0 => 'Public',
|
||||
1 => 'Unlisted',
|
||||
2 => 'Private'
|
||||
};
|
||||
$pasteJson = array_merge(
|
||||
$paste->only('id', 'title', 'tags', 'views', 'created_at', 'user_id'),
|
||||
['visibility' => $p_visible]
|
||||
);
|
||||
$escaped_title = pp_html_escape(truncate($paste->title, 20, 50));
|
||||
$p_date = new DateTime($paste->created_at);
|
||||
$p_visible = match (intval($paste->visible)) {
|
||||
0 => 'Public',
|
||||
1 => 'Unlisted',
|
||||
2 => 'Private'
|
||||
};
|
||||
$pasteJson = array_merge(
|
||||
$paste->only('id', 'title', 'tags', 'views', 'created_at', 'user_id'),
|
||||
['visibility' => $p_visible]
|
||||
);
|
||||
?>
|
||||
<?php if ($is_current_user || $paste->visible == Paste::VISIBILITY_PUBLIC): ?>
|
||||
<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">
|
||||
<?= $p_date->format('d F Y') ?>
|
||||
</td>
|
||||
|
@ -175,9 +187,9 @@ $public_paste_badges = [
|
|||
<?php if (can('delete', $paste)): ?>
|
||||
<td class="td-center">
|
||||
<form action="<?= urlForPaste($paste) ?>" method="POST">
|
||||
<input type="hidden" name="delete" value="delete" />
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" />
|
||||
<input type="submit" value="Delete" />
|
||||
<input type="hidden" name="delete" value="delete"/>
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
|
||||
<input type="submit" value="Delete"/>
|
||||
</form>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
|
@ -206,7 +218,8 @@ $public_paste_badges = [
|
|||
</div>
|
||||
<?php if ($is_current_user) { ?>
|
||||
<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>
|
||||
<tr>
|
||||
<th class="td-right">Title</th>
|
||||
|
@ -229,8 +242,10 @@ $public_paste_badges = [
|
|||
?>
|
||||
<?php if ($is_current_user || $row['visible'] == Paste::VISIBILITY_PUBLIC): ?>
|
||||
<tr data-paste-info="<?= pp_html_escape(json_encode($pasteJson)); ?>">
|
||||
<td><a href="<?= urlForPaste($paste) ?>" 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><a href="<?= urlForPaste($paste) ?>"
|
||||
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">
|
||||
<?php if ($delta->days <= 2): ?>
|
||||
<i class='far fa-check-square fa-lg' aria-hidden='true'></i>
|
||||
|
|
|
@ -50,9 +50,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
}
|
||||
</style>
|
||||
<main class="bd-main" id="dstop-scrolling">
|
||||
<!-- <div class="preloader"></div> -->
|
||||
<div class="bd-side-background"></div>
|
||||
<div class="bd-main-container container">
|
||||
<div class="container">
|
||||
<div class="bd-duo">
|
||||
<div class="bd-lead">
|
||||
<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">
|
||||
<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">
|
||||
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/>
|
||||
Created: <?= $paste->created_at ?>
|
||||
<br/>
|
||||
|
@ -100,30 +99,32 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
<?php if ($current_user !== null): ?>
|
||||
<form method="POST" class="form--inline">
|
||||
<?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; ?>
|
||||
<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>
|
||||
<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>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<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") { ?>
|
||||
<a class="icon tool-icon" href="javascript:togglev();"><i
|
||||
class="fas fa-list-ol fa-lg has-text-grey"
|
||||
title="Toggle Line Numbers"></i></a>
|
||||
class="fas fa-list-ol fa-lg has-text-grey"
|
||||
title="Toggle Line Numbers"></i></a>
|
||||
<?php } ?>
|
||||
<a class="icon tool-icon" href="#" onclick="selectText('paste');"><i
|
||||
class="far fa-clipboard fa-lg has-text-grey"
|
||||
title="Select Text"></i></a>
|
||||
class="far fa-clipboard fa-lg has-text-grey"
|
||||
title="Select Text"></i></a>
|
||||
<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
|
||||
class="fas fa-file-download fa-lg has-text-grey"
|
||||
title="Download Paste"></i></a>
|
||||
class="fas fa-file-download fa-lg has-text-grey"
|
||||
title="Download Paste"></i></a>
|
||||
<a class="icon tool-icon embed-tool "><i
|
||||
class="far fa-file-code fa-lg has-text-grey"
|
||||
title="Embed This Paste"></i></a>
|
||||
class="far fa-file-code fa-lg has-text-grey"
|
||||
title="Embed This Paste"></i></a>
|
||||
<a class="icon tool-icon expand-tool"><i class="fas fa-expand-alt has-text-grey"
|
||||
title="Full Screen"></i></a>
|
||||
<div class="panel-embed my-5 is-hidden">
|
||||
|
@ -134,7 +135,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
} else {
|
||||
echo 'paste.php?embed&id=';
|
||||
}
|
||||
echo $paste->id . '"></script>'; ?>' readonly />
|
||||
echo $paste->id . '"></script>'; ?>' readonly/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -164,22 +165,23 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div id="paste" style="line-height: 18px;"><?= $p_content ?></div>
|
||||
<div id="paste" style="line-height: 18px;"><?= $p_content ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if (can('hide', $paste)): ?>
|
||||
<div class="mod-tools">
|
||||
<p>Moderation Tools</p>
|
||||
<form method="post">
|
||||
<?php if (isset($csrf_token)): ?>
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>" />
|
||||
<?php endif; ?>
|
||||
<div class="field">
|
||||
<input class="button is-small <?= $paste->is_hidden ? 'is-success' : 'is-danger' ?>" type="submit" name="hide" id="hide"
|
||||
value="<?= $paste->is_hidden ? 'Unhide' : 'Hide' ?> Paste" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="mod-tools">
|
||||
<p>Moderation Tools</p>
|
||||
<form method="post">
|
||||
<?php if (isset($csrf_token)): ?>
|
||||
<input type="hidden" name="csrf_token" value="<?= $csrf_token ?>"/>
|
||||
<?php endif; ?>
|
||||
<div class="field">
|
||||
<input class="button is-small <?= $paste->is_hidden ? 'is-success' : 'is-danger' ?>"
|
||||
type="submit" name="hide" id="hide"
|
||||
value="<?= $paste->is_hidden ? 'Unhide' : 'Hide' ?> Paste"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<!-- Guests -->
|
||||
<?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>
|
||||
</header>
|
||||
<?php } ?>
|
||||
<?php } else if (can('edit', $paste)) { ?>
|
||||
<?php } elseif (can('edit', $paste)) { ?>
|
||||
<!-- Paste Panel -->
|
||||
<hr>
|
||||
<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">
|
||||
<input type="text" class="input" name="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">
|
||||
<i class="fa fa-font"></i>
|
||||
</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">
|
||||
<a class="button"
|
||||
onclick="highlight(document.getElementById('code')); return false;"><i
|
||||
class="fa fa-indent"></i> Highlight</a>
|
||||
class="fa fa-indent"></i> Highlight</a>
|
||||
</div>
|
||||
<div class="level-item mx-1">
|
||||
<?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; ?>
|
||||
<input class="button is-info" type="submit" name="edit" id="edit"
|
||||
value="Save Changes" />
|
||||
value="Save Changes"/>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
@ -256,7 +258,9 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
<div class="control">
|
||||
<div class="control">
|
||||
<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>
|
||||
|
@ -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="field">
|
||||
<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">
|
||||
<!-- Expiry -->
|
||||
<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="field">
|
||||
<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
|
||||
|
||||
</div>
|
||||
<div class="control">
|
||||
|
@ -297,14 +303,14 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
<div class="select">
|
||||
<select name="visibility">
|
||||
<?php
|
||||
$visibility_names = ['Public', 'Unlisted'];
|
||||
$visibility_codes = ['0', '1'];
|
||||
if ($current_user) {
|
||||
$visibility_names[] = 'Private';
|
||||
$visibility_codes[] = '2';
|
||||
}
|
||||
$visibility_names = ['Public', 'Unlisted'];
|
||||
$visibility_codes = ['0', '1'];
|
||||
if ($current_user) {
|
||||
$visibility_names[] = 'Private';
|
||||
$visibility_codes[] = '2';
|
||||
}
|
||||
|
||||
echo optionsForSelect($visibility_names, $visibility_codes, $paste->visible);
|
||||
echo optionsForSelect($visibility_names, $visibility_codes, $paste->visible);
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -319,7 +325,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
<div class="columns">
|
||||
<div class="column">
|
||||
<input type="text" class="input" name="pass" id="pass" value=""
|
||||
placeholder="Password" autocomplete="new-password" />
|
||||
placeholder="Password" autocomplete="new-password"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -329,7 +335,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
<!-- Encrypted -->
|
||||
<div class="b-checkbox is-info is-inline">
|
||||
<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">
|
||||
Encrypt on server (always enabled)
|
||||
</label>
|
||||
|
@ -338,9 +344,7 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
|
|||
</div>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
|
Loading…
Add table
Reference in a new issue