OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
whatsappBot
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
06/17/2025 10:17:24 AM
rwxrwxr-x
📄
bac_demoForm.html
2.64 KB
04/14/2025 05:32:03 PM
rw-r--r--
📄
creamNowForm.php
7.94 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
db.php
368 bytes
05/19/2025 10:07:16 AM
rw-r--r--
📄
demoForm.html
8.42 KB
04/14/2025 05:32:03 PM
rw-r--r--
📄
news_pagination.json
225 bytes
05/27/2025 05:06:08 AM
rwxrwxrwx
📄
posts_pagination.json
191 bytes
06/02/2025 02:56:58 AM
rwxrwxrwx
📄
saveDemo.php
2.55 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
send_log.txt
139.58 KB
06/16/2025 02:40:24 PM
rwxrwxrwx
📄
service-account-credentials.json
2.34 KB
04/14/2025 05:32:03 PM
rw-r--r--
📄
webhook_post_log.txt
272.88 KB
04/14/2025 05:32:03 PM
rw-rw-rw-
📄
whatsappAPI.php
34.49 KB
05/19/2025 10:07:16 AM
rw-r--r--
📄
whatsapp_messages.log
27.18 KB
06/16/2025 02:40:22 PM
rwxrwxrwx
Editing: demoForm.html
Close
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Book a Demo - Knobly Cream</title> <style> body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; padding: 20px; background-color: #f5f5f5; } .container { max-width: 600px; margin: 0 auto; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); } h1 { color: #333; text-align: center; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; font-weight: bold; } input, select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; } button { background-color: #4CAF50; color: white; padding: 12px 20px; border: none; border-radius: 4px; cursor: pointer; width: 100%; font-size: 16px; } button:hover { background-color: #45a049; } .success-message { display: none; background-color: #d4edda; color: #155724; padding: 15px; margin-top: 20px; border-radius: 4px; text-align: center; } .error-message { display: none; background-color: #f8d7da; color: #721c24; padding: 15px; margin-top: 20px; border-radius: 4px; text-align: center; } .google-calendar { display: none; margin-top: 20px; text-align: center; } .google-calendar a { display: inline-block; background-color: #4285F4; color: white; text-decoration: none; padding: 10px 15px; border-radius: 4px; font-weight: bold; } .google-calendar a:hover { background-color: #3367D6; } .google-calendar img { vertical-align: middle; margin-right: 8px; height: 20px; } </style> </head> <body> <div class="container"> <h1>Book a Demo</h1> <form id="demoForm"> <div class="form-group"> <label for="name">Full Name:</label> <input type="text" id="name" name="name" required> </div> <div class="form-group"> <label for="phone">WhatsApp Phone Number (with country code):</label> <input type="tel" id="phone" name="phone" placeholder="e.g., +12025550123" required> </div> <div class="form-group"> <label for="email">Email Address:</label> <input type="email" id="email" name="email" required> </div> <div class="form-group"> <label for="date">Preferred Date:</label> <input type="date" id="date" name="date" required> </div> <div class="form-group"> <label for="time">Preferred Time:</label> <input type="time" id="time" name="time" required> </div> <button type="submit">Schedule Demo</button> </form> <div id="successMessage" class="success-message"> Your demo has been scheduled successfully! You will receive a confirmation message on WhatsApp shortly. </div> <div id="errorMessage" class="error-message"> There was an error scheduling your demo. Please try again later. </div> <div id="googleCalendar" class="google-calendar"> <p>Would you like to add this event to your calendar?</p> <a href="#" id="addToCalendarLink" target="_blank"> <img src="https://www.gstatic.com/images/branding/product/1x/calendar_48dp.png" alt="Google Calendar"> Add to Google Calendar </a> </div> </div> <script> document.getElementById('demoForm').addEventListener('submit', function(e) { e.preventDefault(); // Get form data const formData = { name: document.getElementById('name').value, phone: document.getElementById('phone').value, email: document.getElementById('email').value, date: document.getElementById('date').value, time: document.getElementById('time').value }; // Send data to server fetch('whatsappAPI.php?action=process_demo', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(formData) }) .then(response => response.json()) .then(data => { if (data.success) { // Show success message document.getElementById('successMessage').style.display = 'block'; document.getElementById('errorMessage').style.display = 'none'; // Create Google Calendar event URL const eventTitle = `Knobly Cream Demo`; const eventDescription = `Product demonstration session with Knobly Cream team`; const eventLocation = `Online`; // Parse date and time values const eventDate = formData.date; const eventTime = formData.time; // Calculate event start and end times (assuming 1 hour duration) const startDateTime = new Date(`${eventDate}T${eventTime}`); const endDateTime = new Date(startDateTime.getTime() + 60 * 60 * 1000); // Format dates for Google Calendar URL const formatDate = (date) => { return date.toISOString().replace(/-|:|\.\d+/g, ''); }; const startDateFormatted = formatDate(startDateTime); const endDateFormatted = formatDate(endDateTime); // Create Google Calendar URL const googleCalendarUrl = `https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(eventTitle)}&dates=${startDateFormatted}/${endDateFormatted}&details=${encodeURIComponent(eventDescription)}&location=${encodeURIComponent(eventLocation)}`; // Set the calendar link's href document.getElementById('addToCalendarLink').href = googleCalendarUrl; // Show the Google Calendar option document.getElementById('googleCalendar').style.display = 'block'; // Reset the form document.getElementById('demoForm').reset(); } else { // Show error message document.getElementById('errorMessage').style.display = 'block'; document.getElementById('successMessage').style.display = 'none'; document.getElementById('googleCalendar').style.display = 'none'; document.getElementById('errorMessage').textContent = data.message || 'There was an error scheduling your demo. Please try again later.'; } }) .catch(error => { console.error('Error:', error); document.getElementById('errorMessage').style.display = 'block'; document.getElementById('successMessage').style.display = 'none'; document.getElementById('googleCalendar').style.display = 'none'; }); }); </script> </body> </html>