diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index 65b805b4..e1223709 100755 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -660,18 +660,25 @@ class ClientController extends AdminController } // In your controller - public function deposit($id = null, $requestFrom = null, $policyId = null) + public function deposit($ClientId = null, $requestFrom = null, $policyId = null) { $headerData['tab_name'] = 'Client Deposit'; $headerData['page_name'] = 'Clients'; - $data['clientName'] = $this->clientModel->where('id', (int)$id)->find(); - $data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($id, $policyId); + if (is_string($ClientId) && preg_match('/^[a-f0-9]{32}$/i', $ClientId)) + { + $data['clientName'] = $this->clientModel->where('md5(id)', $ClientId)->find(); + }else { + $data['clientName'] = $this->clientModel->where('id', $ClientId)->find(); + } - $data['depositsummary'] = $this->clientPolicyModel->getDepositlistsummary($id); + + $data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($ClientId, $policyId); + + $data['depositsummary'] = $this->clientPolicyModel->getDepositlistsummary($ClientId); // Fetch associated insurer names and balances - $balances = $this->clientPolicyModel->getBalances($id); + $balances = $this->clientPolicyModel->getBalances($ClientId); $data['balances'] = $balances; // dd($data); @@ -1973,8 +1980,8 @@ class ClientController extends AdminController $this->myLogger->logme('error', 'Client policy CREATE function called'); - $data = $this->request->getPost(); - $sanitized_post_data = sanitizeInputArrayAdvanced($data); + $request_post_data = $this->request->getPost(); + $$sanitized_post_data = sanitizeInputArrayAdvanced($request_post_data); $policy_type_id = $sanitized_post_data['policy_type_id']; $client_branch_id = $sanitized_post_data['client_branch_id']; @@ -1986,8 +1993,8 @@ class ClientController extends AdminController list($insurerBranchId, $insurerId) = explode('-', $insurerValue); - $data['insurer_branch_id'] = $insurerBranchId; - $data['insurer_id'] = $insurerId; + $sanitized_post_data['insurer_branch_id'] = $insurerBranchId; + $sanitized_post_data['insurer_id'] = $insurerId; $tpaValue = (string) $sanitized_post_data['tpa']; @@ -1999,72 +2006,63 @@ class ClientController extends AdminController } - $insert_data['client_id'] = $client_id; - $insert_data['tpa_branch_id'] = $tpaBranchId; - $insert_data['tpa_id'] = $tpaId; - $insert_data['policy_type_id'] = $sanitized_post_data['policy_type_id']; + $sanitized_post_data['client_id'] = $client_id; + $sanitized_post_data['tpa_branch_id'] = $tpaBranchId; + $sanitized_post_data['tpa_id'] = $tpaId; + $sanitized_post_data['policy_type_id'] = $sanitized_post_data['policy_type_id']; - $insert_data['no_of_lives'] = $sanitized_post_data['no_of_lives']; - $insert_data['policy_status'] = $sanitized_post_data['policy_status']; - $insert_data['no_of_employees'] = $sanitized_post_data['no_of_employees']; - $insert_data['earned_premium_date'] = change_date_format($sanitized_post_data['earned_premium_date'], 'd-m-Y', 'Y-m-d') ?? null; - $insert_data['claims_incurred_date'] = change_date_format($sanitized_post_data['claims_incurred_date'], 'd-m-Y', 'Y-m-d') ?? null; - $insert_data['incurred_claims_ratio'] = $sanitized_post_data['incurred_claims_ratio']; - $insert_data['no_lives_at_inception'] = $sanitized_post_data['no_lives_at_inception']; - $insert_data['premium_paid_at_inception'] = $sanitized_post_data['premium_paid_at_inception']; - $insert_data['claims_experience_for_last_3_years'] = $sanitized_post_data['claims_experience_for_last_3_years']; - $insert_data['earned_premium_amount'] = $sanitized_post_data['earned_premium_amount']; - $insert_data['claims_incurred_amount'] = $sanitized_post_data['claims_incurred_amount']; - $insert_data['base_policy'] = ($sanitized_post_data['base_policy'] === '' || $sanitized_post_data['base_policy'] == 0) ? null : $sanitized_post_data['base_policy']; - $insert_data['policy_status'] = 1; - $insert_data['inception_type'] = $sanitized_post_data['inception_type'] ? 2 : 1; - $insert_data['client_branch_id'] = $sanitized_post_data['client_branch_id']; - $insert_data['cd_ac_pk'] = $sanitized_post_data['cd_ac_no']; - $insert_data['gst'] = $sanitized_post_data['gst']; - $insert_data['disclaimer'] = $sanitized_post_data['disclaimer']; - $insert_data['is_member_modify_allowed'] = $sanitized_post_data['is_member_modify_allowed'] ? 1 : 0; - $insert_data['enrolment_visibility'] = $sanitized_post_data['enrolment_visibility'] ? 1 : 0; - $insert_data['is_lgbtq'] = $sanitized_post_data['is_lgbtq'] ? 1 : 0; - $insert_data['wellness_plan_id'] = $sanitized_post_data['wellness_plan_id']; - $insert_data['wellness_vendor_id'] = $sanitized_post_data['wellness_vendor_id']; - $insert_data['wellness_vendor_id'] = !empty($insert_data['wellness_vendor_id']) ? $insert_data['wellness_vendor_id'] : null; + + $sanitized_post_data['earned_premium_date'] = change_date_format($sanitized_post_data['earned_premium_date'], 'd-m-Y', 'Y-m-d') ?? null; + $sanitized_post_data['claims_incurred_date'] = change_date_format($sanitized_post_data['claims_incurred_date'], 'd-m-Y', 'Y-m-d') ?? null; + + $sanitized_post_dataa['base_policy'] = ($sanitized_post_data['base_policy'] === '' || $sanitized_post_data['base_policy'] == 0) ? null : $sanitized_post_data['base_policy']; + $sanitized_post_data['policy_status'] = 1; + $sanitized_post_data['inception_type'] = $sanitized_post_data['inception_type'] ? 2 : 1; + + + + + $sanitized_post_data['is_member_modify_allowed'] = $sanitized_post_data['is_member_modify_allowed'] ? 1 : 0; + $sanitized_post_data['enrolment_visibility'] = $sanitized_post_data['enrolment_visibility'] ? 1 : 0; + $sanitized_post_data['is_lgbtq'] = $sanitized_post_data['is_lgbtq'] ? 1 : 0; + $sanitized_post_data['wellness_vendor_id'] = !empty($sanitized_post_data['wellness_vendor_id']) ? $sanitized_post_data['wellness_vendor_id'] : null; if ($policy_type_id == 1 || $policy_type_id == 2 || $policy_type_id == 6 || $policy_type_id == 7) { - $insert_data['is_addon'] = 1; // Base Policy + $sanitized_post_data['is_addon'] = 1; // Base Policy } else if ($policy_type_id == 4 || $policy_type_id == 5) { - $insert_data['is_addon'] = 2; // SI TOPUP + $sanitized_post_data['is_addon'] = 2; // SI TOPUP } else if ($policy_type_id == 3) { if ($base_policy) { - $insert_data['is_addon'] = 3; // Dependent Addon + $sanitized_post_data['is_addon'] = 3; // Dependent Addon } else { - $insert_data['is_addon'] = 1; + $sanitized_post_data['is_addon'] = 1; } } - $insert_data['policy_start_date'] = change_date_format($sanitized_post_data['policy_start_date'], 'd-m-Y', 'Y-m-d'); - $insert_data['policy_end_date'] = change_date_format($sanitized_post_data['policy_end_date'], 'd-m-Y', 'Y-m-d'); - $insert_data['policy_no'] = $sanitized_post_data['policy_no']; - if ($insert_data['inception_type'] == 2) { - $insert_data['open_date'] = change_date_format($sanitized_post_data['open_date'], 'd-m-Y', 'Y-m-d'); - $insert_data['close_date'] = change_date_format($sanitized_post_data['close_date'], 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['policy_start_date'] = change_date_format($sanitized_post_data['policy_start_date'], 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['policy_end_date'] = change_date_format($sanitized_post_data['policy_end_date'], 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['policy_no'] = $sanitized_post_data['policy_no']; + if ($sanitized_post_data['inception_type'] == 2) { + $sanitized_post_data['open_date'] = change_date_format($sanitized_post_data['open_date'], 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['close_date'] = change_date_format($sanitized_post_data['close_date'], 'd-m-Y', 'Y-m-d'); // $data['reminder_date'] = change_date_format($this->request->getPost('reminder_date'), 'd-m-Y', 'Y-m-d'); - $insert_data['reminder_date'] = $sanitized_post_data['reminder_date']; + $sanitized_post_data['reminder_date'] = $sanitized_post_data['reminder_date']; } else { - $insert_data['open_date'] = null; - $insert_data['closedate'] = null; - $insert_data['reminder_date'] = null; + $sanitized_post_data['open_date'] = null; + $sanitized_post_data['closedate'] = null; + $sanitized_post_data['reminder_date'] = null; } - $insert_data['created_by'] = get_session_userid(); + $sanitized_post_data['created_by'] = get_session_userid(); - $insert = $this->clientPolicyModel->insert($insert_data); + $insert = $this->clientPolicyModel->insert($sanitized_post_data); if ($insert) { $clientPoliceData = $this->clientPolicyModel->getClientPolicyByClientId($sanitized_post_data['client_id']); $clientPoliceData['role'] = get_role_id(); @@ -2090,8 +2088,8 @@ class ClientController extends AdminController $insurerValue = (string) $sanitized_post_data['insurer']; list($insurerBranchId, $insurerId) = explode('-', $insurerValue); - $data['insurer_branch_id'] = $insurerBranchId; - $data['insurer_id'] = $insurerId; + $sanitized_post_data['insurer_branch_id'] = $insurerBranchId; + $sanitized_post_data['insurer_id'] = $insurerId; $tpaValue = (string) $sanitized_post_data['tpa']; if (!empty($tpaValue) || $tpaValue !== '') { @@ -2101,73 +2099,73 @@ class ClientController extends AdminController $tpaId = null; } - $update_data['tpa_branch_id'] = $tpaBranchId; - $update_data['client_id'] = $client_id; - $update_data['tpa_id'] = $tpaId; - $update_data['policy_type_id'] = $sanitized_post_data['policy_type_id']; - $update_data['policy_no'] = $sanitized_post_data['policy_no']; + $sanitized_post_data['tpa_branch_id'] = $tpaBranchId; + $sanitized_post_data['client_id'] = $client_id; + $sanitized_post_data['tpa_id'] = $tpaId; + $sanitized_post_data['policy_type_id'] = $sanitized_post_data['policy_type_id']; + $sanitized_post_data['policy_no'] = $sanitized_post_data['policy_no']; - $update_data['insured'] = $sanitized_post_data['insured']; - $update_data['no_of_lives'] = $sanitized_post_data['no_of_lives']; - $update_data['policy_status'] = $sanitized_post_data['policy_status']; - $update_data['no_of_employees'] = $sanitized_post_data['no_of_employees']; - $update_data['earned_premium_date'] = change_date_format($sanitized_post_data['earned_premium_date'], 'd-m-Y', 'Y-m-d') ?? null; - $update_data['claims_incurred_date'] = change_date_format($sanitized_post_data['claims_incurred_date'], 'd-m-Y', 'Y-m-d') ?? null; - $update_data['incurred_claims_ratio'] = $sanitized_post_data['incurred_claims_ratio']; - $update_data['no_lives_at_inception'] = $sanitized_post_data['no_lives_at_inception']; - $update_data['premium_paid_at_inception'] = $sanitized_post_data['premium_paid_at_inception']; - $update_data['claims_experience_for_last_3_years'] = $sanitized_post_data['claims_experience_for_last_3_years']; - $update_data['earned_premium_amount'] = $sanitized_post_data['earned_premium_amount']; - $update_data['claims_incurred_amount'] = $sanitized_post_data['claims_incurred_amount']; - $update_data['base_policy'] = ($sanitized_post_data['base_policy'] === '' || $sanitized_post_data['base_policy'] == 0) ? null : $sanitized_post_data['base_policy']; - $update_data['policy_status'] = 1; - $update_data['inception_type'] = $sanitized_post_data['inception_type'] ? 2 : 1; - $update_data['enrolment_visibility'] = $sanitized_post_data['enrolment_visibility'] ? 1 : 0; - $update_data['client_branch_id'] = $sanitized_post_data['client_branch_id']; - $update_data['cd_ac_pk'] = $sanitized_post_data['cd_ac_no']; - $update_data['gst'] = $sanitized_post_data['gst']; - $update_data['disclaimer'] = $sanitized_post_data['disclaimer']; - $update_data['policy_start_date'] = change_date_format($sanitized_post_data['policy_start_date'], 'd-m-Y', 'Y-m-d'); - $update_data['policy_end_date'] = change_date_format($sanitized_post_data['policy_end_date'], 'd-m-Y', 'Y-m-d'); - $update_data['is_member_modify_allowed'] = $sanitized_post_data['is_member_modify_allowed'] ? 1 : 0; - $update_data['is_lgbtq'] = $sanitized_post_data['is_lgbtq'] ? 1 : 0; - $update_data['wellness_plan_id'] = $sanitized_post_data['wellness_plan_id']; - $update_data['wellness_vendor_id'] = $sanitized_post_data['wellness_vendor_id']; - $update_data['wellness_vendor_id'] = !empty($update_data['wellness_vendor_id']) ? $update_data['wellness_vendor_id'] : null; + // $sanitized_post_data['insured'] = $sanitized_post_data['insured']; + $sanitized_post_data['no_of_lives'] = $sanitized_post_data['no_of_lives']; + $sanitized_post_data['policy_status'] = $sanitized_post_data['policy_status']; + $sanitized_post_data['no_of_employees'] = $sanitized_post_data['no_of_employees']; + $sanitized_post_data['earned_premium_date'] = change_date_format($sanitized_post_data['earned_premium_date'], 'd-m-Y', 'Y-m-d') ?? null; + $sanitized_post_data['claims_incurred_date'] = change_date_format($sanitized_post_data['claims_incurred_date'], 'd-m-Y', 'Y-m-d') ?? null; + $sanitized_post_data['incurred_claims_ratio'] = $sanitized_post_data['incurred_claims_ratio']; + $sanitized_post_data['no_lives_at_inception'] = $sanitized_post_data['no_lives_at_inception']; + $sanitized_post_data['premium_paid_at_inception'] = $sanitized_post_data['premium_paid_at_inception']; + $sanitized_post_data['claims_experience_for_last_3_years'] = $sanitized_post_data['claims_experience_for_last_3_years']; + $sanitized_post_data['earned_premium_amount'] = $sanitized_post_data['earned_premium_amount']; + $sanitized_post_data['claims_incurred_amount'] = $sanitized_post_data['claims_incurred_amount']; + $sanitized_post_data['base_policy'] = ($sanitized_post_data['base_policy'] === '' || $sanitized_post_data['base_policy'] == 0) ? null : $sanitized_post_data['base_policy']; + $sanitized_post_data['policy_status'] = 1; + $sanitized_post_data['inception_type'] = $sanitized_post_data['inception_type'] ? 2 : 1; + $sanitized_post_data['enrolment_visibility'] = $sanitized_post_data['enrolment_visibility'] ? 1 : 0; + $sanitized_post_data['client_branch_id'] = $sanitized_post_data['client_branch_id']; + $sanitized_post_data['cd_ac_pk'] = $sanitized_post_data['cd_ac_no']; + $sanitized_post_data['gst'] = $sanitized_post_data['gst']; + $sanitized_post_data['disclaimer'] = $sanitized_post_data['disclaimer']; + $sanitized_post_data['policy_start_date'] = change_date_format($sanitized_post_data['policy_start_date'], 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['policy_end_date'] = change_date_format($sanitized_post_data['policy_end_date'], 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['is_member_modify_allowed'] = $sanitized_post_data['is_member_modify_allowed'] ? 1 : 0; + $sanitized_post_data['is_lgbtq'] = $sanitized_post_data['is_lgbtq'] ? 1 : 0; + $sanitized_post_data['wellness_plan_id'] = $sanitized_post_data['wellness_plan_id']; + $sanitized_post_data['wellness_vendor_id'] = $sanitized_post_data['wellness_vendor_id']; + $sanitized_post_data['wellness_vendor_id'] = !empty($sanitized_post_data['wellness_vendor_id']) ? $sanitized_post_data['wellness_vendor_id'] : null; - if ($update_data['inception_type'] == 2) { - $update_data['open_date'] = change_date_format($sanitized_post_data['open_date'], 'd-m-Y', 'Y-m-d'); - $update_data['close_date'] = change_date_format($sanitized_post_data['close_date'], 'd-m-Y', 'Y-m-d'); - // $data['reminder_date'] = change_date_format($sanitized_post_data['reminder_date'), 'd-m-Y', 'Y-m-d'); - $update_data['reminder_date'] = $sanitized_post_data['reminder_date']; + if ($sanitized_post_data['inception_type'] == 2) { + $sanitized_post_data['open_date'] = change_date_format($sanitized_post_data['open_date'], 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['close_date'] = change_date_format($sanitized_post_data['close_date'], 'd-m-Y', 'Y-m-d'); + // $sanitized_post_data['reminder_date'] = change_date_format($sanitized_post_data['reminder_date'), 'd-m-Y', 'Y-m-d'); + $sanitized_post_data['reminder_date'] = $sanitized_post_data['reminder_date']; } else { - $update_data['open_date'] = null; - $update_data['close_date'] = null; - $update_data['reminder_date'] = null; + $sanitized_post_data['open_date'] = null; + $sanitized_post_data['close_date'] = null; + $sanitized_post_data['reminder_date'] = null; } if ($policy_type_id == 1 || $policy_type_id == 2 || $policy_type_id == 6 || $policy_type_id == 7) { - $update_data['is_addon'] = 1; // Base Policy + $sanitized_post_data['is_addon'] = 1; // Base Policy } else if ($policy_type_id == 4 || $policy_type_id == 5) { - $update_data['is_addon'] = 2; // SI TOPUP + $sanitized_post_data['is_addon'] = 2; // SI TOPUP } else if ($policy_type_id == 3) { if ($base_policy) { - $update_data['is_addon'] = 3; // Dependent Addon + $sanitized_post_data['is_addon'] = 3; // Dependent Addon } else { - $update_data['is_addon'] = 1; + $sanitized_post_data['is_addon'] = 1; } } $policy_terms = $this->clientPolicyModel->where('id', $sanitized_post_data['base_policy'])->first(); $old_client_policy_data = $this->clientPolicyModel->where('is_active', 1)->where('id', $id)->first(); - $update_data['updated_by'] = get_session_userid(); - $update = $this->clientPolicyModel->update($id, $update_data); + $sanitized_post_data['updated_by'] = get_session_userid(); + $update = $this->clientPolicyModel->update($id, $sanitized_post_data); if ($update) { diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 41eef6df..45650b81 100755 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -1108,7 +1108,39 @@ class EmployeeController extends AdminController try { - $filePath = WRITEPATH . '/uploads/excel/' . $file_name['file_name']; + if (!$file_name) { + return $this->respond([ + 'dataStatus' => false, + 'code' => 200, + 'data' => '
No Data Found
', + 'file_data' => null + ], 200); + } + + $filePath = WRITEPATH . 'uploads/excel/' . $file_name['file_name']; + + // βœ… File not exists on disk + if (!file_exists($filePath)) { + return $this->respond([ + 'dataStatus' => false, + 'code' => 200, + 'data' => '
No Data Found
', + 'file_data' => $file_name + ], 200); + } + + + $excel_data = $empDataServiceController->readExcelFileToArray($filePath); + + // βœ… Excel empty or header only + if (empty($excel_data) || count($excel_data) <= 1) { + return $this->respond([ + 'dataStatus' => false, + 'code' => 200, + 'data' => '
No Data Found
', + 'file_data' => $file_name + ], 200); + } if (file_exists($filePath)) { @@ -1144,8 +1176,7 @@ class EmployeeController extends AdminController $errorMessage = 'Error occurred:' . PHP_EOL . json_encode($errorData, JSON_PRETTY_PRINT); $this->myLogger->logme('error', $errorMessage); - $html = '
No Data Found
'; - return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => $html, 'file_data' => $file_name], 500); + return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => '
Something went wrong
', 'file_data' => $file_name ?? null], 500); } } diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index d2c411b1..fa58834a 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -1665,10 +1665,10 @@ class EmployeeRestController extends AdminController { try { - $client = $this->clientModel->where('id', $this->request->getGet('client_id'))->first(); + $client = $this->clientModel->where('md5(id)', $this->request->getGet('client_id'))->first(); if (!empty($client)) { $client['client_logo'] = base_url() . 'public/uploads/logo/' . $client['client_logo']; - $clientPolicy = $this->clientPolicyModel->where('client_id', $this->request->getGet('client_id')) + $clientPolicy = $this->clientPolicyModel->where('md5(client_id)', $this->request->getGet('client_id')) ->where('client_branch_id', $this->request->getGet('client_branch_id'))->findAll(); return $this->respond(['status' => 'success', 'code' => 200, 'data' => ['client' => $client, 'client_policy' => $clientPolicy]], 200); } else { @@ -2307,7 +2307,7 @@ class EmployeeRestController extends AdminController $ClientPolicyData = $this->clientPolicyModel->select('client_policy.id as client_policy_id , client_policy.client_id as client_id, client_policy.policy_type_id as policy_type_id, client_policy.is_addon as is_addon , client_policy.open_for_enrollment as OpenForEnrollment , client_policy.inception_type as inception_type, client_policy.policy_no as policy_no, client_policy.insurer_id as insurer_id, DATE_FORMAT(client_policy.policy_end_date, "%d-%m-%Y") AS policy_expiry_date ') - ->where('client_policy.client_id', $this->request->getGet('client_id')) + ->where('md5(client_policy.client_id)', $this->request->getGet('client_id')) ->where('client_policy.client_branch_id', $this->request->getGet('client_branch_id')) ->where('client_policy.is_active', 1) ->where('client_policy.policy_status', $this->request->getGet('policy_status')) @@ -2329,7 +2329,7 @@ class EmployeeRestController extends AdminController // dd($employeeDetails); $activeCount = 0; $inactiveCount = 0; - if (count($employeeDetails)) { + if (count($employeeDetails)) { foreach ($employeeDetails as $item) { if ($item['emp_status'] === 'active') { $activeCount++; @@ -2555,7 +2555,7 @@ class EmployeeRestController extends AdminController $builder->where('tm.is_active', 1); if ($client_id > 0) { - $builder->where('tm.client_id', $client_id); + $builder->where('md5(tm.client_id)', $client_id); } if (!empty($from_date) && !empty($to_date)) { @@ -4468,7 +4468,21 @@ class EmployeeRestController extends AdminController return $this->respondCreated(['status' => false, 'message' => 'Client is required', 'data' => []]); } - $client_data = $this->clientModel->where('id', $post_data['client_id'])->first(); + // Handle raw client_id vs MD5 + if (is_string($post_data['client_id']) && preg_match('/^[a-f0-9]{32}$/i', $post_data['client_id'])) { + $client_data = $this->clientModel->where('MD5(id)', $post_data['client_id'])->first(); + } else { + $client_data = $this->clientModel->where('id', $post_data['client_id'])->first(); + } + + if(empty($client_data)){ + return $this->respondCreated(['status' => false, 'message' => 'Invalid Client Id', 'data' => []]); + } + + $post_data['client_id'] = $client_data['id']; + + + // print_r($client_data); die; if($client_data['hr_file_processed_by'] == 1){ diff --git a/app/Controllers/MasterController.php b/app/Controllers/MasterController.php index e645daf2..c5f27862 100755 --- a/app/Controllers/MasterController.php +++ b/app/Controllers/MasterController.php @@ -320,15 +320,16 @@ class MasterController extends AdminController $uploadFilePath = ROOTPATH . 'public/uploads/logo/'; $file_name = file_Upload($this->request->getFile('insurer_logo'), $uploadFilePath); $data = $this->request->getPost(); + print_r($data);die; $sanitized_post_data = sanitizeInputArrayAdvanced($data); - $insert_data['addition_add_day'] = (!empty($sanitized_post_data['addition_add_day'])) ? 1 : 0; - $insert_data['deletion_add_day'] = (!empty($sanitized_post_data['deletion_add_day'])) ? 1 : 0; - $insert_data['is_multi_event'] = (!empty($sanitized_post_data['is_multi_event'])) ? 1 : 0; - $insert_data['created_by'] = get_session_userid(); - $insert_data['insurer_logo'] = $file_name; + $sanitized_post_data['addition_add_day'] = (!empty($sanitized_post_data['addition_add_day'])) ? 1 : 0; + $sanitized_post_data['deletion_add_day'] = (!empty($sanitized_post_data['deletion_add_day'])) ? 1 : 0; + $sanitized_post_data['is_multi_event'] = (!empty($sanitized_post_data['is_multi_event'])) ? 1 : 0; + $sanitized_post_data['created_by'] = get_session_userid(); + $sanitized_post_data['insurer_logo'] = $file_name; - $insert = $this->insurerModel->insert($insert_data); + $insert = $this->insurerModel->insert($sanitized_post_data); if($insert){ $insurer_data = $this->insurerModel->where(['id' => $insert, 'is_active' => 1])->first(); @@ -537,19 +538,19 @@ class MasterController extends AdminController $sanitized_post_data = sanitizeInputArrayAdvanced($data); $id = $sanitized_post_data['PrimaryKey']; - $update_data['addition_add_day'] = (!empty($sanitized_post_data['addition_add_day'])) ? 1 : 0; - $update_data['deletion_add_day'] = (!empty($sanitized_post_data['deletion_add_day'])) ? 1 : 0; - $update_data['is_multi_event'] = (!empty($sanitized_post_data['is_multi_event'])) ? 1 : 0; - $update_data['updated_by'] = get_session_userid(); + $sanitized_post_data['addition_add_day'] = (!empty($sanitized_post_data['addition_add_day'])) ? 1 : 0; + $sanitized_post_data['deletion_add_day'] = (!empty($sanitized_post_data['deletion_add_day'])) ? 1 : 0; + $sanitized_post_data['is_multi_event'] = (!empty($sanitized_post_data['is_multi_event'])) ? 1 : 0; + $sanitized_post_data['updated_by'] = get_session_userid(); if(!empty($file_name)){ - $update_data['insurer_logo'] = $file_name; + $sanitized_post_data['insurer_logo'] = $file_name; } - $update = $this->insurerModel->update($id,$update_data); + $update = $this->insurerModel->update($id,$sanitized_post_data); if($update){ - echo json_encode(array("status" => true , 'data' => $data)); + echo json_encode(array("status" => true , 'data' => $sanitized_post_data)); }else{ echo json_encode(array("status" => false)); } @@ -922,13 +923,13 @@ class MasterController extends AdminController $eCardTemplate = $sanitized_post_data['ecard_content']; - $insert_data['created_by'] = get_session_userid(); - $insert_data['tpa_logo'] = $file_name; - $insert_data['front_card'] = $front_card_file_name; - $insert_data['back_card'] = $back_card_file_name; - $insert_data['network_hospitals'] = $sanitized_post_data['network_hospitals']; + $sanitized_post_data['created_by'] = get_session_userid(); + $sanitized_post_data['tpa_logo'] = $file_name; + $sanitized_post_data['front_card'] = $front_card_file_name; + $sanitized_post_data['back_card'] = $back_card_file_name; + $inssanitized_post_dataert_data['network_hospitals'] = $sanitized_post_data['network_hospitals']; - $insert = $this->tpaModel->insert($insert_data); + $insert = $this->tpaModel->insert($sanitized_post_data); $tpa_name = (string) $sanitized_post_data['name']; $short_name = (string) $sanitized_post_data['short_name']; @@ -1211,22 +1212,22 @@ class MasterController extends AdminController $id = $sanitized_post_data['PrimaryKey']; - $update_data['updated_by'] = get_session_userid(); + $sanitized_post_data['updated_by'] = get_session_userid(); if(!empty($file_name)){ - $update_data['tpa_logo'] = $file_name; + $sanitized_post_data['tpa_logo'] = $file_name; } if(!empty($front_card_file_name)){ - $update_data['front_card'] = $front_card_file_name; + $sanitized_post_data['front_card'] = $front_card_file_name; } if(!empty($back_card_file_name)){ - $update_data['back_card'] = $back_card_file_name; + $sanitized_post_data['back_card'] = $back_card_file_name; } - $update_data['network_hospitals'] = $sanitized_post_data['network_hospitals']; - $update = $this->tpaModel->update($id,$update_data); + $sanitized_post_data['network_hospitals'] = $sanitized_post_data['network_hospitals']; + $update = $this->tpaModel->update($id,$sanitized_post_data); $tpa_name = (string) $sanitized_post_data['name']; @@ -1258,7 +1259,7 @@ class MasterController extends AdminController if($update){ - echo json_encode(array("status" => true , 'data' => $update_data)); + echo json_encode(array("status" => true , 'data' => $sanitized_post_data)); }else{ echo json_encode(array("status" => false)); } @@ -2196,10 +2197,10 @@ class MasterController extends AdminController // CD Account Details // ====================== 'opening_date' => [ - 'rules' => 'required|valid_date[Y-m-d]', + 'rules' => 'required|valid_date[d-m-Y]', 'errors' => [ 'required' => 'Opening date is required', - 'valid_date' => 'Opening date must be in YYYY-MM-DD format' + 'valid_date' => 'Opening date must be in DD-MM-YYYY format' ] ], @@ -2377,10 +2378,10 @@ class MasterController extends AdminController // CD Account Details // ====================== 'opening_date' => [ - 'rules' => 'required|valid_date[Y-m-d]', + 'rules' => 'required|valid_date[d-m-Y]', 'errors' => [ 'required' => 'Opening date is required', - 'valid_date' => 'Opening date must be in YYYY-MM-DD format' + 'valid_date' => 'Opening date must be in DD-MM-YYYY format' ] ], diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 9bfb87f9..b2d54fbb 100755 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -759,6 +759,8 @@ class RestAuthenticationController extends AdminController $decoded = json_decode($HRAccessData['allowed_modules'], true); $getAllhrData[$key]['allowed_modules'] = $decoded; + $HRAccessData['pre_client_id'] = md5($HRAccessData['pre_client_id']); + $HRAccessData['post_client_id'] = md5($HRAccessData['post_client_id']); $token = JWTToken::encode($HRAccessData); $getAllhrData[$key]['token'] = $token; diff --git a/app/Filters/AuthMVC.php b/app/Filters/AuthMVC.php index 298a72b9..ef2da046 100755 --- a/app/Filters/AuthMVC.php +++ b/app/Filters/AuthMVC.php @@ -23,11 +23,11 @@ class AuthMVC implements FilterInterface // } // Fingerprint validation - // $fp = generateFingerprint(); - // // log_message('error',$fp); - // if (session()->get('fingerprint') !== $fp) { - // return AuthLogout::logout(); - // } + $fp = generateFingerprint(); + // log_message('error',$fp); + if (session()->get('fingerprint') !== $fp) { + return AuthLogout::logout(); + } } diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php index 204324c5..fa7672ec 100755 --- a/app/Models/ClientPolicyModel.php +++ b/app/Models/ClientPolicyModel.php @@ -193,9 +193,14 @@ class ClientPolicyModel extends Model ->join('clients', 'clients.id = client_policy.client_id') ->join('insurers', 'insurers.id = client_policy.insurer_id') ->join('insurer_branch', 'client_policy.insurer_branch_id = insurer_branch.id', 'left') - ->join('cd_master', 'cd_master.insurer_id = insurers.id AND cd_master.client_id = client_policy.client_id') - ->where('client_policy.client_id', $id) - ->where('cd_master.id = client_policy.cd_ac_pk') + ->join('cd_master', 'cd_master.insurer_id = insurers.id AND cd_master.client_id = client_policy.client_id'); + // ->where('client_policy.client_id', $id) + if (is_string($id) && preg_match('/^[a-f0-9]{32}$/i', $id)) { + $builder->where('MD5(client_policy.client_id)', $id); + } else { + $builder->where('client_policy.client_id', $id); + } + $builder->where('cd_master.id = client_policy.cd_ac_pk') ->where('cd_master.is_active', 1) ->groupBy('client_policy.client_id') ->groupBy('client_policy.insurer_id') @@ -258,14 +263,33 @@ class ClientPolicyModel extends Model } - public function getClientById($id) + // public function getClientById($id) + // { + // $query = $this->db->table('clients')->getWhere(['id' => $id]); + // // Debug statement + // return $query->getRow(); + // } + + public function getClientById($client_id) { - $query = $this->db->table('clients')->getWhere(['id' => $id]); - // Debug statement - return $query->getRow(); + if (empty($client_id)) { + return null; + } + + $builder = $this->db->table('clients'); + + // MD5 vs normal ID check + if (is_string($client_id) && preg_match('/^[a-f0-9]{32}$/i', $client_id)) { + $builder->where('MD5(id)', $client_id); + } else { + $builder->where('id', $client_id); + } + + return $builder->get()->getRow(); } + public function getDepositData($clientId, $insurerId, $cd_ac_pk = null, $subTypeOptions = null) { @@ -295,9 +319,16 @@ class ClientPolicyModel extends Model ->join('client_policy', 'client_policy.id = cash_deposit.client_policy_id', 'left') ->join('cd_master', 'cd_master.id = cash_deposit.cd_ac_pk', 'left') // ->join('policies', 'policies.id = client_policy.policy_id', 'left') - ->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left') - ->where('cash_deposit.client_id', $clientId) - ->where('cash_deposit.insurer_id', $insurerId) + ->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left'); + // ->where('cash_deposit.client_id', $clientId) + if (!empty($clientId)) { + if (is_string($clientId) && preg_match('/^[a-f0-9]{32}$/i', $clientId)) { + $query->where('MD5(cash_deposit.client_id)', $clientId); + } else { + $query->where('cash_deposit.client_id', $clientId); + } + } + $query->where('cash_deposit.insurer_id', $insurerId) ->where('cash_deposit.is_active', 1) ->where('cd_master.is_active', 1); // ->where('cash_deposit.cd_ac_pk = cd_master.id') @@ -310,12 +341,56 @@ class ClientPolicyModel extends Model } + // public function getDepositSummary($clientId, $insurerId, $cd_ac_pk) + // { + + // $subQuery = $this->db->table('cash_deposit') + // ->select('balance') + // ->where('client_id', $clientId) + // ->where('insurer_id', $insurerId) + // ->where('cd_ac_pk', $cd_ac_pk) + // ->where('is_active', 1) + // ->orderBy('id', 'DESC') + // ->limit(1) + // ->getCompiledSelect(); + + // // Fetch the sum of credit and debit transactions and calculate the balance + // $data = $this->db->table('cash_deposit') + // ->select("($subQuery) AS balance", false) + // ->select('SUM(CASE WHEN transaction_type = "Credit" THEN amount ELSE 0 END) AS total_credit') + // ->select('SUM(CASE WHEN transaction_type = "Debit" THEN amount ELSE 0 END) AS total_withdraw') + // // ->select('SUM(CASE WHEN transaction_type = "Credit" THEN amount ELSE -amount END) AS balance') + // ->select('SUM(CASE WHEN sub_type = 3 THEN amount ELSE 0 END) AS total_refund') + // ->where('client_id', $clientId) + // ->where('insurer_id', $insurerId) + // ->where('cd_ac_pk', $cd_ac_pk) + // ->where('cash_deposit.is_active', 1) + // ->get() + // ->getRow(); + + // // dd($this->db->getLastQuery()); + // return $data; + // } + public function getDepositSummary($clientId, $insurerId, $cd_ac_pk) { + if (empty($clientId)) { + return null; + } + // Build SAFE client condition (NO BINDS!) + if (is_string($clientId) && preg_match('/^[a-f0-9]{32}$/i', $clientId)) { + $clientCondition = 'MD5(client_id) = ' . $this->db->escape($clientId); + } else { + $clientCondition = 'client_id = ' . $this->db->escape($clientId); + } + + /* ------------------------------------------------- + Subquery: latest balance + ------------------------------------------------- */ $subQuery = $this->db->table('cash_deposit') ->select('balance') - ->where('client_id', $clientId) + ->where($clientCondition, null, false) ->where('insurer_id', $insurerId) ->where('cd_ac_pk', $cd_ac_pk) ->where('is_active', 1) @@ -323,14 +398,15 @@ class ClientPolicyModel extends Model ->limit(1) ->getCompiledSelect(); - // Fetch the sum of credit and debit transactions and calculate the balance + /* ------------------------------------------------- + Main query: totals + ------------------------------------------------- */ $data = $this->db->table('cash_deposit') ->select("($subQuery) AS balance", false) ->select('SUM(CASE WHEN transaction_type = "Credit" THEN amount ELSE 0 END) AS total_credit') ->select('SUM(CASE WHEN transaction_type = "Debit" THEN amount ELSE 0 END) AS total_withdraw') - // ->select('SUM(CASE WHEN transaction_type = "Credit" THEN amount ELSE -amount END) AS balance') ->select('SUM(CASE WHEN sub_type = 3 THEN amount ELSE 0 END) AS total_refund') - ->where('client_id', $clientId) + ->where($clientCondition, null, false) ->where('insurer_id', $insurerId) ->where('cd_ac_pk', $cd_ac_pk) ->where('cash_deposit.is_active', 1) @@ -340,6 +416,8 @@ class ClientPolicyModel extends Model // dd($this->db->getLastQuery()); return $data; } + + // Inside your clientPolicyModel // Inside your clientPolicyModel // public function getDepositDataWithBalance($clientId, $insurerId) @@ -412,6 +490,35 @@ class ClientPolicyModel extends Model // ORDER BY cd.id DESC // "; + // $sql = " + // SELECT cd.insurer_id, cd.cd_ac_pk, cd.balance + // FROM cash_deposit cd + // JOIN cd_master cdm ON cdm.id = cd.cd_ac_pk + // JOIN ( + // SELECT MAX(id) AS max_id + // FROM cash_deposit + // WHERE is_active = 1 AND client_id = :id: + // GROUP BY insurer_id, cd_ac_pk + // ) latest ON latest.max_id = cd.id + // JOIN insurers on cd.insurer_id = insurers.id + // WHERE cd.is_active = 1 AND cd.client_id = :id: AND cdm.is_active = 1 + // ORDER BY cd.insurer_id; + // "; + + // $binds = ['id'=>(int)$id]; + // return $this->db->query($sql,$binds)->getResult(); + + $whereClient = 'cd.client_id = :id:'; + $subWhereClient = 'client_id = :id:'; + + $binds = ['id' => $id]; + + // πŸ” MD5 handling + if (is_string($id) && preg_match('/^[a-f0-9]{32}$/i', $id)) { + $whereClient = 'MD5(cd.client_id) = :id:'; + $subWhereClient = 'MD5(client_id) = :id:'; + } + $sql = " SELECT cd.insurer_id, cd.cd_ac_pk, cd.balance FROM cash_deposit cd @@ -419,16 +526,17 @@ class ClientPolicyModel extends Model JOIN ( SELECT MAX(id) AS max_id FROM cash_deposit - WHERE is_active = 1 AND client_id = :id: + WHERE is_active = 1 AND {$subWhereClient} GROUP BY insurer_id, cd_ac_pk ) latest ON latest.max_id = cd.id - JOIN insurers on cd.insurer_id = insurers.id - WHERE cd.is_active = 1 AND cd.client_id = :id: AND cdm.is_active = 1 - ORDER BY cd.insurer_id; + JOIN insurers ON cd.insurer_id = insurers.id + WHERE cd.is_active = 1 + AND {$whereClient} + AND cdm.is_active = 1 + ORDER BY cd.insurer_id "; - $binds = ['id'=>(int)$id]; - return $this->db->query($sql,$binds)->getResult(); + return $this->db->query($sql, $binds)->getResult(); } diff --git a/app/Models/EmployeePolicyModel.php b/app/Models/EmployeePolicyModel.php index 036f2c19..70f0485c 100755 --- a/app/Models/EmployeePolicyModel.php +++ b/app/Models/EmployeePolicyModel.php @@ -295,7 +295,10 @@ class EmployeePolicyModel extends Model ->orderBy('emp.emp_code', 'ASC') ->orderBy('employee_polices.employee_id', 'ASC'); // Conditionally add where clauses - if ($client_id != 0 && !empty($client_id)) { + if (is_string($client_id) && preg_match('/^[a-f0-9]{32}$/i', $client_id)) { + // MD5 hash β†’ compare using md5() + $result->where('md5(emp.client_id)', $client_id); + }else if ($client_id != 0 && !empty($client_id)) { $result->where('emp.client_id', $client_id); } if ($branch_id != 0 && !empty($branch_id)) { diff --git a/app/Models/InsurerModel.php b/app/Models/InsurerModel.php index dcb7fe8b..d264c231 100755 --- a/app/Models/InsurerModel.php +++ b/app/Models/InsurerModel.php @@ -37,27 +37,67 @@ class InsurerModel extends Model ->getResult(); } + // public function getInsurerName($insurerId, $client_id) + // { + // // Fetch the insurer name based on the insurer ID + // $query = $this->db->table('client_policy') + // ->select('insurers.id, insurers.name, cd_master.cd_ac_no as cd_master_account_no') + // ->join('insurers', 'insurers.id = client_policy.insurer_id') + // ->join('cd_master', 'cd_master.insurer_id = insurers.id AND cd_master.client_id = client_policy.client_id') + // ->where('client_policy.insurer_id', $insurerId) + // ->where('client_policy.client_id', $client_id) + // ->where('cd_master.id = client_policy.cd_ac_pk') + // ->where('cd_master.is_active', 1) + // ->get(); + + // if ($query->resultID->num_rows > 0) { + // $result = $query->getRow(); + // return $result; + // } + + // return null; // or handle accordingly if the insurer is not found + // } + public function getInsurerName($insurerId, $client_id) { - // Fetch the insurer name based on the insurer ID - $query = $this->db->table('client_policy') - ->select('insurers.id, insurers.name, cd_master.cd_ac_no as cd_master_account_no') - ->join('insurers', 'insurers.id = client_policy.insurer_id') - ->join('cd_master', 'cd_master.insurer_id = insurers.id AND cd_master.client_id = client_policy.client_id') - ->where('client_policy.insurer_id', $insurerId) - ->where('client_policy.client_id', $client_id) - ->where('cd_master.id = client_policy.cd_ac_pk') - ->where('cd_master.is_active', 1) - ->get(); + $builder = $this->db->table('client_policy') + ->select(' + insurers.id, + insurers.name, + cd_master.cd_ac_no AS cd_master_account_no + ') + ->join('insurers', 'insurers.id = client_policy.insurer_id') + ->join( + 'cd_master', + 'cd_master.insurer_id = insurers.id + AND cd_master.client_id = client_policy.client_id + AND cd_master.id = client_policy.cd_ac_pk + AND cd_master.is_active = 1' + ) + ->where('client_policy.insurer_id', $insurerId); - if ($query->resultID->num_rows > 0) { - $result = $query->getRow(); - return $result; + // Handle raw client_id vs MD5 + if (!empty($client_id)) { + if (is_string($client_id) && preg_match('/^[a-f0-9]{32}$/i', $client_id)) { + $builder->where('MD5(client_policy.client_id)', $client_id); + } else { + $builder->where('client_policy.client_id', $client_id); + } } - return null; // or handle accordingly if the insurer is not found + $result = $builder + ->groupBy([ + 'insurers.id', + 'cd_master.cd_ac_no' + ]) + ->limit(1) + ->get() + ->getRow(); + + return $result ?? null; } + public function getInsurerTemplateByInsurerID($insurer_id) { $insurer_data = $this->db->table('insurer_excel_export_template') diff --git a/app/Views/frontend_content_list.php b/app/Views/frontend_content_list.php index c88484f3..e2e62833 100644 --- a/app/Views/frontend_content_list.php +++ b/app/Views/frontend_content_list.php @@ -460,7 +460,7 @@ } }else{ toastr.error("Something went wrong!", 'Error'); - } + }} }); } @@ -478,8 +478,13 @@ function appendEditData(data) { $('#frontEndContentForm')[0].reset(); $('#fe_id').val(data.id); - $('#type').val(data.type); - $('#content_section').val(data.content_section); + if (/video/i.test(data.content_section)) { + $('#content_section').val('Video'); + $('#type').val(8); + } else { + $('#type').val(data.type); + $('#content_section').val(data.content_section); + } $('#heading').val(data.heading); // $('#content').val(data.content); // $('#notes').val(data.notes); @@ -533,6 +538,34 @@ return text.length === 0; } + // $('#content_section').on('keyup blur change', function () { + // let val = $(this).val(); + // if (/video/i.test(val)) { + // $(this).val('Video'); + // $('#type').val(8); + // } + // }); + + + $('#content_section').on('input blur', function () { + let $this = $(this); + let val = $this.val().trim(); + + // 1. Handle Empty Input + if (val === '') { + $('#type').val(''); + return; + } + + // 2. Check for "video" (case insensitive) + if (/video/i.test(val)) { + $('#type').val(8); + if (val !== 'Video') { $this.val('Video'); } + } else { + $('#type').val(''); + } + }); + + + + + - - - - + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + + + + + - - - + + + + - - - - + + + + + + + - - + + + + © NHANCE + + + + + + + + + + + + + +
+
+ +
+ + Notification +
+
+
    + +
