<?php
require_once("../layouts/members/head.php");
?>
<?php if(in_array($user_data['user_id'], ['1'])){ ?>
<?php
if (isset($_POST['siteupdate']) && $user_data['user_id'] > 0) {
if (in_array($user_data['user_id'], ['1']) && in_array($user_data['usertype'], ['Admin'])){
    
    $fields = [
        'is_otp','pan_service', 'pandetils_service', 'aadhar_service', 'dl_pdf_service', 'rationpdf_service',
        'vehical_service', 'voter_service', 'aadhar_fingerPrint_service', 'aadhar_manual_service',
        'aadhar_Verify_service', 'eid_Status_service', 'aadhar_to_maskpan_service', 'pan_to_maskuid_service',
        'aadhar_to_panLink_service', 'pan_print_service', 'Rc_pdf_services', 'challan_Check_Service',
        'ration_to_pdf_Service', 'uid_ration_pdf_Service', 'voter_advance_Service', 'voter_Manual_Service',
        'voter_Mobile_Link_Service', 'voter_Pdf_Service', 'rationto_uid_find_service', 'dl_find_service','ll_service',
        'eshram_services','ayushman_service','janaadhar_service','familyid_service','rtps_service','farmer_services',
        'electricBill_services','aadhar_otp_service','pan2uid_find_service','npci_service','vehical_rc_father_find_Service',
        'mobile_dth_recharge_services','psa_active','janaadhar_member_details_services','dl_mobile_find_services','chassis2rc_services',
        'learning_pdf_services','learning_find_services', 'sharmadhan_service', 'gst_services', 'aadhar_pvc_service'
    ];

    $fee_fields = [
        'aadhar_advance_fee', 'aadhar_manual_print_fee', 'pan_card_print_fee', 'aadhar_verify_fee',
        'challan_fee', 'dl_pdf_fee', 'enrollment_status_fee', 'ration_pdf_fee', 'pan_find_fee',
        'pandetils_fee', 'pan_uid_status_fee', 'pan_to_mask_uid_fee', 'ifsc_verify_fee',
        'pincode_verify_fee', 'mobile_verify_fee', 'vehical_rc_fee', 'voter_advance_fee',
        'voter_mobile_link_fee', 'voter_pdf_fee', 'rationto_uid_find_fee', 'dl_find_fee',
        'll_apply_fee','uid_to_details_fee','eshram_print_fee','ayushman_fee','janaadhar_fee',
        'janaadhar_find_fee','familid_fee','rtps_br_price','dbt_farmer_fee','electricBill_fee',
        'agriFarmer_fee','Agrifarmer_Status_fee','aadhar_otp_fee','janaadhar_status_fee','pan2uid_find_fee',
        'npci_link_status_fee','vehical_rc_father_find_fee','rationto_uid_find_all_fee','pan_apply_fee','janaadhar_member_details_fee',
        'dl_mobile_find_fee','chassis2rc_fee','learning_find_fee','learning_pdf_fee', 'gst_verification_fee', 'sharmadhan_fee', 'aadhaarPvc_fee', 'min_balance'
    ];

    $insData = [];
    $allFilled = true;

    foreach ($fields as $field) {
        $$field = safe_str($_POST[$field] ?? '');
        if (empty($$field)) $allFilled = false;
        $insData[$field] = ($$field === 'YES') ? 'YES' : 'NO'; // Default value if empty
    }
    
    foreach ($fee_fields as $field) {
        $$field = safe_str($_POST[$field] ?? '');
        if (empty($$field)) {
            $$field = '10'; // Default price if empty
        }
        $insData[$field] = $$field;
    }

    if (!$allFilled) {
        awal_alert_msg("Please fill all valid details!", 'error');
    }

    // ✅ Update all members
    if (db_update("members", $insData, "1=1")) {
        $alterParts = [];
        foreach ($fee_fields as $field) {
            $length = ($field === 'pan_card_print_fee' || $field === 'aadhar_manual_print_fee') ? '100' : '10';
            $alterParts[] = "MODIFY `$field` VARCHAR($length) NOT NULL DEFAULT '{$$field}'";
        }
        foreach ($fields as $field) {
            $default = ($$field === 'YES') ? 'YES' : 'NO';
            $alterParts[] = "MODIFY `$field` ENUM('YES','NO') NOT NULL DEFAULT '$default'";
        }
        $alterQuery = "ALTER TABLE `members`\n" . implode(",\n", $alterParts) . ";";
        db()->query($alterQuery);

        $db = db(); 
        if ($db->query($alterQuery)) {
            awal_alert_msg("All Member Data Updated Successfully!", 'success', '');
        } else {
            $error = $db->error ?? 'Unknown error';
            awal_alert_msg("Member data updated, but ALTER TABLE failed: $error", 'error');
        }

    } else {
        awal_alert_msg("No changes were made!", 'info');
    }
  }else{
      awal_alert_msg("Unauthorized Access!", 'error', 'dashboard');
  }
}

?>

<div class="row">
  <div class="col-md-12 mb-2">
    <div class="card text-danger">
      <div class="card-header bg-primary text-white py-2">
        <div class="d-flex align-items-center">
          <span class="mr-auto"><?=file_name()?> - All Users Service Close Or Price Change Here !</span>
        </div>
      </div>
      <div class="p-3">
      <form class="row text-dark" method="POST" action="">
        <div class="container mt-8">
      <h6 class="mb-12 text-center">ALL SERVICE ON/OFF</h6><hr>  <div class="col-md-12 mb-3 row text-center p-2">
        <div class="col-md-2 mb-3">
          <label for="is_otp">ALL MEMBER OTP LOGIN</label>
          <select class="form-control" id="is_otp" name="is_otp" required>
              <option value="YES" <?= $user_data['is_otp'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['is_otp'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        <div class="col-md-2 mb-3">
          <label for="aadhar_service">ALL AADHAAR SERVICE</label>
          <select class="form-control" id="aadhar_service" name="aadhar_service" required>
              <option value="YES" <?= $user_data['aadhar_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="aadhar_otp_service" >ALL AADHAR OTP SERVICE</label>
          <select class="form-control" id="aadhar_otp_service" name="aadhar_otp_service" required>
              <option value="YES" <?= $user_data['aadhar_otp_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_otp_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="voter_service">ALL VOTER SERVICE</label>
          <select class="form-control" id="voter_service" name="voter_service" required>
              <option value="YES" <?= $user_data['voter_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['voter_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="learning_find_services" style="color:red; font-weight:bold;"> LL APPLICATION FIND SERVICE</label>
          <select class="form-control" id="learning_find_services" name="learning_find_services" required>
              <option value="YES" <?= $user_data['learning_find_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['learning_find_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
           <div class="col-md-2 mb-3">
          <label for="sharmadhan_service" style="color:red; font-weight:bold;">Sharmadhan Service</label>
          <select class="form-control" id="sharmadhan_service" name="sharmadhan_service" required>
              <option value="YES" <?= $user_data['sharmadhan_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['sharmadhan_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="gst_services" style="color:red; font-weight:bold;">Gst Service</label>
          <select class="form-control" id="gst_services" name="gst_services" required>
              <option value="YES" <?= $user_data['gst_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['gst_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
         <div class="col-md-2 mb-3">
          <label for="aadhar_pvc_service" style="color:red; font-weight:bold;">Aadhaar Pvc Service</label>
          <select class="form-control" id="aadhar_pvc_service" name="aadhar_pvc_service" required>
              <option value="YES" <?= $user_data['aadhar_pvc_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_pvc_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="learning_pdf_services" style="color:red; font-weight:bold;"> LL PDF SERVICE</label>
          <select class="form-control" id="learning_pdf_services" name="learning_pdf_services" required>
              <option value="YES" <?= $user_data['learning_pdf_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['learning_pdf_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="ll_service">ALL LL EXAM SERVICE</label>
          <select class="form-control" id="ll_service" name="ll_service" required>
              <option value="YES" <?= $user_data['ll_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['ll_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="janaadhar_member_details_services" style="color:red; font-weight:bold;">JANAADHAR MEMBER DETAILS</label>
          <select class="form-control" id="janaadhar_member_details_services" name="janaadhar_member_details_services" required>
              <option value="YES" <?= $user_data['janaadhar_member_details_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['janaadhar_member_details_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="janaadhar_service" >ALL JANAADHAR SERVICE</label>
          <select class="form-control" id="janaadhar_service" name="janaadhar_service" required>
              <option value="YES" <?= $user_data['janaadhar_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['janaadhar_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="familyid_service" >ALL FAMILYID-HR SERVICE</label>
          <select class="form-control" id="familyid_service" name="familyid_service" required>
              <option value="YES" <?= $user_data['familyid_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['familyid_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="farmer_services" >ALL FARMER SERVICE</label>
          <select class="form-control" id="farmer_services" name="farmer_services" required>
              <option value="YES" <?= $user_data['farmer_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['farmer_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="electricBill_services" >ALL ELECTRIC-BILL SERVICE</label>
          <select class="form-control" id="electricBill_services" name="electricBill_services" required>
              <option value="YES" <?= $user_data['electricBill_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['electricBill_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="rtps_service" >ALL RTPS SERVICE</label>
          <select class="form-control" id="rtps_service" name="rtps_service" required>
              <option value="YES" <?= $user_data['rtps_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['rtps_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="ayushman_service">ALL AYUSHMAN SERVICE</label>
          <select class="form-control" id="ayushman_service" name="ayushman_service" required>
              <option value="YES" <?= $user_data['ayushman_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['ayushman_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="eshram_services">ALL e-Shram SERVICE</label>
          <select class="form-control" id="eshram_services" name="eshram_services" required>
              <option value="YES" <?= $user_data['eshram_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['eshram_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="dl_pdf_service">ALL DL SERVICE</label>
          <select class="form-control" id="dl_pdf_service" name="dl_pdf_service" required>
              <option value="YES" <?= $user_data['dl_pdf_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['dl_pdf_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="rationpdf_service">ALL RATION SERVICE</label>
          <select class="form-control" id="rationpdf_service" name="rationpdf_service" required>
              <option value="YES" <?= $user_data['rationpdf_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['rationpdf_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="vehical_service">ALL VEHICAL SERVICE</label>
          <select class="form-control" id="vehical_service" name="vehical_service" required>
              <option value="YES" <?= $user_data['vehical_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['vehical_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="pan_service">ALL PAN SERVICE</label>
          <select class="form-control" id="pan_service" name="pan_service" required>
              <option value="YES" <?= $user_data['pan_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['pan_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="npci_service">NPCI SERVICE</label>
          <select class="form-control" id="npci_service" name="npci_service" required>
              <option value="YES" <?= $user_data['npci_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['npci_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="psa_active">NSDL PAN APPLY/CORRECTION SERVICE</label>
          <select class="form-control" id="psa_active" name="psa_active" required>
              <option value="YES" <?= $user_data['psa_active'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['psa_active'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="mobile_dth_recharge_services">MOBILE/DTH RECHARGE SERVICE</label>
          <select class="form-control" id="mobile_dth_recharge_services" name="mobile_dth_recharge_services" required>
              <option value="YES" <?= $user_data['mobile_dth_recharge_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['mobile_dth_recharge_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="pan2uid_find_service">PAN 2 UID FIND SERVICE</label>
          <select class="form-control" id="pan2uid_find_service" name="pan2uid_find_service" required>
              <option value="YES" <?= $user_data['pan2uid_find_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['pan2uid_find_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="aadhar_fingerPrint_service">AADHAR FINGERPRINT</label>
          <select class="form-control" id="aadhar_fingerPrint_service" name="aadhar_fingerPrint_service" required>
              <option value="YES" <?= $user_data['aadhar_fingerPrint_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_fingerPrint_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="aadhar_manual_service">AADHAR MANUAL</label>
          <select class="form-control" id="aadhar_manual_service" name="aadhar_manual_service" required>
              <option value="YES" <?= $user_data['aadhar_manual_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_manual_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="aadhar_Verify_service">AADHAR NO. VERIFY</label>
          <select class="form-control" id="aadhar_Verify_service" name="aadhar_Verify_service" required>
              <option value="YES" <?= $user_data['aadhar_Verify_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_Verify_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="eid_Status_service">EID STATUS CHECK</label>
          <select class="form-control" id="eid_Status_service" name="eid_Status_service" required>
              <option value="YES" <?= $user_data['eid_Status_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['eid_Status_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="aadhar_to_maskpan_service">UID TO MASK PAN</label>
          <select class="form-control" id="aadhar_to_maskpan_service" name="aadhar_to_maskpan_service" required>
              <option value="YES" <?= $user_data['aadhar_to_maskpan_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_to_maskpan_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="pan_to_maskuid_service">PAN TO MASK UID</label>
          <select class="form-control" id="pan_to_maskuid_service" name="pan_to_maskuid_service" required>
              <option value="YES" <?= $user_data['pan_to_maskuid_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['pan_to_maskuid_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="aadhar_to_panLink_service">UID PAN LINK STATUS</label>
          <select class="form-control" id="aadhar_to_panLink_service" name="aadhar_to_panLink_service" required>
              <option value="YES" <?= $user_data['aadhar_to_panLink_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['aadhar_to_panLink_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="pan_print_service">PAN PRINT</label>
          <select class="form-control" id="pan_print_service" name="pan_print_service" required>
              <option value="YES" <?= $user_data['pan_print_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['pan_print_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="pandetils_service">PAN DETAILS</label>
          <select class="form-control" id="pandetils_service" name="pandetils_service" required>
              <option value="YES" <?= $user_data['pandetils_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['pandetils_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="vehical_rc_father_find_Service">RC Father Find</label>
          <select class="form-control" id="vehical_rc_father_find_Service" name="vehical_rc_father_find_Service" required>
              <option value="YES" <?= $user_data['vehical_rc_father_find_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['vehical_rc_father_find_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="Rc_pdf_services">RC PDF</label>
          <select class="form-control" id="Rc_pdf_services" name="Rc_pdf_services" required>
              <option value="YES" <?= $user_data['Rc_pdf_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['Rc_pdf_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="challan_Check_Service">CHALLAN DETAILS</label>
          <select class="form-control" id="challan_Check_Service" name="challan_Check_Service" required>
              <option value="YES" <?= $user_data['challan_Check_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['challan_Check_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="dl_mobile_find_services" style="color:red; font-weight:bold;">DL TO MOBILE FIND</label>
          <select class="form-control" id="dl_mobile_find_services" name="dl_mobile_find_services" required>
              <option value="YES" <?= $user_data['dl_mobile_find_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['dl_mobile_find_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="dl_find_service">DL FIND</label>
          <select class="form-control" id="dl_find_service" name="dl_find_service" required>
              <option value="YES" <?= $user_data['dl_find_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['dl_find_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="chassis2rc_services" style="color:red; font-weight:bold;">CHASSIS TO RC FIND</label>
          <select class="form-control" id="chassis2rc_services" name="chassis2rc_services" required>
              <option value="YES" <?= $user_data['chassis2rc_services'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['chassis2rc_services'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="rationto_uid_find_service">RATION TO AADHAAR FIND</label>
          <select class="form-control" id="rationto_uid_find_service" name="rationto_uid_find_service" required>
              <option value="YES" <?= $user_data['rationto_uid_find_service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['rationto_uid_find_service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>

        <div class="col-md-2 mb-3">
          <label for="ration_to_pdf_Service">RATION TO PDF</label>
          <select class="form-control" id="ration_to_pdf_Service" name="ration_to_pdf_Service" required>
              <option value="YES" <?= $user_data['ration_to_pdf_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['ration_to_pdf_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="uid_ration_pdf_Service">UID 2 RATION PDF</label>
          <select class="form-control" id="uid_ration_pdf_Service" name="uid_ration_pdf_Service" required>
              <option value="YES" <?= $user_data['uid_ration_pdf_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['uid_ration_pdf_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="voter_advance_Service">VOTER ADVANCE</label>
          <select class="form-control" id="voter_advance_Service" name="voter_advance_Service" required>
              <option value="YES" <?= $user_data['voter_advance_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['voter_advance_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="voter_Manual_Service">VOTER MANUAL</label>
          <select class="form-control" id="voter_Manual_Service" name="voter_Manual_Service" required>
              <option value="YES" <?= $user_data['voter_Manual_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['voter_Manual_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="voter_Mobile_Link_Service">VOTER MOBILE LINK</label>
          <select class="form-control" id="voter_Mobile_Link_Service" name="voter_Mobile_Link_Service" required>
              <option value="YES" <?= $user_data['voter_Mobile_Link_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['voter_Mobile_Link_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        
        <div class="col-md-2 mb-3">
          <label for="voter_Pdf_Service">VOTER ORIGINAL PDF</label>
          <select class="form-control" id="voter_Pdf_Service" name="voter_Pdf_Service" required>
              <option value="YES" <?= $user_data['voter_Pdf_Service'] === 'YES' ? 'selected' : '' ?>>Active</option>
              <option value="NO" <?= $user_data['voter_Pdf_Service'] === 'NO' ? 'selected' : '' ?>>Deactive</option>
          </select>
        </div>
        </div>
        </div>
        
        <!--------------------------------------------------------------------------------------------------------------------------------------------------------------------->
       
         <div class="container mt-8">
      <h6 class="mb-12 text-center">ALL SERVICE PRICE</h6><hr> 
      <div class="col-md-12 mb-3 row text-center p-2">
        <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;"> Minimum Amount Add</label>
          <input type="number" class="form-control" placeholder="min_balance Charge" name="min_balance" value="<?=$user_data['min_balance'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Aadhaar Fingerprint</label>
          <input type="number" class="form-control" placeholder="aadhar_advance_fee Charge" name="aadhar_advance_fee" value="<?=$user_data['aadhar_advance_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label >Aadhaar OTP</label>
          <input type="number" class="form-control" placeholder="aadhar_otp_fee Charge" name="aadhar_otp_fee" value="<?=$user_data['aadhar_otp_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">JanAadhar Member Details</label>
          <input type="number" class="form-control" placeholder="janaadhar_member_details_fee Charge" name="janaadhar_member_details_fee" value="<?=$user_data['janaadhar_member_details_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Uid 2 JanAadhar Find</label>
          <input type="number" class="form-control" placeholder="janaadhar_find_fee Charge" name="janaadhar_find_fee" value="<?=$user_data['janaadhar_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>JanAaadhar PDF</label>
          <input type="number" class="form-control" placeholder="janaadhar_fee Charge" name="janaadhar_fee" value="<?=$user_data['janaadhar_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>JanAaadhar Status</label>
          <input type="number" class="form-control" placeholder="janaadhar_status_fee Charge" name="janaadhar_status_fee" value="<?=$user_data['janaadhar_status_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label  >DBT Farmer PDF</label>
          <input type="number" class="form-control" placeholder="dbt_farmer_fee Charge" name="dbt_farmer_fee" value="<?=$user_data['dbt_farmer_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label >Agri Farmer PDF</label>
          <input type="number" class="form-control" placeholder="agriFarmer_fee Charge" name="agriFarmer_fee" value="<?=$user_data['agriFarmer_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label >Agri Farmer Status</label>
          <input type="number" class="form-control" placeholder="Agrifarmer_Status_fee Charge" name="Agrifarmer_Status_fee" value="<?=$user_data['Agrifarmer_Status_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label  >Electric Bill Details</label>
          <input type="number" class="form-control" placeholder="electricBill_fee Charge" name="electricBill_fee" value="<?=$user_data['electricBill_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>RTPS Bihar</label>
          <input type="number" class="form-control" placeholder="rtps_br_price Charge" name="rtps_br_price" value="<?=$user_data['rtps_br_price'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>FamilyID PDF</label>
          <input type="number" class="form-control" placeholder="familid_fee Charge" name="familid_fee" value="<?=$user_data['familid_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Ayushman Print</label>
          <input type="number" class="form-control" placeholder="ayushman_fee Charge" name="ayushman_fee" value="<?=$user_data['ayushman_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Aadhaar 2 Full Details</label>
          <input type="number" class="form-control" placeholder="uid_to_details_fee Charge" name="uid_to_details_fee" value="<?=$user_data['uid_to_details_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>e-Shram Print</label>
          <input type="number" class="form-control" placeholder="eshram_print_fee Charge" name="eshram_print_fee" value="<?=$user_data['eshram_print_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Aadhaar Manual</label>
          <input type="number" class="form-control" placeholder="aadhar_manual_print_fee Charge" name="aadhar_manual_print_fee" value="<?=$user_data['aadhar_manual_print_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Aadhaar Verify</label>
          <input type="number" class="form-control" placeholder="aadhar_verify_fee Charge" name="aadhar_verify_fee" value="<?=$user_data['aadhar_verify_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Enrollment Status</label>
          <input type="number" class="form-control" placeholder="enrollment_status_fee Charge" name="enrollment_status_fee" value="<?=$user_data['enrollment_status_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Bank IFSC</label>
          <input type="number" class="form-control" placeholder="ifsc_verify_fee Charge" name="ifsc_verify_fee" value="<?=$user_data['ifsc_verify_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Vehical Challan</label>
          <input type="number" class="form-control" placeholder="challan_fee Charge" name="challan_fee" value="<?=$user_data['challan_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Vehical RC Father Find</label>
          <input type="number" class="form-control" placeholder="vehical_rc_father_find_fee Charge" name="vehical_rc_father_find_fee" value="<?=$user_data['vehical_rc_father_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">Chassis 2 Rc Find</label>
          <input type="number" class="form-control" placeholder="chassis2rc_fee Charge" name="chassis2rc_fee" value="<?=$user_data['chassis2rc_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Vehical RC</label>
          <input type="number" class="form-control" placeholder="vehical_rc_fee Charge" name="vehical_rc_fee" value="<?=$user_data['vehical_rc_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">Learning PDF (LL)</label>
          <input type="number" class="form-control" placeholder="learning_pdf_fee Charge" name="learning_pdf_fee" value="<?=$user_data['learning_pdf_fee'] ?? '0';?>" required>
        </div>
         <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">Gst Charge</label>
          <input type="number" class="form-control" placeholder="gst_verification_fee Charge" name="gst_verification_fee" value="<?=$user_data['gst_verification_fee'] ?? '0';?>" required>
        </div>
         <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">Sharmadhan Charge</label>
          <input type="number" class="form-control" placeholder="sharmadhan_fee Charge" name="sharmadhan_fee" value="<?=$user_data['sharmadhan_fee'] ?? '0';?>" required>
        </div>
        
         <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">Aadhaar Pvc Charge</label>
          <input type="number" class="form-control" placeholder="aadhaarPvc_fee Charge" name="aadhaarPvc_fee" value="<?=$user_data['aadhaarPvc_fee'] ?? '0';?>" required>
        </div>
        
        <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">Learning Application Find</label>
          <input type="number" class="form-control" placeholder="learning_find_fee Charge" name="learning_find_fee" value="<?=$user_data['learning_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>LL Exam Apply</label>
          <input type="number" class="form-control" placeholder="ll_apply_fee Charge" name="ll_apply_fee" value="<?=$user_data['ll_apply_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Driving Licence Find </label>
          <input type="number" class="form-control" placeholder="dl_find_fee Charge" name="dl_find_fee" value="<?=$user_data['dl_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label style="color:red; font-weight:bold;">DL to Mobile Find</label>
          <input type="number" class="form-control" placeholder="dl_mobile_find_fee Charge" name="dl_mobile_find_fee" value="<?=$user_data['dl_mobile_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Driving Licence PDF</label>
          <input type="number" class="form-control" placeholder="dl_pdf_fee Charge" name="dl_pdf_fee" value="<?=$user_data['dl_pdf_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Ration 2 Aadhaar Find All</label>
          <input type="number" class="form-control" placeholder="rationto_uid_find_all_fee Charge" name="rationto_uid_find_all_fee" value="<?=$user_data['rationto_uid_find_all_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Ration 2 Aadhaar Find</label>
          <input type="number" class="form-control" placeholder="rationto_uid_find_fee Charge" name="rationto_uid_find_fee" value="<?=$user_data['rationto_uid_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Ration PDF</label>
          <input type="number" class="form-control" placeholder="ration_pdf_fee Charge" name="ration_pdf_fee" value="<?=$user_data['ration_pdf_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label >NSDL PAN APPLY/CORRECTION</label>
          <input type="number" class="form-control" placeholder="pan_apply_fee Charge" name="pan_apply_fee" value="<?=$user_data['pan_apply_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Pan Card Print</label>
          <input type="number" class="form-control" placeholder="pan_card_print_fee Charge" name="pan_card_print_fee" value="<?=$user_data['pan_card_print_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Pan Find</label>
          <input type="number" class="form-control" placeholder="pan_find_fee Charge" name="pan_find_fee" value="<?=$user_data['pan_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>NPCI BANK LINK STATUS</label>
          <input type="number" class="form-control" placeholder="npci_link_status_fee Charge" name="npci_link_status_fee" value="<?=$user_data['npci_link_status_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Pan 2 UID Find</label>
          <input type="number" class="form-control" placeholder="pan2uid_find_fee Charge" name="pan2uid_find_fee" value="<?=$user_data['pan2uid_find_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Pan Details</label>
          <input type="number" class="form-control" placeholder="pandetils_fee Charge" name="pandetils_fee" value="<?=$user_data['pandetils_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Pan Aadhar Link Status</label>
          <input type="number" class="form-control" placeholder="pan_uid_status_fee Charge" name="pan_uid_status_fee" value="<?=$user_data['pan_uid_status_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Pan to Mask Aadhaar</label>
          <input type="number" class="form-control" placeholder="pan_to_mask_uid_fee Charge" name="pan_to_mask_uid_fee" value="<?=$user_data['pan_to_mask_uid_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Voter Verification</label>
          <input type="number" class="form-control" placeholder="voter_advance_fee Charge" name="voter_advance_fee" value="<?=$user_data['voter_advance_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Voter Mobile Link</label>
          <input type="number" class="form-control" placeholder="voter_mobile_link_fee Charge" name="voter_mobile_link_fee" value="<?=$user_data['voter_mobile_link_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Voter Orginal PDF</label>
          <input type="number" class="form-control" placeholder="voter_pdf_fee Charge" name="voter_pdf_fee" value="<?=$user_data['voter_pdf_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Pincode Verification</label>
          <input type="number" class="form-control" placeholder="pincode_verify_fee Charge" name="pincode_verify_fee" value="<?=$user_data['pincode_verify_fee'] ?? '0';?>" required>
        </div>
        <div class="col-md-2 mb-3">
          <label>Mobile Number Verify</label>
          <input type="number" class="form-control" placeholder="mobile_verify_fee Charge" name="mobile_verify_fee" value="<?=$user_data['mobile_verify_fee'] ?? '0';?>" required>
          <input type="hidden" class="form-control" name="user_id" value="<?=$user_data['user_id'] ?? '1';?>" required>
        </div>
        <div class="col-md-4 mb-3">
          <button type="submit" class="btn btn-primary btn-block" name="siteupdate">Submit</button>
        </div>
      </form>
  </div>
     </div>
    </div>
  </div>
</div>
<?php 
}else{
require_once("404.php");
} 
?>

<?php
require_once("../layouts/members/foot.php");
data_table('#dataTable');
?>