diff --git a/.gitignore b/.gitignore index f3ec2be..b18b804 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ temp_restore_*/ # Logs error_log access_log +*.log # Debug and utility scripts debug_db.php diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..70ec44b --- /dev/null +++ b/.htaccess @@ -0,0 +1,20 @@ +# Disable Directory Listing +Options -Indexes + +# Protect sensitive files + + Order allow,deny + Deny from all + + +# Protect config files + + Order allow,deny + Deny from all + + +# Protect SQL files + + Order allow,deny + Deny from all + diff --git a/README.md b/README.md index fb8acb9..33dae9e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -<<<<<<< HEAD # Podcast Server 🚀 A lightweight, professional-grade podcast hosting and management platform designed for churches and small organizations. Built with PHP 8 and MySQL, this system provides a seamless way to host audio content, track analytics, and engage listeners via push notifications. @@ -84,8 +83,3 @@ Feel free to fork this project and submit pull requests to the [Linology Git](ht ## 📄 License This project is licensed under the MIT License. -======= -# Podcast-server - -A lightweight, professional-grade podcast hosting and management platform designed for churches and small organizations. Built with PHP 8 and MySQL, this system provides a seamless way to host audio content, track analytics, and engage listeners via push notifications. ->>>>>>> de0edf94110f2fe94fafd5cb8cf258079f336584 diff --git a/admin/backup_handler.php b/admin/backup_handler.php index 54be8aa..81b36b7 100644 --- a/admin/backup_handler.php +++ b/admin/backup_handler.php @@ -2,11 +2,6 @@ require_once '../includes/db.php'; require_once '../includes/functions.php'; -ini_set('display_errors', 1); -ini_set('display_startup_errors', 1); -error_reporting(E_ALL); -ini_set('log_errors', 1); -ini_set('error_log', 'backup_debug.log'); set_time_limit(300); // 5 minutes ini_set('memory_limit', '512M'); diff --git a/admin/backups/index.php b/admin/backups/index.php new file mode 100644 index 0000000..edc99f5 --- /dev/null +++ b/admin/backups/index.php @@ -0,0 +1 @@ +" required>
- +
+ +

Theme Colors

+
+
+ + +
+
+ + +
+
+ + +
+
diff --git a/assets/css/style.css b/assets/css/style.css index 15c4334..a9106c1 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -127,7 +127,7 @@ nav { .hero { height: 400px; background-size: cover; - background-position: center 20%; /* Adjusted to show more of the top/center */ + background-position: top center; /* Anchored to top to prevent cutting off */ display: flex; align-items: center; justify-content: center; @@ -136,6 +136,7 @@ nav { border-radius: 0 0 40px 40px; margin-bottom: 3rem; background-repeat: no-repeat; + overflow: hidden; /* Prevent image bleeding */ } .hero::after { @@ -145,7 +146,7 @@ nav { left: 0; width: 100%; height: 100%; - background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4), var(--bg-dark)); + background: linear-gradient(to bottom, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.3)); } .hero-content { @@ -265,6 +266,12 @@ input:focus, textarea:focus { .hero h1 { font-size: 2.5rem; } + .hero { + height: auto; + min-height: 180px; + padding: 2.5rem 1.5rem; + border-radius: 0 0 24px 24px; + } .nav-links { display: none; } diff --git a/includes/footer.php b/includes/footer.php index 2022120..40904d9 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -1,5 +1,5 @@ diff --git a/includes/functions.php b/includes/functions.php index 881610c..511aa84 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -43,7 +43,14 @@ function requireRole($role) { function logActivity($user_id, $action, $details = null) { global $pdo; $username = $_SESSION['admin_username'] ?? 'GUEST'; - $ip = $_SERVER['REMOTE_ADDR'] ?? 'UNKNOWN'; + $ip = 'UNKNOWN'; + if (!empty($_SERVER['HTTP_CLIENT_IP'])) { + $ip = $_SERVER['HTTP_CLIENT_IP']; + } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'])[0]; + } elseif (!empty($_SERVER['REMOTE_ADDR'])) { + $ip = $_SERVER['REMOTE_ADDR']; + } $stmt = $pdo->prepare("INSERT INTO activity_log (user_id, username, action, details, ip_address) VALUES (?, ?, ?, ?, ?)"); $stmt->execute([$user_id, $username, $action, $details, $ip]); @@ -121,4 +128,15 @@ function uploadImage($file) { function formatDate($date) { return date("F j, Y", strtotime($date)); } + +/** + * Parse text for URLs and convert to clickable links + */ +function parseFooterText($text) { + $escaped = htmlspecialchars($text); + // Regex for URLs + $pattern = '/(https?:\/\/[^\s]+)/'; + $replacement = '$1'; + return preg_replace($pattern, $replacement, $escaped); +} ?> diff --git a/includes/header.php b/includes/header.php index be71739..8155600 100644 --- a/includes/header.php +++ b/includes/header.php @@ -12,13 +12,25 @@ $banner_image = getSetting($pdo, 'banner_image'); <?php echo htmlspecialchars($site_title); ?> +