+
+ + +
+ + TO DOs +
+
+
    + +
+
+
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 73c56916..b5bfd6fa 100755 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -50,17 +50,18 @@ /assets/css/jodit.css" rel="stylesheet" type="text/css" /> - - + + - - + + - - + + + + + - - @@ -83,7 +84,7 @@ - + diff --git a/app/Views/layout/header_old_outdated.php b/app/Views/layout/header_old_outdated.php new file mode 100644 index 00000000..73c56916 --- /dev/null +++ b/app/Views/layout/header_old_outdated.php @@ -0,0 +1,2191 @@ + + + + + + + <?= isset($tab_name) ? $tab_name : 'NHance'; ?> + + + + + + + + /assets/images/Nhance_Favi.svg"> + + + /assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.css" rel="stylesheet" type="text/css" /> + + + /assets/libs/datatables.net-bs4/css/dataTables.bootstrap4.min.css" rel="stylesheet" type="text/css" /> + /assets/libs/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" rel="stylesheet" type="text/css" /> + /assets/libs/datatables.net-buttons-bs4/css/buttons.bootstrap4.min.css" rel="stylesheet" type="text/css" /> + /assets/libs/datatables.net-select-bs4/css//select.bootstrap4.min.css" rel="stylesheet" type="text/css" /> + + + + /assets/css/bootstrap-creative.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" /> + /assets/css/app-creative.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" /> + + /assets/css/bootstrap-creative-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" /> + /assets/css/app-creative-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" /> + + + /assets/css/icons.min.css" rel="stylesheet" type="text/css" /> + + /assets/libs/bootstrap-datepicker/css/bootstrap-datepicker.min.css" rel="stylesheet" type="text/css" /> + /assets/libs/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css"> + /assets/libs/bootstrap-daterangepicker/daterangepicker.css" rel="stylesheet" type="text/css"> + + + + + + + + + + + /assets/css/jodit.css" rel="stylesheet" type="text/css" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ /assets/images/nhance-loader-fast.gif" height="40" width="40" alt="Loading..."> +
+
+ + + +
+ + + +
+ + +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + +
+
+ + +
\ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess index f82f3842..28a9d8df 100755 --- a/public/.htaccess +++ b/public/.htaccess @@ -5,27 +5,6 @@ Options -Indexes # Rewrite engine # ---------------------------------------------------------------------- -## ADDED for - block any script execution inside folder of public - - Deny from all - # Disable PHP engine - - php_flag engine off - - - # Disable CGI and other executable handlers - Options -ExecCGI - AddHandler cgi-script .php .pl .py .jsp .asp .sh .cgi - - # Block access to any script-like files entirely - - ForceType text/plain - #Order allow,deny - Deny from all - - - - # Turning on the rewrite engine is necessary for the following rules and features. # FollowSymLinks must be enabled for this to work. diff --git a/public/assets/.htaccess b/public/assets/.htaccess new file mode 100644 index 00000000..13e218d0 --- /dev/null +++ b/public/assets/.htaccess @@ -0,0 +1,25 @@ +# =============================== +# ABSOLUTE SCRIPT EXECUTION BLOCK +# =============================== + +# Disable CGI +Options -ExecCGI + +# Disable PHP for mod_php / LiteSpeed + + php_flag engine off + + + + php_flag engine off + + +# Block any script file access + + Require all denied + + +# Block double extensions + + Require all denied + diff --git a/public/assets/1.pdf b/public/assets/1.pdf new file mode 100644 index 00000000..dbc6ff1d Binary files /dev/null and b/public/assets/1.pdf differ diff --git a/public/assets/1.php b/public/assets/1.php new file mode 100644 index 00000000..45b4d3b0 --- /dev/null +++ b/public/assets/1.php @@ -0,0 +1,4 @@ + diff --git a/public/claim_sample_forms/.htaccess b/public/claim_sample_forms/.htaccess new file mode 100644 index 00000000..13e218d0 --- /dev/null +++ b/public/claim_sample_forms/.htaccess @@ -0,0 +1,25 @@ +# =============================== +# ABSOLUTE SCRIPT EXECUTION BLOCK +# =============================== + +# Disable CGI +Options -ExecCGI + +# Disable PHP for mod_php / LiteSpeed + + php_flag engine off + + + + php_flag engine off + + +# Block any script file access + + Require all denied + + +# Block double extensions + + Require all denied + diff --git a/public/e_card_imgs/.htaccess b/public/e_card_imgs/.htaccess new file mode 100644 index 00000000..13e218d0 --- /dev/null +++ b/public/e_card_imgs/.htaccess @@ -0,0 +1,25 @@ +# =============================== +# ABSOLUTE SCRIPT EXECUTION BLOCK +# =============================== + +# Disable CGI +Options -ExecCGI + +# Disable PHP for mod_php / LiteSpeed + + php_flag engine off + + + + php_flag engine off + + +# Block any script file access + + Require all denied + + +# Block double extensions + + Require all denied + diff --git a/public/sample_excel/.htaccess b/public/sample_excel/.htaccess new file mode 100644 index 00000000..13e218d0 --- /dev/null +++ b/public/sample_excel/.htaccess @@ -0,0 +1,25 @@ +# =============================== +# ABSOLUTE SCRIPT EXECUTION BLOCK +# =============================== + +# Disable CGI +Options -ExecCGI + +# Disable PHP for mod_php / LiteSpeed + + php_flag engine off + + + + php_flag engine off + + +# Block any script file access + + Require all denied + + +# Block double extensions + + Require all denied + diff --git a/public/sample_excel/1.pdf b/public/sample_excel/1.pdf new file mode 100644 index 00000000..dbc6ff1d Binary files /dev/null and b/public/sample_excel/1.pdf differ diff --git a/public/sample_excel/1.php b/public/sample_excel/1.php new file mode 100644 index 00000000..45b4d3b0 --- /dev/null +++ b/public/sample_excel/1.php @@ -0,0 +1,4 @@ + diff --git a/public/sample_import_excel/.htaccess b/public/sample_import_excel/.htaccess new file mode 100644 index 00000000..13e218d0 --- /dev/null +++ b/public/sample_import_excel/.htaccess @@ -0,0 +1,25 @@ +# =============================== +# ABSOLUTE SCRIPT EXECUTION BLOCK +# =============================== + +# Disable CGI +Options -ExecCGI + +# Disable PHP for mod_php / LiteSpeed + + php_flag engine off + + + + php_flag engine off + + +# Block any script file access + + Require all denied + + +# Block double extensions + + Require all denied + diff --git a/public/writable/.htaccess b/public/writable/.htaccess new file mode 100644 index 00000000..13e218d0 --- /dev/null +++ b/public/writable/.htaccess @@ -0,0 +1,25 @@ +# =============================== +# ABSOLUTE SCRIPT EXECUTION BLOCK +# =============================== + +# Disable CGI +Options -ExecCGI + +# Disable PHP for mod_php / LiteSpeed + + php_flag engine off + + + + php_flag engine off + + +# Block any script file access + + Require all denied + + +# Block double extensions + + Require all denied +