mms
This commit is contained in:
parent
fa5d542004
commit
b1030df0f7
18
accounts.php
Normal file
18
accounts.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
$page_title = 'Akun PPPoE/Hotspot';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<button class="btn btn-primary"><i data-feather="plus" class="mr-2"></i>Create Account</button>
|
||||
</div>
|
||||
<hr>
|
||||
<p>PPPoE/Hotspot account management page content goes here.</p>
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
188
assets/css/custom.css
Normal file
188
assets/css/custom.css
Normal file
@ -0,0 +1,188 @@
|
||||
/* General Body Styles */
|
||||
body {
|
||||
font-family: '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', 'sans-serif';
|
||||
background-color: #F8F9FA;
|
||||
color: #212529;
|
||||
display: flex;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: 'Georgia', serif;
|
||||
}
|
||||
|
||||
/* Main Wrapper */
|
||||
.wrapper {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
/* Sidebar Styles */
|
||||
#sidebar {
|
||||
min-width: 250px;
|
||||
max-width: 250px;
|
||||
background: #FFFFFF;
|
||||
color: #212529;
|
||||
transition: all 0.3s;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#sidebar.active {
|
||||
margin-left: -250px;
|
||||
}
|
||||
|
||||
#sidebar .sidebar-header {
|
||||
padding: 20px;
|
||||
background: linear-gradient(45deg, rgba(0, 123, 255, 0.1), rgba(0, 123, 255, 0));
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#sidebar .sidebar-header h3 {
|
||||
color: #0056b3;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#sidebar ul.components {
|
||||
padding: 20px 0;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
#sidebar ul p {
|
||||
color: #212529;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#sidebar ul li a {
|
||||
padding: 15px 20px;
|
||||
font-size: 1.1em;
|
||||
display: block;
|
||||
color: #343a40;
|
||||
border-left: 3px solid transparent;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
#sidebar ul li a:hover {
|
||||
color: #007BFF;
|
||||
background: #F8F9FA;
|
||||
border-left-color: #007BFF;
|
||||
}
|
||||
|
||||
#sidebar ul li.active > a, a[aria-expanded="true"] {
|
||||
color: #0056b3;
|
||||
background: #F8F9FA;
|
||||
border-left-color: #007BFF;
|
||||
}
|
||||
|
||||
#sidebar .logout-link a {
|
||||
border-top: 1px solid #e9ecef;
|
||||
}
|
||||
|
||||
/* Content Styles */
|
||||
#content {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
min-height: 100vh;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
padding: 15px 10px;
|
||||
background: #fff;
|
||||
border: none;
|
||||
border-radius: 0.5rem;
|
||||
margin-bottom: 40px;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-family: 'Georgia', serif;
|
||||
color: #0056b3;
|
||||
}
|
||||
|
||||
#sidebarCollapse {
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: #007BFF;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
#sidebarCollapse:hover {
|
||||
color: #0056b3;
|
||||
}
|
||||
|
||||
/* Dashboard Widgets */
|
||||
.card {
|
||||
border-radius: 0.5rem;
|
||||
border: none;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.07);
|
||||
transition: transform 0.2s;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background: linear-gradient(45deg, rgba(0, 123, 255, 0.05), rgba(0, 123, 255, 0));
|
||||
font-family: 'Georgia', serif;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
}
|
||||
|
||||
/* Login Page Styles */
|
||||
.login-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.login-wrapper {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: 40px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 25px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.login-wrapper h2 {
|
||||
text-align: center;
|
||||
margin-bottom: 1.5rem;
|
||||
color: #0056b3;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.75rem 1rem;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #007BFF;
|
||||
border-color: #007BFF;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.75rem;
|
||||
font-weight: bold;
|
||||
transition: background-color 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #0056b3;
|
||||
border-color: #0056b3;
|
||||
box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
|
||||
}
|
||||
|
||||
/* Feather Icons */
|
||||
i.feather {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
stroke-width: 2;
|
||||
vertical-align: text-bottom;
|
||||
margin-right: 10px;
|
||||
}
|
||||
12
assets/js/main.js
Normal file
12
assets/js/main.js
Normal file
@ -0,0 +1,12 @@
|
||||
// Main javascript file
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
const sidebarCollapse = document.getElementById('sidebarCollapse');
|
||||
const sidebar = document.getElementById('sidebar');
|
||||
|
||||
if (sidebarCollapse) {
|
||||
sidebarCollapse.addEventListener('click', function () {
|
||||
sidebar.classList.toggle('active');
|
||||
});
|
||||
}
|
||||
});
|
||||
8
auth.php
Normal file
8
auth.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if (!isset($_SESSION['user'])) {
|
||||
header('Location: login.php');
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
14
billing.php
Normal file
14
billing.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
$page_title = 'Billing';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<h1 class="h3 mb-4 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<p>Billing page content goes here.</p>
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
244
index.php
244
index.php
@ -1,150 +1,104 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
@ini_set('display_errors', '1');
|
||||
@error_reporting(E_ALL);
|
||||
@date_default_timezone_set('UTC');
|
||||
require_once 'auth.php';
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
$phpVersion = PHP_VERSION;
|
||||
$now = date('Y-m-d H:i:s');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>New Style</title>
|
||||
<?php
|
||||
// Read project preview data from environment
|
||||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||||
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
?>
|
||||
<?php if ($projectDescription): ?>
|
||||
<!-- Meta description -->
|
||||
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<!-- Twitter meta tags -->
|
||||
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<?php endif; ?>
|
||||
<?php if ($projectImageUrl): ?>
|
||||
<!-- Open Graph image -->
|
||||
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<!-- Twitter image -->
|
||||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<?php endif; ?>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
@keyframes bg-pan {
|
||||
0% { background-position: 0% 0%; }
|
||||
100% { background-position: 100% 100%; }
|
||||
}
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.loader {
|
||||
margin: 1.25rem auto 1.25rem;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border: 3px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
.hint {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px; height: 1px;
|
||||
padding: 0; margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap; border: 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
code {
|
||||
background: rgba(0,0,0,0.2);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="wrapper">
|
||||
<?php require_once 'partials/sidebar.php'; ?>
|
||||
|
||||
<!-- Page Content -->
|
||||
<div id="content">
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
<div class="container-fluid">
|
||||
|
||||
<button type="button" id="sidebarCollapse" class="btn btn-info">
|
||||
<i data-feather="align-left"></i>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ms-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i data-feather="user" class="me-2"></i><?php echo htmlspecialchars($_SESSION['user']['username']); ?> (<?php echo htmlspecialchars($_SESSION['user']['role']); ?>)
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="navbarDropdown">
|
||||
<li><a class="dropdown-item" href="#">Profile</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="logout.php">Logout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<h2>Dashboard</h2>
|
||||
<p>Welcome to your Mikrotik management dashboard. Here's a summary of your network.</p>
|
||||
|
||||
<div class="row g-4 mb-4">
|
||||
<!-- Summary Widgets -->
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<div class="card text-white bg-primary">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><i data-feather="users" class="me-2"></i> Pelanggan Aktif</h5>
|
||||
<p class="card-text fs-4">-</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<div class="card text-white bg-warning">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><i data-feather="alert-triangle" class="me-2"></i> Pending Suspend</h5>
|
||||
<p class="card-text fs-4">-</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<div class="card text-white bg-danger">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><i data-feather="file-minus" class="me-2"></i> Tagihan Overdue</h5>
|
||||
<p class="card-text fs-4">-</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-3">
|
||||
<div class="card text-white bg-success">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title"><i data-feather="dollar-sign" class="me-2"></i> Pendapatan Bulan Ini</h5>
|
||||
<p class="card-text fs-4">-</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row g-4">
|
||||
<div class="col-lg-8">
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your website…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
<div class="card-header">
|
||||
<i data-feather="activity" class="me-2"></i> Recent Activity / Log
|
||||
</div>
|
||||
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
||||
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
||||
<div class="card-body">
|
||||
<p class="text-muted">Placeholder for recent activities...</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<i data-feather="zap" class="me-2"></i> Quick Actions
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-outline-primary"><i data-feather="file-plus" class="me-2"></i> Buat Voucher</button>
|
||||
<button class="btn btn-outline-secondary"><i data-feather="user-plus" class="me-2"></i> Buat Akun PPPoE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
62
login.php
Normal file
62
login.php
Normal file
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
// If user is already logged in, redirect to dashboard
|
||||
if (isset($_SESSION['user'])) {
|
||||
header('Location: index.php');
|
||||
exit();
|
||||
}
|
||||
|
||||
$error = '';
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$username = $_POST['username'] ?? '';
|
||||
$password = $_POST['password'] ?? '';
|
||||
|
||||
// Hardcoded user credentials
|
||||
$users = [
|
||||
'admin' => ['password' => 'admin123', 'role' => 'Administrator'],
|
||||
'user' => ['password' => 'user123', 'role' => 'Operator'],
|
||||
];
|
||||
|
||||
if (isset($users[$username]) && $users[$username]['password'] === $password) {
|
||||
$_SESSION['user'] = [
|
||||
'username' => $username,
|
||||
'role' => $users[$username]['role']
|
||||
];
|
||||
header('Location: index.php');
|
||||
exit();
|
||||
} else {
|
||||
$error = 'Invalid username or password!';
|
||||
}
|
||||
}
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="login-container">
|
||||
<div class="login-wrapper">
|
||||
<h2>Mikrotik Manager</h2>
|
||||
<p class="text-center text-muted mb-4">Please sign in to continue</p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<?php echo htmlspecialchars($error); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form action="login.php" method="POST">
|
||||
<div class="mb-3">
|
||||
<label for="username" class="form-label">Username</label>
|
||||
<input type="text" class="form-control" id="username" name="username" required autofocus>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="password" class="form-label">Password</label>
|
||||
<input type="password" class="form-control" id="password" name="password" required>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary w-100">Sign In</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
6
logout.php
Normal file
6
logout.php
Normal file
@ -0,0 +1,6 @@
|
||||
<?php
|
||||
session_start();
|
||||
session_destroy();
|
||||
header('Location: login.php');
|
||||
exit();
|
||||
?>
|
||||
14
monitoring.php
Normal file
14
monitoring.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
$page_title = 'Monitoring';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<h1 class="h3 mb-4 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<p>Monitoring page content goes here.</p>
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
25
packages.php
Normal file
25
packages.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
// Restrict access to Administrators
|
||||
if ($_SESSION['user']['role'] !== 'Administrator') {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$page_title = 'Paket Layanan';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<button class="btn btn-primary"><i data-feather="plus" class="mr-2"></i>Add Package</button>
|
||||
</div>
|
||||
<hr>
|
||||
<p>Service package management page content goes here.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
13
partials/footer.php
Normal file
13
partials/footer.php
Normal file
@ -0,0 +1,13 @@
|
||||
<!-- Bootstrap Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Custom JS -->
|
||||
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||
|
||||
<script>
|
||||
// Initialize Feather Icons
|
||||
feather.replace();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
33
partials/header.php
Normal file
33
partials/header.php
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>managemen mikrotik</title>
|
||||
<meta name="description" content="Aplikasi manajemen pelanggan Mikrotik terintegrasi dengan RouterOS API untuk kemudahan pengelolaan.">
|
||||
<meta name="keywords" content="mikrotik, routeros, pppoe, hotspot, billing, voucher, manajemen pelanggan, isp, Built with Flatlogic Generator">
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="managemen mikrotik">
|
||||
<meta property="og:description" content="Aplikasi manajemen pelanggan Mikrotik terintegrasi dengan RouterOS API untuk kemudahan pengelolaan.">
|
||||
<meta property="og:image" content="<?php echo isset($_SERVER['PROJECT_IMAGE_URL']) ? htmlspecialchars($_SERVER['PROJECT_IMAGE_URL']) : ''; ?>">
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary_large_image">
|
||||
<meta property="twitter:title" content="managemen mikrotik">
|
||||
<meta property="twitter:description" content="Aplikasi manajemen pelanggan Mikrotik terintegrasi dengan RouterOS API untuk kemudahan pengelolaan.">
|
||||
<meta property="twitter:image" content="<?php echo isset($_SERVER['PROJECT_IMAGE_URL']) ? htmlspecialchars($_SERVER['PROJECT_IMAGE_URL']) : ''; ?>">
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
|
||||
<!-- Feather Icons -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
49
partials/sidebar.php
Normal file
49
partials/sidebar.php
Normal file
@ -0,0 +1,49 @@
|
||||
<?php
|
||||
$user_role = $_SESSION['user']['role'] ?? '';
|
||||
$current_page = basename($_SERVER['PHP_SELF']);
|
||||
?>
|
||||
<nav id="sidebar">
|
||||
<div class="sidebar-header">
|
||||
<h3>Mikrotik CRM</h3>
|
||||
</div>
|
||||
|
||||
<ul class="list-unstyled components">
|
||||
<li class="<?php echo ($current_page == 'index.php') ? 'active' : ''; ?>">
|
||||
<a href="index.php"><i data-feather="grid"></i> Dashboard</a>
|
||||
</li>
|
||||
|
||||
<?php if ($user_role === 'Administrator'): ?>
|
||||
<li class="<?php echo ($current_page == 'routers.php') ? 'active' : ''; ?>">
|
||||
<a href="routers.php"><i data-feather="server"></i> Routers</a>
|
||||
</li>
|
||||
<li class="<?php echo ($current_page == 'packages.php') ? 'active' : ''; ?>">
|
||||
<a href="packages.php"><i data-feather="package"></i> Paket Layanan</a>
|
||||
</li>
|
||||
<li class="<?php echo ($current_page == 'users.php') ? 'active' : ''; ?>">
|
||||
<a href="users.php"><i data-feather="users"></i> Operators</a>
|
||||
</li>
|
||||
<li class="<?php echo ($current_page == 'settings.php') ? 'active' : ''; ?>">
|
||||
<a href="settings.php"><i data-feather="settings"></i> Pengaturan</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
<li class="<?php echo ($current_page == 'vouchers.php') ? 'active' : ''; ?>">
|
||||
<a href="vouchers.php"><i data-feather="file-text"></i> Vouchers</a>
|
||||
</li>
|
||||
<li class="<?php echo ($current_page == 'accounts.php') ? 'active' : ''; ?>">
|
||||
<a href="accounts.php"><i data-feather="user-plus"></i> Akun PPPoE/Hotspot</a>
|
||||
</li>
|
||||
<li class="<?php echo ($current_page == 'monitoring.php') ? 'active' : ''; ?>">
|
||||
<a href="monitoring.php"><i data-feather="bar-chart-2"></i> Monitoring</a>
|
||||
</li>
|
||||
<li class="<?php echo ($current_page == 'billing.php') ? 'active' : ''; ?>">
|
||||
<a href="billing.php"><i data-feather="dollar-sign"></i> Billing</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="list-unstyled logout-link">
|
||||
<li>
|
||||
<a href="logout.php"><i data-feather="log-out"></i> Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
25
routers.php
Normal file
25
routers.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
// Restrict access to Administrators
|
||||
if ($_SESSION['user']['role'] !== 'Administrator') {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$page_title = 'Routers';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<button class="btn btn-primary"><i data-feather="plus" class="mr-2"></i>Add Router</button>
|
||||
</div>
|
||||
<hr>
|
||||
<p>Router management page content goes here.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
20
settings.php
Normal file
20
settings.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
// Restrict access to Administrators
|
||||
if ($_SESSION['user']['role'] !== 'Administrator') {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$page_title = 'Pengaturan';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<h1 class="h3 mb-4 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<p>Settings page content goes here.</p>
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
25
users.php
Normal file
25
users.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
// Restrict access to Administrators
|
||||
if ($_SESSION['user']['role'] !== 'Administrator') {
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$page_title = 'Operators';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<button class="btn btn-primary"><i data-feather="plus" class="mr-2"></i>Add Operator</button>
|
||||
</div>
|
||||
<hr>
|
||||
<p>Operator management page content goes here.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
18
vouchers.php
Normal file
18
vouchers.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
require_once 'auth.php';
|
||||
|
||||
$page_title = 'Vouchers';
|
||||
|
||||
require_once 'partials/header.php';
|
||||
?>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<h1 class="h3 mb-0 text-gray-800"><?php echo $page_title; ?></h1>
|
||||
<button class="btn btn-primary"><i data-feather="plus" class="mr-2"></i>Create Voucher</button>
|
||||
</div>
|
||||
<hr>
|
||||
<p>Voucher management page content goes here.</p>
|
||||
</div>
|
||||
|
||||
<?php require_once 'partials/footer.php'; ?>
|
||||
Loading…
x
Reference in New Issue
Block a user