NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

<!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>
<style>
#adminModal {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: white;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
#admin-controls {
display: none;
margin-top: 20px;
}
.admin-option {
margin: 10px 0;
}
</style>
</head>
<body>

<button onclick="openAdminModal()">Login as Admin</button>

<div id="adminModal">
<h2>Admin Login</h2>
<input type="text" id="admin-username" placeholder="Username" required>
<input type="password" id="admin-password" placeholder="Password" required>
<button onclick="loginAdmin()">Login</button>
<button onclick="closeAdminModal()">Cancel</button>
</div>

<div id="admin-controls">
<h2>Admin Panel</h2>
<div class="admin-option">
<h3>Update Event Data</h3>
<input type="number" id="edit-total-events" placeholder="Total Events">
<input type="number" id="edit-upcoming-events" placeholder="Upcoming Events">
<input type="number" id="edit-total-attendees" placeholder="Total Attendees">
<input type="number" id="edit-pending-approvals" placeholder="Pending Approvals">
<button onclick="updateAdminData()">Update</button>
</div>
<div class="admin-option">
<h3>Other Admin Functions</h3>
<button onclick="alert('Other Function 1')">Function 1</button>
<button onclick="alert('Other Function 2')">Function 2</button>
</div>
</div>

<div id="event-summary">
<h2>Event Summary</h2>
<p>Total Events: <span id="total-events">0</span></p>
<p>Upcoming Events: <span id="upcoming-events">0</span></p>
<p>Total Attendees: <span id="total-attendees">0</span></p>
<p>Pending Approvals: <span id="pending-approvals">0</span></p>
</div>

<script>
let isAdmin = false;

// Example credentials
const adminCredentials = {
username: 'admin',
password: 'admin123'
};

function openAdminModal() {
document.getElementById('adminModal').style.display = 'block';
}

function closeAdminModal() {
document.getElementById('adminModal').style.display = 'none';
}

function loginAdmin() {
const username = document.getElementById('admin-username').value;
const password = document.getElementById('admin-password').value;

if (username === adminCredentials.username && password === adminCredentials.password) {
isAdmin = true;
closeAdminModal();
document.getElementById('admin-controls').style.display = 'block';
} else {
alert("Invalid credentials. Please try again.");
}
}

function updateAdminData() {
if (!isAdmin) {
alert("You must be logged in as an admin to update data.");
return;
}

const totalEvents = parseInt(document.getElementById('edit-total-events').value) || 0;
const upcomingEvents = parseInt(document.getElementById('edit-upcoming-events').value) || 0;
const totalAttendees = parseInt(document.getElementById('edit-total-attendees').value) || 0;
const pendingApprovals = parseInt(document.getElementById('edit-pending-approvals').value) || 0;

document.getElementById('total-events').innerText = totalEvents;
document.getElementById('upcoming-events').innerText = upcomingEvents;
document.getElementById('total-attendees').innerText = totalAttendees;
document.getElementById('pending-approvals').innerText = pendingApprovals;

// Reset input fields
document.getElementById('edit-total-events').value = '';
document.getElementById('edit-upcoming-events').value = '';
document.getElementById('edit-total-attendees').value = '';
document.getElementById('edit-pending-approvals').value = '';
}
</script>

</body>
</html>
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.