diff --git a/api/booking.php b/api/booking.php new file mode 100644 index 000000000..e58238878 --- /dev/null +++ b/api/booking.php @@ -0,0 +1,66 @@ +false,'error'=>'POST required']); exit; } + +$data = json_decode(file_get_contents('php://input'), true); +if (!$data) { echo json_encode(['ok'=>false,'error'=>'Invalid JSON']); exit; } + +$name = trim($data['name'] ?? ''); +$email = trim($data['email'] ?? ''); +$company = trim($data['company'] ?? ''); +$date = trim($data['date'] ?? ''); +$slot = trim($data['slot'] ?? ''); +$duration = intval($data['duration'] ?? 30); +$subject = trim($data['subject'] ?? 'Consultation'); +$message = trim($data['message'] ?? ''); + +if (!$name || !$email || !$date || !$slot) { + echo json_encode(['ok'=>false,'error'=>'Champs requis: nom, email, date, créneau']); + exit; +} + +// Build email +$to = 'info@weval-consulting.com'; +$mail_subject = "RDV WEVAL — {$subject} — {$date} {$slot}"; +$body = "Nouvelle demande de rendez-vous\n"; +$body .= "========================================\n\n"; +$body .= "Nom: {$name}\n"; +$body .= "Email: {$email}\n"; +$body .= "Entreprise: {$company}\n"; +$body .= "Date: {$date} à {$slot}\n"; +$body .= "Durée: {$duration} min\n"; +$body .= "Sujet: {$subject}\n"; +if ($message) $body .= "Message: {$message}\n"; +$body .= "\n========================================\n"; +$body .= "Source: weval-consulting.com/booking.html\n"; +$body .= "IP: " . ($_SERVER['REMOTE_ADDR'] ?? 'unknown') . "\n"; +$body .= "Date: " . date('Y-m-d H:i:s') . "\n"; + +$headers = "From: WEVAL Booking \r\n"; +$headers .= "Reply-To: {$email}\r\n"; +$headers .= "X-Mailer: WEVAL-Booking/1.0\r\n"; + +// Send via local mail() +$sent = @mail($to, $mail_subject, $body, $headers); + +// Also log to file +$log = date('Y-m-d H:i:s') . " | {$name} | {$email} | {$company} | {$date} {$slot} | {$duration}min | {$subject}\n"; +@file_put_contents('/var/log/weval-booking.log', $log, FILE_APPEND); + +// Send confirmation to client +if ($sent) { + $conf_subject = "Confirmation — Rendez-vous WEVAL Consulting"; + $conf_body = "Bonjour {$name},\n\n"; + $conf_body .= "Nous avons bien reçu votre demande de rendez-vous :\n\n"; + $conf_body .= "Date : {$date} à {$slot}\n"; + $conf_body .= "Durée : {$duration} minutes\n"; + $conf_body .= "Sujet : {$subject}\n\n"; + $conf_body .= "Nous vous confirmerons le créneau sous 24h.\n\n"; + $conf_body .= "Cordialement,\nWEVAL Consulting\ninfo@weval-consulting.com"; + $conf_headers = "From: WEVAL Consulting \r\n"; + @mail($email, $conf_subject, $conf_body, $conf_headers); +} + +echo json_encode(['ok' => true, 'message' => 'Demande envoyée']); diff --git a/booking.html b/booking.html new file mode 100644 index 000000000..4b8f2b1d9 --- /dev/null +++ b/booking.html @@ -0,0 +1,151 @@ + + + + + +Prendre rendez-vous — WEVAL Consulting + + + + +
+ +
+
+

Prendre rendez-vous

+

Choisissez un créneau, nous vous confirmons sous 24h.

+
+
+
+
+
+
+
+
+
+
+
+ +
+
info@weval-consulting.com — Confirmation sous 24h. Paris & Casablanca, GMT+1.
+
+
+
+

Demande envoyée

+

Nous avons reçu votre demande de rendez-vous.
Confirmation par email sous 24h.

+← Retour au site +
+
+
+ + + diff --git a/index.html b/index.html index 0397da7cf..11fe09444 100644 --- a/index.html +++ b/index.html @@ -191,7 +191,7 @@ if(p==='/methodologie'){window.location.replace('/methodologie.html')}

SAP Ecosystem Partner | Vistex Partner | Huawei Cloud Partner | IQVIA | Scaleway

Contact

-

Paris (France) | Casablanca (Maroc) — Contactez-nous | Prendre rendez-vous

+

Paris (France) | Casablanca (Maroc) — Contactez-nous | Prendre rendez-vous

diff --git a/products/wevialife.html b/products/wevialife.html index 28ddbe7cc..3407ce4b7 100644 --- a/products/wevialife.html +++ b/products/wevialife.html @@ -205,7 +205,7 @@ footer{padding:2rem 4%;max-width:1200px;margin:0 auto;display:flex;justify-conte

Votre IA personnelle vous attend

Installation en 5 minutes. Aucune carte bancaire requise. Vos données restent les vôtres — pour toujours.

- +
diff --git a/service/index.html b/service/index.html index 765b96fc4..629587249 100644 --- a/service/index.html +++ b/service/index.html @@ -191,7 +191,7 @@ if(p==='/methodologie'){window.location.replace('/methodologie.html')}

SAP Ecosystem Partner | Vistex Partner | Huawei Cloud Partner | IQVIA | Scaleway

Contact

-

Paris (France) | Casablanca (Maroc) — Contactez-nous | Prendre rendez-vous

+

Paris (France) | Casablanca (Maroc) — Contactez-nous | Prendre rendez-vous