initial commit
This commit is contained in:
commit
061959cf6f
BIN
lib/__pycache__/reqs.cpython-310.pyc
Normal file
BIN
lib/__pycache__/reqs.cpython-310.pyc
Normal file
Binary file not shown.
27
static/styles.css
Normal file
27
static/styles.css
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/* Base styles */
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;
|
||||||
|
padding: 1em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
padding: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile styles */
|
||||||
|
@media (max-width: 600px) {
|
||||||
|
header {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
main {
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
}
|
47
templates/index.html
Normal file
47
templates/index.html
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
<!-- templates/index.html -->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>KTV Manager</title>
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Navbar -->
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||||
|
<a class="navbar-brand" href="#">KTV Manager</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/accounts">Accounts</a> <!-- Link to the URLs page -->
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/urls">URLs</a> <!-- Link to the URLs page -->
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Main Content -->
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h1>Welcome to KTV Manager</h1>
|
||||||
|
<!-- <p>This website is built using Flask and Bootstrap. It’s designed to look great on any screen size!</p> -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="bg-dark text-white text-center py-3 mt-5">
|
||||||
|
<p>© 2024 KTV Manager | All rights reserved</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.0.7/dist/umd/popper.min.js"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
63
templates/urls.html
Normal file
63
templates/urls.html
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<!-- templates/urls.html -->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>URLs List</title>
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Navbar (same as index.html) -->
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||||
|
<a class="navbar-brand" href="#">KTV Manager</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/accounts">Accounts</a> <!-- Link to the URLs page -->
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/urls">URLs</a> <!-- Link to the URLs page -->
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Main Content -->
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h2>URLs</h2>
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>URL</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for url in urls %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ loop.index }}</td>
|
||||||
|
<td><a href="{{ url }}" target="_blank">{{ url }}</a></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="bg-dark text-white text-center py-3 mt-5">
|
||||||
|
<p>© 2024 My Site | All rights reserved</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.0.7/dist/umd/popper.min.js"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
114
templates/user_accounts.html
Normal file
114
templates/user_accounts.html
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<!-- templates/user_accounts.html -->
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>User Accounts</title>
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
|
||||||
|
<style>
|
||||||
|
/* Blur effect for the password field */
|
||||||
|
.password-blur {
|
||||||
|
filter: blur(4px);
|
||||||
|
transition: filter 0.3s ease;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Navbar (same as index.html) -->
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||||
|
<a class="navbar-brand" href="#">KTV Manager</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/">Home</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/accounts">Accounts</a> <!-- Link to the accounts page -->
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="/urls">URLs</a> <!-- Link to the URLs page -->
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Main Content -->
|
||||||
|
<div class="container mt-5">
|
||||||
|
<h2>User Accounts</h2>
|
||||||
|
<table class="table table-striped" id="accountsTable">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Username</th>
|
||||||
|
<th>Stream</th>
|
||||||
|
<th>Stream URL</th>
|
||||||
|
<th>Expiry Date</th>
|
||||||
|
<th>Password</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for account in user_accounts %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ loop.index }}</td>
|
||||||
|
<td>{{ account.username }}</td>
|
||||||
|
<td>{{ account.stream }}</td>
|
||||||
|
<td><a href="{{ account.streamURL }}" target="_blank">{{ account.streamURL }}</a></td>
|
||||||
|
<td>{{ account.expiaryDate }}</td> <!-- Ensure this is in d/m/Y format -->
|
||||||
|
<td class="password-cell" data-password="{{ account.password }}">
|
||||||
|
<span class="password-blur">********</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<footer class="bg-dark text-white text-center py-3 mt-5">
|
||||||
|
<p>© 2024 My Site | All rights reserved</p>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.0.7/dist/umd/popper.min.js"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
||||||
|
<script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Custom sorting for dates in DD/MM/YYYY format
|
||||||
|
$.fn.dataTable.ext.type.order['date-eu'] = function(data) {
|
||||||
|
const parts = data.split('/');
|
||||||
|
return new Date(parts[2], parts[1] - 1, parts[0]).getTime();
|
||||||
|
};
|
||||||
|
|
||||||
|
const table = $('#accountsTable').DataTable({
|
||||||
|
"searching": true,
|
||||||
|
"ordering": true,
|
||||||
|
"columnDefs": [
|
||||||
|
{ "type": "date-eu", "targets": 4 } // Column index for Expiry Date
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Use event delegation for password cell clicks
|
||||||
|
$('#accountsTable tbody').on('click', '.password-cell', function() {
|
||||||
|
const $cell = $(this);
|
||||||
|
const password = $cell.data('password');
|
||||||
|
$cell.html(password); // Display the actual password
|
||||||
|
$cell.removeClass('password-blur'); // Remove blur effect
|
||||||
|
|
||||||
|
// Add click outside event to blur it again
|
||||||
|
$(document).one('click', function(event) {
|
||||||
|
if (!$(event.target).closest('.password-cell').length) {
|
||||||
|
$cell.html('<span class="password-blur">********</span>'); // Restore blurred password
|
||||||
|
$cell.addClass('password-blur'); // Restore blur effect
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
x
Reference in New Issue
Block a user