{"id":3136,"date":"2025-12-07T00:41:52","date_gmt":"2025-12-07T00:41:52","guid":{"rendered":"https:\/\/gear-up.mm-host.com\/?page_id=3136"},"modified":"2026-01-07T20:25:12","modified_gmt":"2026-01-07T20:25:12","slug":"3136-2","status":"publish","type":"page","link":"https:\/\/gear-up.mm-host.com\/?page_id=3136","title":{"rendered":"Emergency Request"},"content":{"rendered":"\n<!-- Emergency Request Page -->\n<div id=\"emergency-container\" style=\"max-width:700px;margin:auto;font-family:Arial,sans-serif;padding:20px;\">\n\n  <h1 style=\"text-align:center;color:#e74c3c;\">\ud83d\udea8 Emergency Request<\/h1>\n  <p style=\"text-align:center;color:#555;\">Need immediate roadside assistance? Fill out this form and we&#8217;ll respond immediately.<\/p>\n\n  <form id=\"emergencyForm\" style=\"background:#f8f9fa;padding:25px;border-radius:12px;box-shadow:0 4px 10px rgba(0,0,0,0.1);\">\n\n    <h3 style=\"color:#e74c3c;\">Customer Information<\/h3>\n    <input type=\"text\" name=\"full_name\" placeholder=\"Full Name\" required>\n    <input type=\"tel\" name=\"phone\" placeholder=\"Phone Number\" required>\n    <input type=\"email\" name=\"email\" placeholder=\"Email Address\">\n\n    <h3 style=\"color:#e74c3c;\">Vehicle Information<\/h3>\n    <select name=\"vehicle_type\" required>\n      <option value=\"\">Select vehicle type<\/option>\n      <option value=\"sedan\">Sedan<\/option>\n      <option value=\"suv\">SUV<\/option>\n      <option value=\"truck\">Truck<\/option>\n      <option value=\"van\">Van<\/option>\n      <option value=\"motorcycle\">Motorcycle<\/option>\n      <option value=\"bus\">Bus<\/option>\n      <option value=\"other\">Other<\/option>\n    <\/select>\n    <input type=\"text\" name=\"vehicle_brand\" placeholder=\"Vehicle Brand\" required>\n    <input type=\"text\" name=\"vehicle_model\" placeholder=\"Vehicle Model\" required>\n    <input type=\"number\" name=\"vehicle_year\" placeholder=\"Year\">\n    <input type=\"text\" name=\"vehicle_color\" placeholder=\"Vehicle Color\">\n    <input type=\"text\" name=\"license_plate\" placeholder=\"License Plate Number\">\n\n    <h3 style=\"color:#e74c3c;\">Emergency Details<\/h3>\n    <input type=\"text\" name=\"location\" placeholder=\"Current Location\" required>\n    <select name=\"problem_type\" required>\n      <option value=\"\">Select problem type<\/option>\n      <option value=\"breakdown\">Vehicle Breakdown<\/option>\n      <option value=\"accident\">Accident<\/option>\n      <option value=\"flat_tire\">Flat Tire<\/option>\n      <option value=\"out_of_gas\">Out of Gas<\/option>\n      <option value=\"dead_battery\">Dead Battery<\/option>\n      <option value=\"keys_locked\">Keys Locked in Car<\/option>\n      <option value=\"overheating\">Engine Overheating<\/option>\n      <option value=\"towing\">Need Towing<\/option>\n      <option value=\"other\">Other Emergency<\/option>\n    <\/select>\n    <textarea name=\"description\" placeholder=\"Problem Description\" rows=\"4\" required><\/textarea>\n    <select name=\"urgency_level\" required>\n      <option value=\"high\">High &#8211; Need immediate assistance<\/option>\n      <option value=\"medium\">Medium &#8211; Within 1-2 hours<\/option>\n      <option value=\"low\">Low &#8211; Can wait<\/option>\n    <\/select>\n    <textarea name=\"additional_notes\" placeholder=\"Additional Notes\" rows=\"2\"><\/textarea>\n\n    <button type=\"submit\" style=\"background-color:#e74c3c;color:white;padding:10px 20px;border:none;border-radius:5px;font-size:16px;margin-top:10px;\">\n      Send Emergency Request\n    <\/button>\n\n  <\/form>\n\n  <div id=\"responseMessage\" style=\"margin-top:15px;font-weight:bold;\"><\/div>\n<\/div>\n\n<script>\ndocument.getElementById('emergencyForm').addEventListener('submit', async function(e){\n  e.preventDefault();\n  \n  \/\/ \u062c\u0645\u0639 \u0628\u064a\u0627\u0646\u0627\u062a \u0627\u0644\u0641\u0648\u0631\u0645\n  const formData = {\n    full_name: this.full_name.value,\n    phone: this.phone.value,\n    email: this.email.value,\n    vehicle_type: this.vehicle_type.value,\n    vehicle_brand: this.vehicle_brand.value,\n    vehicle_model: this.vehicle_model.value,\n    vehicle_year: this.vehicle_year.value,\n    vehicle_color: this.vehicle_color.value,\n    license_plate: this.license_plate.value,\n    location: this.location.value,\n    problem_type: this.problem_type.value,\n    description: this.description.value,\n    urgency_level: this.urgency_level.value,\n    additional_notes: this.additional_notes.value\n  };\n\n  \/\/ \u062a\u062d\u0648\u064a\u0644 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a \u0625\u0644\u0649 \u062a\u0646\u0633\u064a\u0642 API\n  function mapToAPI(formData) {\n    \/\/ \u062a\u062d\u062f\u064a\u062f service_id \u0628\u0646\u0627\u0621\u064b \u0639\u0644\u0649 \u0646\u0648\u0639 \u0627\u0644\u0645\u0634\u0643\u0644\u0629\n    const serviceMapping = {\n      'dead_battery': 8,        \/\/ Jump Start\n      'flat_tire': 6,           \/\/ Tires\n      'towing': 7,              \/\/ Towing Service\n      'breakdown': 1,           \/\/ Maintenance\n      'accident': 9,            \/\/ Body Repair\n      'overheating': 5,         \/\/ AC Services\n      'keys_locked': 7,         \/\/ Towing (\u0644\u0644\u0641\u062a\u062d)\n      'out_of_gas': 1,          \/\/ Maintenance\n      'other': 1                \/\/ Default\n    };\n    \n    return {\n      name: formData.full_name,\n      phone: formData.phone,\n      service_id: serviceMapping[formData.problem_type] || 1,\n      location: formData.location,\n      email: formData.email,\n      vehicle_make: formData.vehicle_brand,\n      vehicle_model: formData.vehicle_model,\n      vehicle_year: formData.vehicle_year,\n      emergency_description: formData.description,\n      license_plate: formData.license_plate,\n      urgency_level: formData.urgency_level\n    };\n  }\n\n  try {\n    const apiData = mapToAPI(formData);\n    \n    const response = await fetch(\"https:\/\/gear-up.mm-host.com\/?gearup_api=emergency\", {\n      method: \"POST\",\n      headers: {\"Content-Type\": \"application\/json\"},\n      body: JSON.stringify(apiData)\n    });\n    \n    const result = await response.json();\n    \n    const responseDiv = document.getElementById('responseMessage');\n    \n    if(result.success) {\n        responseDiv.style.color = \"green\";\n        responseDiv.innerHTML = `\n          <h3>\u2705 ${result.message || result.arabic_message || 'Request submitted!'}<\/h3>\n          <p><strong>Request ID:<\/strong> ${result.request_id || 'N\/A'}<\/p>\n          <p><strong>Status:<\/strong> ${result.status_ar || result.status || 'Pending'}<\/p>\n          <p><strong>Estimated Arrival:<\/strong> ${result.estimated_arrival || 'Soon'}<\/p>\n          <p><strong>Next Steps:<\/strong><\/p>\n          <ul>\n            ${result.next_steps ? result.next_steps.map(step => `<li>${step}<\/li>`).join('') : '<li>Wait for our call<\/li>'}\n          <\/ul>\n        `;\n        this.reset();\n    } else {\n        responseDiv.style.color = \"red\";\n        responseDiv.innerHTML = `\n          <h3>\u274c ${result.message || 'Error occurred'}<\/h3>\n          ${result.example ? `<p><strong>Example:<\/strong> ${JSON.stringify(result.example)}<\/p>` : ''}\n        `;\n    }\n\n  } catch (error) {\n    const responseDiv = document.getElementById('responseMessage');\n    responseDiv.style.color = \"red\";\n    responseDiv.innerHTML = `\n      <h3>\u274c Network Error<\/h3>\n      <p>Please try again or contact support.<\/p>\n      <p><small>${error.message}<\/small><\/p>\n    `;\n    console.error('Emergency request error:', error);\n  }\n});\n<\/script>\n\n<style>\n#emergencyForm input, #emergencyForm select, #emergencyForm textarea {\n  width: 100%;\n  padding: 10px;\n  margin-bottom: 15px;\n  border-radius: 5px;\n  border: 1px solid #ccc;\n  font-size: 14px;\n}\n\n#emergencyForm button {\n  background-color:#e74c3c;\n  color:white;\n  padding:12px 25px;\n  border:none;\n  border-radius:5px;\n  font-size:16px;\n  margin-top:10px;\n  width:100%;\n  cursor:pointer;\n  transition:background-color 0.3s;\n}\n\n#emergencyForm button:hover {\n  background-color: #c0392b;\n}\n\n#responseMessage ul {\n  margin: 10px 0;\n  padding-left: 20px;\n}\n\n#responseMessage li {\n  margin-bottom: 5px;\n}\n<\/style>\n\n<script>\ndocument.addEventListener(\"DOMContentLoaded\", function() {\n    \/\/ \u0627\u062e\u062a\u0627\u0631 \u0627\u0644\u0632\u0631\u0627\u0631 \u0627\u0644\u0644\u064a \u0639\u0627\u064a\u0632 \u062a\u063a\u064a\u0631 \u0627\u0633\u0645\u0647\n    \/\/ \u0644\u0648 \u0636\u0641\u062a Custom Link \u0641\u064a \u0627\u0644\u0647\u064a\u062f\u0631\n    \/\/ \u063a\u0627\u0644\u0628\u0627\u064b \u0647\u064a\u0643\u0648\u0646 \u0639\u0646\u062f\u0647 class \u0623\u0648 id \u0632\u064a \"menu-item-XXX\"\n    \n    \/\/ \u0645\u062b\u0627\u0644 \u0644\u0648 \u0627\u0644\u0632\u0631\u0627\u0631 \u0627\u0644\u0623\u062e\u064a\u0631 \u0641\u064a \u0627\u0644\u0647\u064a\u062f\u0631:\n    const menuItems = document.querySelectorAll(\"#site-navigation a\"); \/\/ \u0639\u062f\u0644 \u062d\u0633\u0628 \u0627\u0644\u0647\u064a\u062f\u0631 \u0639\u0646\u062f\u0643\n    menuItems.forEach(item => {\n        if(item.href.includes(\"page_id=3136\")){\n            item.textContent = \"Order Request\"; \/\/ \u0627\u0644\u0627\u0633\u0645 \u0627\u0644\u0644\u064a \u062a\u062d\u0628\u0647\n        }\n    });\n});\n<\/script>\n\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udea8 Emergency Request Need immediate roadside assistance? Fill out this form and we&#8217;ll respond immediately. Customer Information Vehicle Information Select vehicle typeSedanSUVTruckVanMotorcycleBusOther Emergency Details Select problem typeVehicle BreakdownAccidentFlat TireOut of GasDead BatteryKeys Locked in CarEngine OverheatingNeed TowingOther Emergency High &#8211; Need immediate assistanceMedium &#8211; Within 1-2 hoursLow &#8211; Can wait Send Emergency Request<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-3136","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_hostinger_reach_plugin_has_subscription_block":false,"_hostinger_reach_plugin_is_elementor":false,"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"mostafa.gamal.khdear@gmail.com","author_link":"https:\/\/gear-up.mm-host.com\/?author=1"},"uagb_comment_info":0,"uagb_excerpt":"\ud83d\udea8 Emergency Request Need immediate roadside assistance? Fill out this form and we&#8217;ll respond immediately. Customer Information Vehicle Information Select vehicle typeSedanSUVTruckVanMotorcycleBusOther Emergency Details Select problem typeVehicle BreakdownAccidentFlat TireOut of GasDead BatteryKeys Locked in CarEngine OverheatingNeed TowingOther Emergency High &#8211; Need immediate assistanceMedium &#8211; Within 1-2 hoursLow &#8211; Can wait Send Emergency Request","_links":{"self":[{"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=\/wp\/v2\/pages\/3136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3136"}],"version-history":[{"count":6,"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=\/wp\/v2\/pages\/3136\/revisions"}],"predecessor-version":[{"id":3186,"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=\/wp\/v2\/pages\/3136\/revisions\/3186"}],"wp:attachment":[{"href":"https:\/\/gear-up.mm-host.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}