FlatlyPage
Version 1.0.0 • 54 files • 724.77 KB
Files
.htaccess
.last_check
admin/account.php
admin/dashboard.php
admin/easyedit.js
admin/extensions.php
admin/generate-hash.php
admin/index.php
admin/logout.php
admin/preview.php
admin/scripts.php
admin/theme-edit/builder.php
admin/theme-edit/generator.php
admin/theme-edit/index.php
admin/themes.php
assets/fonts/inter/inter.css
assets/fonts/space-grotesk/space-grotesk.css
config.php
contact-handler.php
contact.php
css/admin.css
css/contact.css
css/styles.css
css/theme.css
data/.htaccess
data/index.php
data/settings.php
data/sitemap-config.php
engine/index.php
engine/renderion.php
extensions-loader.php
extensions/privimetrics/main.php
extensions/privimetrics/manifest.xml
extensions/scroll_to_top/main.php
extensions/scroll_to_top/manifest.xml
extensions/seo_image_master/main.php
extensions/seo_image_master/manifest.xml
favicons.txt
index.php
newsletter/.htaccess
newsletter/confirm.php
newsletter/manager.php
newsletter/newsletter-form.js
newsletter/newsletter-styles.css
newsletter/newsletter-unavailable.php
newsletter/newsletter.sql
newsletter/settings.php
newsletter/subscribe.php
newsletter/unsubscribe.php
page.php
robots.txt.php
sitemap.php
updater/index.php
version.txt
newsletter/unsubscribe.php
<?php
if (!file_exists('config.php')) {
header('Location: newsletter-unavailable.php');
exit;
}
require_once 'config.php';
$email = $_GET['email'] ?? $_POST['email'] ?? '';
$email = filter_var($email, FILTER_VALIDATE_EMAIL);
if ($_SERVER['REQUEST_METHOD'] === 'POST' && $email) {
$pdo = getDB();
try {
$stmt = $pdo->prepare("DELETE FROM newsletter_subscribers WHERE email = ?");
$stmt->execute([$email]);
if ($stmt->rowCount() > 0) {
showUnsubscribeMessage('Unsubscribed', 'Your email has been removed from our mailing list.', 'success');
} else {
showUnsubscribeMessage('Not Found', 'This email address is not on our list.', 'info');
}
} catch (PDOException $e) {
error_log("Unsubscribe error: " . $e->getMessage());
showUnsubscribeMessage('Error', 'An error occurred. Please try again.', 'error');
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Unsubscribe from Newsletter</title>
<link rel="icon" href="nl.ico?v=<?= filemtime(__DIR__ . '/newsletter/nl.ico') ?>" type="image/x-icon">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
}
.unsubscribe-box {
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
max-width: 500px;
width: 100%;
padding: 40px;
}
h1 { color: #333; margin-bottom: 20px; text-align: center; }
p { color: #666; line-height: 1.6; margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; color: #333; font-weight: 500; }
input[type="email"] {
width: 100%;
padding: 12px;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 16px;
}
button {
width: 100%;
padding: 12px;
background: #dc3545;
color: white;
border: none;
border-radius: 5px;
font-size: 16px;
cursor: pointer;
transition: background 0.3s;
}
button:hover { background: #c82333; }
.back-link {
display: block;
text-align: center;
margin-top: 20px;
color: #007bff;
text-decoration: none;
}
</style>
</head>
<body>
<div class="unsubscribe-box">
<h1>Unsubscribe from Newsletter</h1>
<p>We're sorry to see you go. Enter your email address to unsubscribe from our mailing list.</p>
<form method="POST">
<div class="form-group">
<label for="email">Email address:</label>
<input
type="email"
id="email"
name="email"
value="<?= htmlspecialchars($email) ?>"
required
placeholder="your@email.com"
>
</div>
<button type="submit">Unsubscribe</button>
</form>
<a href="<?= SITE_URL ?>" class="back-link">← Back to homepage</a>
</div>
</body>
</html>
<?php
function showUnsubscribeMessage($title, $message, $type) {
$colors = [
'success' => ['bg' => '#d4edda', 'text' => '#155724'],
'error' => ['bg' => '#f8d7da', 'text' => '#721c24'],
'info' => ['bg' => '#d1ecf1', 'text' => '#0c5460']
];
$color = $colors[$type] ?? $colors['info'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= htmlspecialchars($title) ?></title>
<link rel="icon" href="nl.ico?v=<?= filemtime(__DIR__ . '/newsletter/nl.ico') ?>" type="image/x-icon">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
padding: 20px;
}
.message-box {
background: <?= $color['bg'] ?>;
color: <?= $color['text'] ?>;
border-radius: 8px;
padding: 40px;
max-width: 500px;
text-align: center;
}
h1 { margin-bottom: 15px; }
.btn {
display: inline-block;
margin-top: 20px;
padding: 12px 30px;
background: white;
color: #333;
text-decoration: none;
border-radius: 5px;
}
</style>
</head>
<body>
<div class="message-box">
<h1><?= htmlspecialchars($title) ?></h1>
<p><?= htmlspecialchars($message) ?></p>
<a href="<?= SITE_URL ?>" class="btn">Back to homepage</a>
</div>
</body>
</html>
<?php
exit;
}
?>