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: creamNowForm.php
Close
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Cream Now Form - Knobly Cream</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 20px; background-color: #f5f5f5; color: #333; } .container { max-width: 600px; margin: 0 auto; background-color: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } h1 { color: #4a154b; margin-top: 0; margin-bottom: 30px; text-align: center; } .form-group { margin-bottom: 25px; } label { display: block; margin-bottom: 8px; font-weight: bold; } select, input[type="text"] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; } .submit-btn { background-color: #4a154b; color: white; border: none; padding: 12px 24px; font-size: 16px; border-radius: 4px; cursor: pointer; display: block; width: 100%; text-align: center; } .submit-btn:hover { background-color: #611f69; } .logo { text-align: center; margin-bottom: 20px; } .logo img { max-width: 150px; } .success-message { background-color: #d4edda; color: #155724; padding: 15px; margin-bottom: 20px; border-radius: 4px; } .error-message { background-color: #f8d7da; color: #721c24; padding: 15px; margin-bottom: 20px; border-radius: 4px; } </style> </head> <body> <div class="container"> <!-- <div class="logo"> <img src="logo.png" alt="Knobly Cream Logo"> </div> --> <h1>Cream Now </h1> <?php // Database connection configuration function getDbConnection() { $servername = "139.59.38.164"; $username = "root"; $password = "newstart"; $dbname = "cream"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } return $conn; } // Process form submission if ($_SERVER["REQUEST_METHOD"] == "POST") { // Get form data $industry = isset($_POST['industry']) ? $_POST['industry'] : ''; $targetGroup = isset($_POST['targetGroup']) ? $_POST['targetGroup'] : ''; $productName = isset($_POST['productName']) ? $_POST['productName'] : ''; // Validate form data $errors = []; if (empty($industry)) { $errors[] = "Please select an industry."; } if (empty($targetGroup)) { $errors[] = "Please select a target group."; } if (empty($productName)) { $errors[] = "Please enter your product name."; } // If no errors, process the form if (empty($errors)) { // Save form data $success = saveFormData($industry, $targetGroup, $productName); if ($success) { echo '<div class="success-message">Thank you for your submission! Our team will contact you shortly.</div>'; } else { echo '<div class="error-message">There was a problem processing your request. Please try again later.</div>'; } } else { // Display errors echo '<div class="error-message">'; foreach ($errors as $error) { echo $error . '<br>'; } echo '</div>'; } } /** * Save form data to the creamNow database table * @param string $industry The selected industry * @param string $targetGroup The selected target group * @param string $productName The product name * @return bool True if successful, false otherwise */ function saveFormData($industry, $targetGroup, $productName) { try { // Get database connection $conn = getDbConnection(); // Prepare and execute SQL statement $stmt = $conn->prepare("INSERT INTO creamNow (industry, targetGroup, productName, submissionDate) VALUES (?, ?, ?, NOW())"); $stmt->bind_param("sss", $industry, $targetGroup, $productName); $result = $stmt->execute(); $stmt->close(); $conn->close(); // if ($result) { // header("Location: ../gemini.php"); // exit; // } else { // return false; // } if ($result) { $insertId = $conn->insert_id; // Get the ID of the newly inserted record header("Location: ../gemini.php?id=$insertId"); exit; } } catch (Exception $e) { // Log the error (customize as needed) error_log("Database error: " . $e->getMessage()); return false; } } ?> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>"> <div class="form-group"> <label for="industry">Industry:</label> <select id="industry" name="industry" required> <option value="" disabled selected>-- Select Industry --</option> <option value="Retail">Retail</option> <option value="Technology">Technology</option> <option value="Healthcare">Healthcare</option> <option value="Education">Education</option> <option value="Finance">Finance</option> <option value="Manufacturing">Manufacturing</option> <option value="Entertainment">Entertainment</option> <option value="Other">Other</option> </select> </div> <div class="form-group"> <label for="targetGroup">Target Group:</label> <select id="targetGroup" name="targetGroup" required> <option value="" disabled selected>-- Select Target Group --</option> <option value="B2B">B2B</option> <option value="B2C">B2C</option> <option value="Both">Both B2B and B2C</option> </select> </div> <div class="form-group"> <label for="productName">Product Name:</label> <input type="text" id="productName" name="productName" placeholder="Enter your product name" required> </div> <button type="submit" class="submit-btn">Submit</button> </form> </div> </body> </html>