68 lines
No EOL
3.4 KiB
HTML
68 lines
No EOL
3.4 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>admin panel</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}">
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<div class="navbar">
|
|
{% if session.username != Anonymous %}
|
|
<a>logged in as: <span style="color: yellow;">{{ session.username }}</span></a>
|
|
{% endif %}
|
|
<a href="{{ url_for('index') }}">home</a>
|
|
<a href="{{ url_for('login') }}">login</a>
|
|
<a href="{{ url_for('logout') }}">logout</a>
|
|
<a href="{{ url_for('board', board_name='b') }}">/b/</a>
|
|
<a href="{{ url_for('board', board_name='g') }}">/g/</a>
|
|
<a href="{{ url_for('board', board_name='a') }}">/a/</a>
|
|
<a href="{{ url_for('board', board_name='v') }}">/v/</a>
|
|
<a href="{{ url_for('board', board_name='w') }}">/w/</a>
|
|
<a href="{{ url_for('board', board_name='x') }}">/x/</a>
|
|
<a href="{{ url_for('board', board_name='t') }}">/t/</a>
|
|
<a href="{{ url_for('board', board_name='s') }}">/s/</a>
|
|
<a href="{{ url_for('board', board_name='pol') }}">/pol/</a>
|
|
</div>
|
|
<h1>admin panel</h1>
|
|
<div class="stats">
|
|
<h4>stats</h4>
|
|
<p>total posts: <span style="color: yellow;">{{ total_posts }}</span></p>
|
|
<p>total users: <span style="color: yellow;">{{ total_users }}</span></p>
|
|
<p>nuke count: <span style="color: yellow;">{{ nuke_count }}</span></p>
|
|
</div>
|
|
<div class="admin_actions">
|
|
<div class="admin_action">
|
|
<h4>delete post</h4>
|
|
<h4 style="color: yellow;">{{ success1 }}</h4>
|
|
<form action="{{ url_for('deletepost') }}" method="post">
|
|
<input type="text" name="post_id" placeholder="post id">
|
|
<button type="submit">delete</button>
|
|
</form>
|
|
</div>
|
|
<div class="admin_action">
|
|
<h4>delete user</h4>
|
|
<h4 style="color: yellow;">{{ success2 }}</h4>
|
|
{% for user in users %}
|
|
{% if user.username != 'admin' %}
|
|
<form action="{{ url_for('deleteuser') }}" method="post" class="user_list">
|
|
<a>{{ user.username }}</a>
|
|
<input type="hidden" name="user_id" value="{{ user._id }}">
|
|
<button type="submit">delete</button>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</form>
|
|
</div>
|
|
<div class="admin_action">
|
|
<h4>nuke board</h4>
|
|
<h4 style="color: yellow;">{{ success3 }}</h4>
|
|
<form action="{{ url_for('nukeboard') }}" method="post">
|
|
<input type="text" name="board_name" placeholder="board">
|
|
<button type="submit">nuke</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |