File "edit-pages.php"
Full path: /home/u525140468/domains/productsizer.com/public_html/admin/edit-pages.php
File
size: 2.52 B (2.52 KB bytes)
MIME-type: text/x-php
Charset: utf-8
Download Open Edit Advanced Editor Back
<?php
// === CONFIGURATION ===
$basePath = dirname(__DIR__) . '/';
$cssDir = $basePath . 'assets/css/';
$jsDir = $basePath . 'assets/js/';
$iconDir = $basePath . 'assets/icons/';
// Create directories if they don't exist
$directories = [$cssDir, $jsDir, $iconDir];
foreach ($directories as $dir) {
if (!is_dir($dir)) {
mkdir($dir, 0777, true);
}
}
// Define the pages to display
$pages = [
'about' => 'About',
'contact' => 'Contact',
'terms' => 'Terms & Conditions',
'privacy' => 'Privacy Policy',
'faq' => 'FAQ'
];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Edit Pages</title>
<?php include "data/styles.php"?>
</head>
<body class="bg-gray-100 min-h-screen p-6 text-gray-800">
<div class="max-w-3xl mx-auto bg-white shadow-lg p-6 rounded-2xl">
<!-- Page Header -->
<div class="text-2xl font-semibold mb-4 text-center flex items-center justify-center gap-2">
📝 Edit Pages
</div>
<!-- Pages List -->
<h2 class="text-xs mb-4 pb-2 font-medium text-gray-400 uppercase">Available Pages</h2>
<div class="grid gap-3">
<?php if (empty($pages)): ?>
<p class="text-gray-500 italic py-4">No pages available.</p>
<?php else: ?>
<?php $i = 1; foreach ($pages as $key => $displayName): ?>
<div class="flex items-center justify-between bg-gray-50 rounded-xl p-4 hover:bg-blue-50 transition-all">
<div class="flex items-center gap-3 text-base font-medium text-gray-800">
<span class="text-gray-400 font-semibold"><?= $i++ ?>.</span>
<span><?= $displayName ?></span>
</div>
<div class="flex gap-4">
<a href="../page?<?= $key ?>" target="_blank" title="View Page"
class="text-blue-600 hover:text-blue-800 flex items-center gap-1">
<i data-lucide="eye" class="w-5 h-5"></i>
</a>
<a href="editor.php?tool=<?= urlencode($key) ?>" title="Edit Page"
class="text-green-600 hover:text-green-800 flex items-center gap-1">
<i data-lucide="edit" class="w-5 h-5"></i>
</a>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</body>
</html>