OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
cream
/
leadpage
/
process
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/19/2025 10:07:13 AM
rwxr-xr-x
📄
createLead.php
3.08 KB
05/19/2025 10:07:13 AM
rw-r--r--
Editing: createLead.php
Close
<? // Create Lead ini_set('display_startup_errors', 1); session_start(); require_once '../../assets/php/config.php'; include '../../assets/php/db_config.php'; require_once '../../assets/php/function.php'; $Name = isset($_POST['Name']) ? $_POST['Name'] : ''; $Company = isset($_POST['Company']) ? $_POST['Company'] : ''; $Email = isset($_POST['Email']) ? $_POST['Email'] : ''; $Mobile = isset($_POST['Mobile']) ? $_POST['Mobile'] : ''; $pageId = isset($_POST['pageId']) ? $_POST['pageId'] : ''; $Designation = isset($_POST['Designation']) ? $_POST['Designation'] : ''; $Query = isset($_POST['Query']) ? $_POST['Query'] : ''; $state = isset($_POST['state']) ? $_POST['state'] : ''; $city = isset($_POST['city']) ? $_POST['city'] : ''; $pageTitle = isset($_POST['pageTitle']) ? $_POST['pageTitle'] : ''; $actionEmail = isset($_POST['actionEmail']) ? $_POST['actionEmail'] : ''; if ($pageId != '' && $Name != '') { $ip = getenv('HTTP_CLIENT_IP') ?: getenv('HTTP_X_FORWARDED_FOR') ?: getenv('HTTP_X_FORWARDED') ?: getenv('HTTP_FORWARDED_FOR') ?: getenv('HTTP_FORWARDED') ?: getenv('REMOTE_ADDR'); // Assume you have already established a connection to the database with $creamdb // Prepare the query with placeholders $sql = "INSERT INTO user_landing_page_leads (page_id, ip, name, company, email, mobile, designation, query,state,city) VALUES (?, ?, ?, ?, ?, ?, ?, ?,?,?)"; // Prepare the statement $stmt = mysqli_prepare($creamdb, $sql); // Bind the variables to the placeholders mysqli_stmt_bind_param($stmt, "isssssssss", $pageId, $ip, $Name, $Company, $Email, $Mobile, $Designation, $Query,$state,$city); // Execute the statement mysqli_stmt_execute($stmt); // Close the statement mysqli_stmt_close($stmt); $collectionLink = 'https://www.knoblycream.com' . '/leadpage/landingPage.php?id=' . $pageId; if ($actionEmail <> '') { $tmpHTML = ""; $tmpHTML .= "<html>"; $tmpHTML .= "<body>"; $tmpHTML .= "<div style=\"font-family:Arial;font-size:12px;\">\r\n"; $tmpHTML .= "Dear Knobly Cream user,<br><br>\r\n"; $tmpHTML .= "The following lead details have been submitted:<br><br>\r\n"; $tmpHTML .= "URL: $collectionLink<br>\r\n"; $tmpHTML .= "Name: $Name<br>\r\n"; $tmpHTML .= "Email: $Email<br>\r\n"; $tmpHTML .= "Mobile: $Mobile<br>\r\n"; if($Company!=''){ $tmpHTML .= "Company: $Company<br>\r\n"; } if($Designation!=''){ $tmpHTML .= "Designation: $Designation<br>\r\n"; } if($Query!=''){ $tmpHTML .= "Message: $Query<br>\r\n"; } if($state!=''){ $tmpHTML .= "State: $state<br>\r\n"; } if($city!=''){ $tmpHTML .= "City: $city<br><br>\r\n"; } $tmpHTML .= "Warm Regards,<br>\r\n"; $tmpHTML .= "Knobly Cream<br>\r\n"; $tmpHTML .= "</body>"; $tmpHTML .= "</html>"; sendEmail('Knobly Cream User', $actionEmail, '', 'Lead details from Knobly Cream', $tmpHTML); } } echo 'OK';