v5 12/11/2025
This commit is contained in:
parent
56987f61a1
commit
a2f349d8a8
62
admin.php
Normal file
62
admin.php
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require_once __DIR__ . '/db/config.php';
|
||||||
|
|
||||||
|
$pdo = db();
|
||||||
|
$stmt = $pdo->query('SELECT id, username, role, created_at FROM users');
|
||||||
|
$users = $stmt->fetchAll();
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Admin</title>
|
||||||
|
<!-- Bootstrap CSS -->
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top" id="mainNav">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="index.php"><img src="assets/pasted-20251210-201942-d2c32489.jpg" alt="<?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'PackagingCo'); ?> Logo" style="height: 40px;"></a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="index.php">Home</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="partnership.php">Partnership</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<div class="container" style="margin-top: 80px;">
|
||||||
|
<h1 class="mb-4">User Management</h1>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="table-dark">
|
||||||
|
<tr>
|
||||||
|
<th>ID</th>
|
||||||
|
<th>Username</th>
|
||||||
|
<th>Role</th>
|
||||||
|
<th>Created At</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($users as $user): ?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $user['id']; ?></td>
|
||||||
|
<td><?php echo htmlspecialchars($user['username']); ?></td>
|
||||||
|
<td><?php echo htmlspecialchars($user['role']); ?></td>
|
||||||
|
<td><?php echo $user['created_at']; ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Bootstrap JS -->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
72
index.php
72
index.php
@ -1,12 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
// Check if the user is logged in, otherwise redirect to login page
|
|
||||||
if (!isset($_SESSION["user_id"])) {
|
|
||||||
header("location: login.php");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once __DIR__ . '/mail/MailService.php';
|
require_once __DIR__ . '/mail/MailService.php';
|
||||||
|
|
||||||
$message_sent = false;
|
$message_sent = false;
|
||||||
@ -63,6 +57,26 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
|
|
||||||
<!-- Custom CSS -->
|
<!-- Custom CSS -->
|
||||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||||
|
<style>
|
||||||
|
.product-link {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.product-placeholder {
|
||||||
|
padding: 2rem;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
text-align: center;
|
||||||
|
height: 100%;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
.product-placeholder:hover {
|
||||||
|
background-color: #f8f9fa;
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="80">
|
<body data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="80">
|
||||||
|
|
||||||
@ -75,19 +89,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
</button>
|
</button>
|
||||||
<div class="collapse navbar-collapse" id="navbarResponsive">
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
<ul class="navbar-nav ms-auto">
|
<ul class="navbar-nav ms-auto">
|
||||||
<li class="nav-item"><a class="nav-link" href="#why-us">Why Us</a></li>
|
<li class="nav-item"><a class="nav-link" href="index.php#why-us">Why Us</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#offers">Offers</a></li>
|
<li class="nav-item"><a class="nav-link" href="index.php#offers">Offers</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#products">Products</a></li>
|
<li class="nav-item"><a class="nav-link" href="index.php#products">Products</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#faq">FAQ</a></li>
|
<li class="nav-item"><a class="nav-link" href="index.php#faq">FAQ</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
|
<li class="nav-item"><a class="nav-link" href="index.php#contact">Contact</a></li>
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item"><a class="nav-link" href="partnership.php">Partnership</a></li>
|
||||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||||
Welcome, <?php echo htmlspecialchars($_SESSION['username']); ?>
|
|
||||||
</a>
|
|
||||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
||||||
<li><a class="dropdown-item" href="logout.php">Logout</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -98,7 +106,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
<div class="container d-flex align-items-center flex-column">
|
<div class="container d-flex align-items-center flex-column">
|
||||||
<h1 class="hero-heading mb-3">Innovative Packaging, Perfectly Crafted</h1>
|
<h1 class="hero-heading mb-3">Innovative Packaging, Perfectly Crafted</h1>
|
||||||
<p class="hero-subheading mb-4">From concept to creation, we deliver custom packaging solutions that protect your products and elevate your brand.</p>
|
<p class="hero-subheading mb-4">From concept to creation, we deliver custom packaging solutions that protect your products and elevate your brand.</p>
|
||||||
<a href="#contact" class="btn btn-accent btn-lg">Request a Free Quote</a>
|
<a href="order.php" class="btn btn-accent btn-lg">Place an order</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
@ -185,10 +193,26 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
<hr class="divider">
|
<hr class="divider">
|
||||||
<p class="text-center text-muted">A glimpse into the customizable packaging solutions we offer. The full interactive catalog is coming soon.</p>
|
<p class="text-center text-muted">A glimpse into the customizable packaging solutions we offer. The full interactive catalog is coming soon.</p>
|
||||||
<div class="row g-4 mt-4">
|
<div class="row g-4 mt-4">
|
||||||
<div class="col-md-3"><div class="product-placeholder">Carton</div></div>
|
<div class="col-md-3">
|
||||||
<div class="col-md-3"><div class="product-placeholder">Plastique</div></div>
|
<a href="order.php?product=Carton" class="product-link">
|
||||||
<div class="col-md-3"><div class="product-placeholder">Print sur Carton</div></div>
|
<div class="product-placeholder">Carton</div>
|
||||||
<div class="col-md-3"><div class="product-placeholder">Étiquette</div></div>
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<a href="order.php?product=Plastique" class="product-link">
|
||||||
|
<div class="product-placeholder">Plastique</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<a href="order.php?product=Print%20sur%20Carton" class="product-link">
|
||||||
|
<div class="product-placeholder">Print sur Carton</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<a href="order.php?product=Étiquette" class="product-link">
|
||||||
|
<div class="product-placeholder">Étiquette</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
116
login.php
116
login.php
@ -1,116 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
require_once 'db/config.php';
|
|
||||||
|
|
||||||
$error = '';
|
|
||||||
|
|
||||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
||||||
$username = $_POST['username'] ?? '';
|
|
||||||
$password = $_POST['password'] ?? '';
|
|
||||||
|
|
||||||
if (empty($username) || empty($password)) {
|
|
||||||
$error = 'Please enter both username and password.';
|
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
$pdo = db();
|
|
||||||
$stmt = $pdo->prepare("SELECT * FROM users WHERE username = ?");
|
|
||||||
$stmt->execute([$username]);
|
|
||||||
$user = $stmt->fetch();
|
|
||||||
|
|
||||||
if ($user && password_verify($password, $user['password_hash'])) {
|
|
||||||
$_SESSION['user_id'] = $user['id'];
|
|
||||||
$_SESSION['username'] = $user['username'];
|
|
||||||
$_SESSION['role'] = $user['role'];
|
|
||||||
header("Location: index.php");
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$error = 'Invalid username or password.';
|
|
||||||
}
|
|
||||||
} catch (PDOException $e) {
|
|
||||||
$error = "Database error: " . $e->getMessage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Login</title>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Lato:wght@400;700&display=swap" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="assets/css/custom.css">
|
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
height: 100vh;
|
|
||||||
background-color: #ecf0f1;
|
|
||||||
}
|
|
||||||
.login-container {
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 2rem;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
|
|
||||||
width: 100%;
|
|
||||||
max-width: 400px;
|
|
||||||
}
|
|
||||||
.login-container h2 {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
color: #2c3e50;
|
|
||||||
}
|
|
||||||
.form-group {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
.form-group label {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
}
|
|
||||||
.form-group input {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0.75rem;
|
|
||||||
border: 1px solid #ced4da;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
}
|
|
||||||
.btn-submit {
|
|
||||||
width: 100%;
|
|
||||||
padding: 0.75rem;
|
|
||||||
background-color: #18bc9c;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
cursor: pointer;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
.btn-submit:hover {
|
|
||||||
background-color: #15a589;
|
|
||||||
}
|
|
||||||
.error-message {
|
|
||||||
color: #e74c3c;
|
|
||||||
margin-top: 1rem;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="login-container">
|
|
||||||
<h2>Login</h2>
|
|
||||||
<form action="login.php" method="POST">
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="username">Username</label>
|
|
||||||
<input type="text" id="username" name="username" required>
|
|
||||||
</div>
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="password">Password</label>
|
|
||||||
<input type="password" id="password" name="password" required>
|
|
||||||
</div>
|
|
||||||
<button type="submit" class="btn-submit">Login</button>
|
|
||||||
<?php if ($error): ?>
|
|
||||||
<p class="error-message"><?php echo htmlspecialchars($error); ?></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
<?php
|
|
||||||
session_start();
|
|
||||||
session_unset();
|
|
||||||
session_destroy();
|
|
||||||
header("Location: login.php");
|
|
||||||
exit;
|
|
||||||
@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
class MailService
|
class MailService
|
||||||
{
|
{
|
||||||
// Universal mail sender (no attachments by design)
|
// Universal mail sender
|
||||||
public static function sendMail($to, string $subject, string $htmlBody, ?string $textBody = null, array $opts = [])
|
public static function sendMail($to, string $subject, string $htmlBody, ?string $textBody = null, array $opts = [], array $attachments = [])
|
||||||
{
|
{
|
||||||
$cfg = self::loadConfig();
|
$cfg = self::loadConfig();
|
||||||
|
|
||||||
@ -82,6 +82,13 @@ class MailService
|
|||||||
foreach ((array)($opts['cc'] ?? []) as $cc) { if (filter_var($cc, FILTER_VALIDATE_EMAIL)) $mail->addCC($cc); }
|
foreach ((array)($opts['cc'] ?? []) as $cc) { if (filter_var($cc, FILTER_VALIDATE_EMAIL)) $mail->addCC($cc); }
|
||||||
foreach ((array)($opts['bcc'] ?? []) as $bcc){ if (filter_var($bcc, FILTER_VALIDATE_EMAIL)) $mail->addBCC($bcc); }
|
foreach ((array)($opts['bcc'] ?? []) as $bcc){ if (filter_var($bcc, FILTER_VALIDATE_EMAIL)) $mail->addBCC($bcc); }
|
||||||
|
|
||||||
|
// Attachments
|
||||||
|
foreach ($attachments as $attachment) {
|
||||||
|
if (isset($attachment['tmp_name']) && isset($attachment['name']) && is_uploaded_file($attachment['tmp_name'])) {
|
||||||
|
$mail->addAttachment($attachment['tmp_name'], $attachment['name']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Optional DKIM
|
// Optional DKIM
|
||||||
if (!empty($cfg['dkim_domain']) && !empty($cfg['dkim_selector']) && !empty($cfg['dkim_private_key_path'])) {
|
if (!empty($cfg['dkim_domain']) && !empty($cfg['dkim_selector']) && !empty($cfg['dkim_private_key_path'])) {
|
||||||
$mail->DKIM_domain = $cfg['dkim_domain'];
|
$mail->DKIM_domain = $cfg['dkim_domain'];
|
||||||
|
|||||||
242
order.php
Normal file
242
order.php
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
require_once __DIR__ . '/mail/MailService.php';
|
||||||
|
|
||||||
|
$product = isset($_GET['product']) ? htmlspecialchars($_GET['product']) : 'Product';
|
||||||
|
$message_sent = false;
|
||||||
|
$error_message = '';
|
||||||
|
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
$client_name = strip_tags(trim($_POST["client_name"] ?? ''));
|
||||||
|
$phone_number = strip_tags(trim($_POST["phone_number"] ?? ''));
|
||||||
|
$delivery_address = strip_tags(trim($_POST["delivery_address"] ?? ''));
|
||||||
|
$model = strip_tags(trim($_POST["model"] ?? ''));
|
||||||
|
$dimensions = strip_tags(trim($_POST["dimensions"] ?? ''));
|
||||||
|
$thickness = strip_tags(trim($_POST["thickness"] ?? ''));
|
||||||
|
$quantity = strip_tags(trim($_POST["quantity"] ?? ''));
|
||||||
|
$notes = strip_tags(trim($_POST["notes"] ?? ''));
|
||||||
|
$delivery_date = strip_tags(trim($_POST["delivery_date"] ?? ''));
|
||||||
|
|
||||||
|
if (empty($client_name) || empty($phone_number) || empty($delivery_address) || empty($quantity) ) {
|
||||||
|
$error_message = "Please fill out all required fields.";
|
||||||
|
} else {
|
||||||
|
$to = getenv('MAIL_TO') ?: 'admin@example.com';
|
||||||
|
$subject = "New Order for " . $product;
|
||||||
|
|
||||||
|
if (isset($_POST['pro_forma_request']) && $_POST['pro_forma_request'] == '1') {
|
||||||
|
$pro_forma_email = strip_tags(trim($_POST['pro_forma_email'] ?? ''));
|
||||||
|
if (filter_var($pro_forma_email, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
$subject .= " (Pro-forma Invoice Request)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$email_body = "<h3>New Order Details:</h3>";
|
||||||
|
$email_body .= "<strong>Product:</strong> {$product}<br>";
|
||||||
|
$email_body .= "<strong>Client Name:</strong> {$client_name}<br>";
|
||||||
|
$email_body .= "<strong>Phone Number:</strong> {$phone_number}<br>";
|
||||||
|
$email_body .= "<strong>Delivery Address:</strong> {$delivery_address}<br>";
|
||||||
|
$email_body .= "<h4>📦 Carton Order Details</h4>";
|
||||||
|
$email_body .= "<strong>Model:</strong> {$model}<br>";
|
||||||
|
$email_body .= "<strong>Dimensions (cm):</strong> {$dimensions}<br>";
|
||||||
|
$email_body .= "<strong>Thickness:</strong> {$thickness}<br>";
|
||||||
|
$email_body .= "<strong>Quantity:</strong> {$quantity}<br>";
|
||||||
|
$email_body .= "<h4>🗒 Notes</h4>";
|
||||||
|
$email_body .= "<p>" . ($notes ?: 'N/A') . "</p>";
|
||||||
|
$email_body .= "<strong>📅 Delivery Preferred Date:</strong> {$delivery_date}<br>";
|
||||||
|
|
||||||
|
$text_body = "New Order Details:\n\n";
|
||||||
|
$text_body .= "Product: {$product}\n";
|
||||||
|
$text_body .= "Client Name: {$client_name}\n";
|
||||||
|
$text_body .= "Phone Number: {$phone_number}\n";
|
||||||
|
$text_body .= "Delivery Address: {$delivery_address}\n";
|
||||||
|
$text_body .= "--- Carton Order Details ---\n";
|
||||||
|
$text_body .= "Model: {$model}\n";
|
||||||
|
$text_body .= "Dimensions (cm): {$dimensions}\n";
|
||||||
|
$text_body .= "Thickness: {$thickness}\n";
|
||||||
|
$text_body .= "Quantity: {$quantity}\n";
|
||||||
|
$text_body .= "--- Notes ---\n";
|
||||||
|
$text_body .= ($notes ?: 'N/A') . "\n";
|
||||||
|
$text_body .= "Delivery Preferred Date: {$delivery_date}\n";
|
||||||
|
|
||||||
|
if (isset($pro_forma_email) && filter_var($pro_forma_email, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
$email_body .= "<hr><h4>Pro-forma Invoice Request</h4>";
|
||||||
|
$email_body .= "<p>Please send a pro-forma invoice to: <strong>{$pro_forma_email}</strong></p>";
|
||||||
|
$text_body .= "\n--- Pro-forma Invoice Request ---\n";
|
||||||
|
$text_body .= "Please send a pro-forma invoice to: {$pro_forma_email}\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$attachments = [];
|
||||||
|
if (isset($_FILES['design_file']) && $_FILES['design_file']['error'] == UPLOAD_ERR_OK) {
|
||||||
|
$attachments[] = $_FILES['design_file'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = MailService::sendMail($to, $subject, $email_body, $text_body, [], $attachments);
|
||||||
|
|
||||||
|
if (!empty($result['success'])) {
|
||||||
|
$message_sent = true;
|
||||||
|
} else {
|
||||||
|
$error_message = "Sorry, there was an error sending your order. Please try again later.";
|
||||||
|
error_log("MailService Error: " . ($result['error'] ?? 'Unknown error'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Order <?php echo $product; ?> - <?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'Packaging Solutions'); ?></title>
|
||||||
|
<meta name="description" content="Order <?php echo $product; ?>.">
|
||||||
|
|
||||||
|
<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=Montserrat:wght@400;500;700&family=Lato:wght@400;700&display=swap" rel="stylesheet">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top" id="mainNav">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="index.php"><img src="assets/pasted-20251210-201942-d2c32489.jpg" alt="<?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'PackagingCo'); ?> Logo" style="height: 40px;"></a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"><span class="navbar-toggler-icon"></span></button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="index.php#why-us">Why Us</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="index.php#offers">Offers</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="index.php#products">Products</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="index.php#faq">FAQ</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="index.php#contact">Contact</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="partnership.php">Partnership</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section class="page-section">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-8 text-center">
|
||||||
|
<h2 class="mt-0">Order: <?php echo $product; ?></h2>
|
||||||
|
<hr class="divider">
|
||||||
|
<p class="text-muted mb-5">Fill out the form below to place your order.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row gx-5 justify-content-center">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<?php if ($message_sent): ?>
|
||||||
|
<div class="alert alert-success text-center" role="alert">
|
||||||
|
Thank you! Your order has been received. We will contact you shortly.
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($error_message): ?>
|
||||||
|
<div class="alert alert-danger text-center" role="alert">
|
||||||
|
<?php echo htmlspecialchars($error_message); ?>
|
||||||
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<form id="orderForm" method="POST" action="order.php?product=<?php echo urlencode($product); ?>" enctype="multipart/form-data">
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" id="client_name" name="client_name" type="text" placeholder="Enter your name..." required />
|
||||||
|
<label for="client_name">Client Name</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" id="phone_number" name="phone_number" type="tel" placeholder="Enter your phone number..." required />
|
||||||
|
<label for="phone_number">Phone Number</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<textarea class="form-control" id="delivery_address" name="delivery_address" placeholder="Enter your delivery address" style="height: 10rem;" required></textarea>
|
||||||
|
<label for="delivery_address">Delivery Address</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<fieldset class="mb-3">
|
||||||
|
<legend class="h5">📦 Carton Order Details</legend>
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" id="model" name="model" type="text" placeholder="Enter model" />
|
||||||
|
<label for="model">Model</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" id="dimensions" name="dimensions" type="text" placeholder="e.g., 30x20x10" />
|
||||||
|
<label for="dimensions">Dimensions (cm)</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" id="thickness" name="thickness" type="text" placeholder="e.g., 3mm" />
|
||||||
|
<label for="thickness">Thickness</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" id="quantity" name="quantity" type="number" placeholder="Enter quantity" required min="1" />
|
||||||
|
<label for="quantity">Quantity</label>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<textarea class="form-control" id="notes" name="notes" placeholder="Enter optional notes" style="height: 10rem;"></textarea>
|
||||||
|
<label for="notes">🗒 Notes (Optional)</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-floating mb-3">
|
||||||
|
<input class="form-control" id="delivery_date" name="delivery_date" type="date" />
|
||||||
|
<label for="delivery_date">📅 Delivery Preferred Date</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="design_file" class="form-label">Drop your design (JPG, PNG)</label>
|
||||||
|
<input class="form-control" type="file" id="design_file" name="design_file" accept=".jpg,.jpeg,.png">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="d-grid">
|
||||||
|
<button class="btn btn-primary btn-xl" id="submitButton" type="submit">Place Order</button>
|
||||||
|
</div>
|
||||||
|
<div class="text-center mt-3">
|
||||||
|
<button class="btn btn-outline-secondary" id="proFormaButton" type="button">Recevoir une facture pro-format</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer class="bg-light py-5">
|
||||||
|
<div class="container">
|
||||||
|
<div class="small text-center text-muted">Copyright © <?php echo date("Y"); ?> - <?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'PackagingCo'); ?></div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||||
|
<script>
|
||||||
|
document.getElementById('proFormaButton').addEventListener('click', function() {
|
||||||
|
const email = prompt('Please enter your email address to receive the pro-forma invoice:');
|
||||||
|
if (email) {
|
||||||
|
const form = document.getElementById('orderForm');
|
||||||
|
|
||||||
|
let proFormaEmailInput = form.querySelector('input[name="pro_forma_email"]');
|
||||||
|
if (!proFormaEmailInput) {
|
||||||
|
proFormaEmailInput = document.createElement('input');
|
||||||
|
proFormaEmailInput.type = 'hidden';
|
||||||
|
proFormaEmailInput.name = 'pro_forma_email';
|
||||||
|
form.appendChild(proFormaEmailInput);
|
||||||
|
}
|
||||||
|
proFormaEmailInput.value = email;
|
||||||
|
|
||||||
|
let proFormaRequestInput = form.querySelector('input[name="pro_forma_request"]');
|
||||||
|
if (!proFormaRequestInput) {
|
||||||
|
proFormaRequestInput = document.createElement('input');
|
||||||
|
proFormaRequestInput.type = 'hidden';
|
||||||
|
proFormaRequestInput.name = 'pro_forma_request';
|
||||||
|
form.appendChild(proFormaRequestInput);
|
||||||
|
}
|
||||||
|
proFormaRequestInput.value = '1';
|
||||||
|
|
||||||
|
form.submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
81
partnership.php
Normal file
81
partnership.php
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Partnership - <?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'Packaging Solutions'); ?></title>
|
||||||
|
<meta name="description" content="Partnership opportunities and custom software development.">
|
||||||
|
|
||||||
|
<!-- Google Fonts -->
|
||||||
|
<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=Montserrat:wght@400;500;700&family=Lato:wght@400;700&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
|
<!-- Bootstrap CSS -->
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
|
||||||
|
|
||||||
|
<!-- Bootstrap Icons -->
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
||||||
|
|
||||||
|
<!-- Custom CSS -->
|
||||||
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- Navigation -->
|
||||||
|
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top" id="mainNav">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="index.php"><img src="assets/pasted-20251210-201942-d2c32489.jpg" alt="<?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'PackagingCo'); ?> Logo" style="height: 40px;"></a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item"><a class="nav-link" href="index.php">Home</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="partnership.php">Partnership</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="admin.php">Admin</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Page Content -->
|
||||||
|
<section class="page-section">
|
||||||
|
<div class="container">
|
||||||
|
<h2 class="text-center mt-5">Partnership Opportunities</h2>
|
||||||
|
<hr class="divider">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<p class="text-muted">We are open to partnership offers and collaborations. Let's work together to achieve mutual success.</p>
|
||||||
|
<p class="text-muted">In addition to our core services, we also specialize in building custom digital solutions for your business. We can create:</p>
|
||||||
|
<ul>
|
||||||
|
<li>Custom tool websites</li>
|
||||||
|
<li>Management software (logiciel de gestion)</li>
|
||||||
|
<li>And much more!</li>
|
||||||
|
</ul>
|
||||||
|
<p class="text-muted">Contact us to discuss your project and how we can help you build the tools you need to succeed.</p>
|
||||||
|
<div class="text-center mt-4">
|
||||||
|
<a href="index.php#contact" class="btn btn-primary btn-xl">Contact Us</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<footer class="bg-light py-5 mt-5">
|
||||||
|
<div class="container">
|
||||||
|
<div class="small text-center text-muted">Copyright © <?php echo date("Y"); ?> - <?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'PackagingCo'); ?></div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<!-- Bootstrap core JS-->
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
|
||||||
|
<!-- Custom JS-->
|
||||||
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user