/var/www/vhosts/m-auto.co/httpdocs
NameSizeModeActions
admin/-0755rm
ajax/-0755rm
assets/-0755rm
includes/-0755rm
uploads/-0755rm
.htaccess29060644editdlrm
7-6-2026.zip159530644editdlrm
404.php13460644editdlrm
500.php13260644editdlrm
about.php22140644editdlrm
add_technical_specs.php36590644editdlrm
ajax_filter_cars.php74120644editdlrm
atom.xml62812440644editdlrm
BACKGROUND_THEMES_INFO.md45610644editdlrm
Backup.zip49650644editdlrm
branches.php107880644editdlrm
calculator.php58970644editdlrm
cars.php219910644editdlrm
car_condition_summary.php92480644editdlrm
car_details.php225840644editdlrm
CAR_GALLERY_README.md78700644editdlrm
car_gallery_summary.php108570644editdlrm
check_brand_matching.php20000644editdlrm
cleanup_for_production.php48780644editdlrm
compare.php202550644editdlrm
COMPARISON_SYSTEM_README.md68320644editdlrm
contact.php38190644editdlrm
contact_process.php23700644editdlrm
database_backup_2025-11-04_13-01-05.sql481380644editdlrm
debug_brands.php22670644editdlrm
deployment_checklist.php68600644editdlrm
DEPLOYMENT_GUIDE.md27120644editdlrm
export_database.php33290644editdlrm
find_nearest_branch.php28890644editdlrm
get-sitemap.php25800644editdlrm
get_branches_by_city.php46970644editdlrm
google7cbe8ec413192e2a.html530644editdlrm
google69217c47da90dd66.html530644editdlrm
index.php6335590644editdlrm
m11.zip322228240644editdlrm
main.php125950644editdlrm
main1.php119110644editdlrm
maintenance.php41690644editdlrm
maintenance_process.php34080644editdlrm
manifest.json8280644editdlrm
news.php26910644editdlrm
news_article.php65360644editdlrm
ODOO_INTEGRATION_README.md44350644editdlrm
offers.php22180644editdlrm
PRODUCTION_SUMMARY.md64260644editdlrm
quick_test_gallery.php60780644editdlrm
README.md61700644editdlrm
robots.txt590644editdlrm
server_check.php52930644editdlrm
sitemap.js4796200644editdlrm
sitemap.xml62818290644editdlrm
sw.js19540644editdlrm
test_odoo_connection.php34740644editdlrm
visit.php37810644editdlrm
visit_process.php27710644editdlrm
x.txt4796570644editdlrm
Edit: /var/www/vhosts/m-auto.co/httpdocs/visit_process.php (2771B)
prepare("SELECT name FROM branches WHERE id = ?"); $branch_stmt->bind_param("i", $branch_id); $branch_stmt->execute(); $branch_result = $branch_stmt->get_result(); $branch_name = ''; if ($branch_row = $branch_result->fetch_assoc()) { $branch_name = $branch_row['name']; } $branch_stmt->close(); // Prepare and bind $stmt = $conn->prepare("INSERT INTO visit_reservations (name, phone, branch_id, visit_date) VALUES (?, ?, ?, ?)"); $stmt->bind_param("ssis", $name, $phone, $branch_id, $visit_date); if ($stmt->execute()) { // Send data to Odoo CRM try { $odoo = new OdooAPI(); // Prepare lead data for Odoo $leadData = [ 'name' => 'حجز زيارة - ' . $name, 'contact_name' => $name, 'phone' => $phone, 'description' => "حجز زيارة إلى فرع: {$branch_name}\nتاريخ الزيارة: {$visit_date}", 'source' => OdooConfig::LEAD_SOURCE_WEBSITE_VISIT, 'branch_name' => $branch_name, 'visit_date' => $visit_date ]; // Create lead in Odoo $leadId = $odoo->createLead($leadData); if ($leadId) { // Create follow-up activity $odoo->createActivity( $leadId, 1, // Default activity type (adjust as needed) 'متابعة حجز الزيارة', "العميل {$name} حجز زيارة إلى فرع {$branch_name} في تاريخ {$visit_date}" ); } } catch (Exception $e) { // Log error but don't fail the booking error_log('Odoo integration error for visit booking: ' . $e->getMessage()); } header("Location: visit.php?status=success"); } else { header("Location: visit.php?status=error"); } $stmt->close(); $conn->close(); } else { header("Location: visit.php"); exit(); } ?>