138 lines
6.9 KiB
PHP
138 lines
6.9 KiB
PHP
<?php
|
|
require_once 'db/config.php';
|
|
|
|
// Log visit
|
|
try {
|
|
$pdo = db();
|
|
$stmt = $pdo->prepare("INSERT INTO view_logs (page_name) VALUES (?)");
|
|
$stmt->execute(['New View Page']);
|
|
} catch (Exception $e) {}
|
|
|
|
$pageTitle = "New View Test - " . ($_SERVER['PROJECT_NAME'] ?? 'Internal App');
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?php echo $pageTitle; ?></title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body>
|
|
|
|
<div id="wrapper">
|
|
<!-- Sidebar -->
|
|
<nav id="sidebar">
|
|
<div class="sidebar-header">
|
|
<i class="fas fa-microchip me-2"></i> DevTester
|
|
</div>
|
|
<div class="sidebar-menu">
|
|
<a href="index.php"><i class="fas fa-tachometer-alt"></i> Dashboard</a>
|
|
<a href="new-view.php" class="active"><i class="fas fa-plus-square"></i> New View</a>
|
|
<a href="#"><i class="fas fa-history"></i> Audit Logs</a>
|
|
<hr class="mx-3 opacity-10">
|
|
<a href="#"><i class="fas fa-cog"></i> Settings</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<!-- Page Content -->
|
|
<div id="content">
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-white border-bottom mb-4 p-2 rounded">
|
|
<div class="container-fluid">
|
|
<button type="button" id="sidebarCollapse" class="btn btn-outline-dark d-lg-none me-2">
|
|
<i class="fas fa-align-left"></i>
|
|
</button>
|
|
<nav aria-label="breadcrumb">
|
|
<ol class="breadcrumb mb-0">
|
|
<li class="breadcrumb-item"><a href="index.php" class="text-decoration-none">Home</a></li>
|
|
<li class="breadcrumb-item active" aria-current="page">New View Page</li>
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="container-fluid p-0">
|
|
<div class="row mb-4">
|
|
<div class="col-12">
|
|
<h4 class="fw-bold text-dark">Component Playground</h4>
|
|
<p class="text-muted">Use this space to test new layout components and UI elements.</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-lg-8">
|
|
<div class="card">
|
|
<div class="card-header d-flex justify-content-between align-items-center">
|
|
<span>Sample Form Layout</span>
|
|
<span class="badge bg-success">Functional</span>
|
|
</div>
|
|
<div class="card-body">
|
|
<form onsubmit="event.preventDefault(); showToast('Form submission simulated successfully!');">
|
|
<div class="mb-3">
|
|
<label class="form-label small fw-bold">View Name</label>
|
|
<input type="text" class="form-control form-control-sm" placeholder="e.g. User Profile Beta">
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="form-label small fw-bold">Description</label>
|
|
<textarea class="form-control form-control-sm" rows="3"></textarea>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<div class="col">
|
|
<label class="form-label small fw-bold">Visibility</label>
|
|
<select class="form-select form-select-sm">
|
|
<option>Internal Only</option>
|
|
<option>Public</option>
|
|
</select>
|
|
</div>
|
|
<div class="col">
|
|
<label class="form-label small fw-bold">Priority</label>
|
|
<div class="pt-1">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="radio" name="priority" id="p1" value="option1">
|
|
<label class="form-check-label small" for="p1">High</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="radio" name="priority" id="p2" value="option2" checked>
|
|
<label class="form-check-label small" for="p2">Low</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Save View Config</button>
|
|
<button type="reset" class="btn btn-link text-dark text-decoration-none small">Cancel</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-4">
|
|
<div class="card mb-4">
|
|
<div class="card-header">UI Guidelines</div>
|
|
<div class="card-body small">
|
|
<ul class="ps-3 mb-0">
|
|
<li>Use <b>Inter</b> font stack.</li>
|
|
<li>Prefer <b>compact</b> spacing.</li>
|
|
<li>Avoid <b>gradients</b>.</li>
|
|
<li>Keep borders <b>subtle</b> (#dee2e6).</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="alert alert-info border-0 shadow-sm" style="border-left: 4px solid #0dcaf0 !important;">
|
|
<h6 class="alert-heading fw-bold"><i class="fas fa-info-circle me-2"></i>Testing Tip</h6>
|
|
<p class="small mb-0">You can trigger global notifications using the <code>showToast(msg)</code> JS function.</p>
|
|
<button class="btn btn-sm btn-info text-white mt-2" onclick="showToast('Testing notification system...')">Try Notification</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
</body>
|
|
</html>
|