/
home
/
u775757334
/
domains
/
civicwelllife.com
/
public_html
/
/home/u775757334/domains/civicwelllife.com/public_html
mkdir
upload
Name
Size
Mode
Actions
admin/
-
0755
rm
civiclife/
-
0755
rm
css/
-
0755
rm
fonts/
-
0755
rm
function/
-
0755
rm
images/
-
0755
rm
include/
-
0755
rm
js/
-
0755
rm
management/
-
0755
rm
media/
-
0755
rm
razorpay/
-
0755
rm
seller/
-
0755
rm
vendor/
-
0755
rm
09.php
142
0644
edit
dl
rm
about-us.php
3025
0644
edit
dl
rm
account.php
7408
0644
edit
dl
rm
add-shipping.php
6073
0644
edit
dl
rm
affiliate-registration.php
4543
0644
edit
dl
rm
arrow.jpg
1546
0644
edit
dl
rm
blog-details.php
10838
0644
edit
dl
rm
blog-list.php
9268
0644
edit
dl
rm
blog.php
10062
0644
edit
dl
rm
booking-process.php
2149
0644
edit
dl
rm
booking-success.php
5541
0644
edit
dl
rm
category-details.php
7903
0644
edit
dl
rm
checkout.php
15505
0644
edit
dl
rm
civiclife (2).zip
151986360
0644
edit
dl
rm
config.php
9419
0644
edit
dl
rm
consultation-payment.php
12113
0644
edit
dl
rm
consultation.php
17921
0644
edit
dl
rm
contact-us.php
9742
0644
edit
dl
rm
cpage.css
14115
0644
edit
dl
rm
create-order.php
443
0644
edit
dl
rm
create_zoom_link.php
2832
0644
edit
dl
rm
default.php
16369
0644
edit
dl
rm
delivery-return.php
2923
0644
edit
dl
rm
dlogout.php
125
0644
edit
dl
rm
doctor-account.php
36857
0644
edit
dl
rm
doctor-appointments.php
10379
0644
edit
dl
rm
doctor-blog.php
8588
0644
edit
dl
rm
doctor-consultation.php
5467
0644
edit
dl
rm
doctor-profile.php
32002
0644
edit
dl
rm
doctor-registration.php
13189
0644
edit
dl
rm
doctors.php
10383
0644
edit
dl
rm
end_meeting.php
230
0644
edit
dl
rm
faq-list.php
7900
0644
edit
dl
rm
faq.php
6367
0644
edit
dl
rm
get_subcategory.php
437
0644
edit
dl
rm
health-test.php
31910
0644
edit
dl
rm
index.html
4133
0644
edit
dl
rm
index.php
3656
0644
edit
dl
rm
login.php
3842
0644
edit
dl
rm
media.zip
37481598
0644
edit
dl
rm
my-account.php
7397
0644
edit
dl
rm
order-details.php
6172
0644
edit
dl
rm
patient-login.php
7935
0644
edit
dl
rm
privacy-policy.php
2430
0644
edit
dl
rm
product-detail.php
32756
0644
edit
dl
rm
product-list.php
10761
0644
edit
dl
rm
return-and-refund.php
2398
0644
edit
dl
rm
review.php
12362
0644
edit
dl
rm
seller-registration.php
11374
0644
edit
dl
rm
send_review.php
765
0644
edit
dl
rm
start_meeting.php
194
0644
edit
dl
rm
sub-category.php
7839
0644
edit
dl
rm
terms-and-conditions.php
2681
0644
edit
dl
rm
testimonial-list.php
8787
0644
edit
dl
rm
testimonial.php
8060
0644
edit
dl
rm
timing-list.php
6068
0644
edit
dl
rm
timming.php
7571
0644
edit
dl
rm
vedio-list.php
7877
0644
edit
dl
rm
vedio.php
8579
0644
edit
dl
rm
vedios.php
8787
0644
edit
dl
rm
Edit:
/home/u775757334/domains/civicwelllife.com/public_html/consultation.php
(17921B)
<?php include 'config.php'; ?> <!DOCTYPE html> <html xml:lang="en-US" lang="en-US"> <head> <meta charset="utf-8"> <title><?= $meta_title ?></title> <meta name="description" content="<?= $meta_keyword ?>"> <meta name="keywords" content="<?= $meta_description ?>"> <meta name="author" content="themesflat.com"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <?php include 'include/header-file.php'; ?> <link rel="stylesheet" href="function/custum.css"> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap" rel="stylesheet"> <link rel="stylesheet" href="cpage.css"> </head> <body class="preload-wrapper color-primary-8 color-main-text-2"> <div id="wrapper"> <?php include 'include/header.php'; ?> <div class="tf-page-title style-2"> <div class="container-full"> <div class="heading text-center">Doctor Consultation</div> </div> </div> <div class="circle"></div> <div class="circle"></div> <div class="circle"></div> <div class="wrapper"> <div class="main-card"> <!-- LEFT SIDE --> <div class="left-side"> <img src="https://images.unsplash.com/photo-1579684385127-1ef15d508118?w=800" alt="Doctor Consultation" class="consult-image"> </div> <!-- RIGHT SIDE --> <div class="right-side"> <div class="progress-vertical"> <div class="progress-dot active"></div> <div class="progress-dot"></div> <div class="progress-dot"></div> <div class="progress-dot"></div> </div> <div class="form-content"> <form id="multiForm"> <!-- STEP 1 --> <div class="step active" id="step1"> <h5>Select Your Problem</h5> <div class="problem-grid"> <?php $sql = mysqli_query( $conn, "SELECT id, name, icon FROM tbl_disease_category" ); while ($row = mysqli_fetch_assoc($sql)) { ?> <div class="problem-card option" data-id="<?php echo $row['id']; ?>"> <i class="<?php echo $row['icon']; ?>"></i> <span><?php echo htmlspecialchars($row['name']); ?></span> </div> <?php } ?> </div> <input type="hidden" id="category_id" name="category_id"> <div class="text-end mt-4"> <button type="button" class="btn btn-next" onclick="nextStep()"> Next <i class="fa-solid fa-arrow-right ms-2"></i> </button> </div> </div> <!-- STEP 2 --> <div class="step" id="step2"> <h5>Select Main Issue</h5> <select class="form-select" id="subcategory_id" name="subcategory_id"> <option value="">Choose specific concern...</option> </select> <div class="d-flex justify-content-between mt-4"> <button type="button" class="btn btn-prev" onclick="prevStep()"> <i class="fa-solid fa-arrow-left me-2"></i> Back </button> <button type="button" class="btn btn-next" onclick="nextStep()"> Next <i class="fa-solid fa-arrow-right ms-2"></i> </button> </div> </div> <!-- STEP 3 --> <div class="step"> <h5>Your Details</h5> <input type="text" class="form-control" id="fullName" placeholder="Full Name" required> <input type="tel" class="form-control" id="phone" placeholder="Phone Number" required> <input type="email" class="form-control" id="email" placeholder="Email Address" required> <input type="text" class="form-control" id="city" placeholder="City" required> <div class="d-flex justify-content-between mt-3"> <button type="button" class="btn btn-prev" onclick="prevStep()"> <i class="fa-solid fa-arrow-left me-2"></i> Back </button> <button type="button" class="btn btn-next" onclick="nextStep()"> Next <i class="fa-solid fa-arrow-right ms-2"></i> </button> </div> </div> <!-- STEP 4 --> <div class="step"> <h5>Consultation Type</h5> <div class="form-check"> <input class="form-check-input" type="radio" name="consult" id="free" value="free"> <label class="form-check-label" for="free"> <i class="fa-solid fa-gifts me-2"></i> Free Consultation </label> </div> <div class="form-check"> <input class="form-check-input" type="radio" name="consult" id="paid" value="paid"> <label class="form-check-label" for="paid"> <i class="fa-solid fa-star me-2"></i> Paid Consultation </label> </div> <div class="form-check"> <input class="form-check-input" type="radio" name="consult" id="product" value="product"> <label class="form-check-label" for="product"> <i class="fa-solid fa-box me-2"></i> Product Related Issue </label> </div> <div class="d-flex justify-content-between mt-4"> <button type="button" class="btn btn-prev" onclick="prevStep()"> <i class="fa-solid fa-arrow-left me-2"></i> Back </button> <button type="submit" class="btn btn-success px-5"> <i class="fa-solid fa-check me-2"></i> Submit </button> </div> </div> <!-- Success Message --> <div class="success-message"> <div class="success-icon"> <i class="fa-solid fa-check"></i> </div> <h3>Appointment Requested!</h3> <p>Our team will contact you shortly to confirm your consultation.</p> </div> </form> </div> </div> </div> </div> <?php include 'include/footer.php'; ?> </div> <?php include 'include/footer-tab.php'; ?> <?php include 'include/model.php'; ?> <script type="text/javascript" src="js/bootstrap.min.js"></script> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/swiper-bundle.min.js"></script> <script type="text/javascript" src="js/carousel.js"></script> <script type="text/javascript" src="js/bootstrap-select.min.js"></script> <script type="text/javascript" src="js/lazysize.min.js"></script> <script type="text/javascript" src="js/bootstrap-select.min.js"></script> <script type="text/javascript" src="js/count-down.js"></script> <script type="text/javascript" src="js/wow.min.js"></script> <script type="text/javascript" src="js/multiple-modal.js"></script> <script type="text/javascript" src="js/main.js"></script> <script type="text/javascript" src="function/custum.js"></script> <?php include 'include/footer-file.php' ?> <script> let currentStep = 0; const steps = document.querySelectorAll(".step"); // show step function showStep(index) { const steps = document.querySelectorAll(".step"); const dots = document.querySelectorAll(".progress-dot"); steps.forEach((step, i) => { step.classList.toggle("active", i === index); if (dots[i]) { dots[i].classList.remove("active", "completed"); if (i === index) { dots[i].classList.add("active"); } else if (i < index) { dots[i].classList.add("completed"); } } }); } // NEXT function nextStep() { if (validateCurrentStep()) { if (currentStep < steps.length - 1) { currentStep++; showStep(currentStep); } } } // PREV function prevStep() { if (currentStep > 0) { currentStep--; showStep(currentStep); } } // VALIDATION (MOST IMPORTANT 🔥) function validateCurrentStep() { // STEP 1: Category required if (currentStep === 0) { const selected = document.querySelector('.problem-card.selected'); if (!selected) { alert("Please select a problem"); return false; } } // STEP 2: Subcategory required if (currentStep === 1) { const sub = document.getElementById("subcategory_id"); if (!sub.value) { alert("Please select a specific concern"); return false; } } // STEP 3: Details required if (currentStep === 2) { const name = document.getElementById("fullName").value.trim(); const phone = document.getElementById("phone").value.trim(); const email = document.getElementById("email").value.trim(); const city = document.getElementById("city").value.trim(); if (!name || !phone || !email || !city) { alert("Please fill all your details"); return false; } } return true; } // CATEGORY CLICK (STEP-1) document.querySelectorAll('.problem-card').forEach(card => { card.addEventListener('click', function() { document.querySelectorAll('.problem-card') .forEach(c => c.classList.remove('selected')); this.classList.add('selected'); const categoryId = this.dataset.id; document.getElementById('category_id').value = categoryId; loadSubcategory(categoryId); }); }); // LOAD SUBCATEGORY (AJAX) function loadSubcategory(categoryId) { fetch('get_subcategory.php?category_id=' + categoryId) .then(res => res.text()) .then(html => { document.getElementById('subcategory_id').innerHTML = html; }); } // FORM SUBMIT (STEP-4 LOGIC) // document.getElementById('multiForm').addEventListener('submit', function(e) { // e.preventDefault(); // const selectedConsult = document.querySelector('input[name="consult"]:checked'); // if (!selectedConsult) { // alert("Please select consultation type"); // return; // } // const consultType = selectedConsult.value; // const name = document.getElementById("fullName").value.trim(); // const subcategoryId = document.getElementById("subcategory_id").value; // // FREE // if (consultType === "free") { // const phone = "919697982099"; // const message = `Hello, my name is ${name}. I want a Free Consultation.`; // window.location.href = `https://wa.me/${phone}?text=${encodeURIComponent(message)}`; // return; // } // // PAID // if (consultType === "paid") { // // prefer subcategory, fallback category // const problemId = subcategoryId ? // subcategoryId : // document.getElementById('category_id').value; // if (!problemId) { // alert("Please select a problem first"); // return; // } // window.location.href = "doctors.php?problem_id=" + problemId; // return; // } // // PRODUCT RELATED 🔥 // if (consultType === "product") { // if (!subcategoryId) { // alert("Please select a problem first"); // return; // } // window.location.href = "product-list.php?problem_id=" + subcategoryId; // } // }); document.getElementById('multiForm').addEventListener('submit', function(e) { e.preventDefault(); const consultType = document.querySelector('input[name="consult"]:checked')?.value; if (!consultType) { alert("Please select consultation type"); return; } const name = document.getElementById("fullName").value.trim(); const phone = document.getElementById("phone").value.trim(); const email = document.getElementById("email").value.trim(); const city = document.getElementById("city").value.trim(); const catId = document.getElementById("category_id").value; const subId = document.getElementById("subcategory_id").value; const problemId = subId ? subId : catId; // 🔥 STEP 1: SAVE ENQUIRY fetch("function/ajax_function.php", { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: new URLSearchParams({ action: "saveDoctorEnquiry", name: name, phone: phone, email: email, city: city, problem_id: problemId, category_id: catId }) }) .then(res => res.text()) .then(res => { // 🔥 STEP 2: REDIRECT AFTER SAVE if (consultType === "free") { const phoneNo = "919697982099"; const msg = `Hello, my name is ${name}. I want a Free Consultation.`; window.location.href = `https://wa.me/${phoneNo}?text=${encodeURIComponent(msg)}`; } if (consultType === "paid") { window.location.href = "doctors.php?problem_id=" + problemId; } if (consultType === "product") { window.location.href = "product-list.php?problem_id=" + problemId; } }); }); // INIT showStep(currentStep); </script> </body> </html>
Save
cmd:
run