Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
bbd1e6aa05
@ -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) {
|
||||
|
||||
|
||||
@ -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' => '<div class="text-center">No Data Found</div>',
|
||||
'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' => '<div class="text-center">No Data Found</div>',
|
||||
'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' => '<div class="text-center">No Data Found</div>',
|
||||
'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 = '<div class="text-center">No Data Found</div>';
|
||||
return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => $html, 'file_data' => $file_name], 500);
|
||||
return $this->respond(['dataStatus' => false, 'code' => 500, 'data' => '<div class="text-center">Something went wrong</div>', 'file_data' => $file_name ?? null], 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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){
|
||||
|
||||
@ -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'
|
||||
]
|
||||
],
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -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')
|
||||
|
||||
@ -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('');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
@ -66,87 +66,69 @@
|
||||
|
||||
<!-- /Right-bar -->
|
||||
|
||||
<!-- Right bar overlay-->
|
||||
<!-- Right bar overlay -->
|
||||
<div class="rightbar-overlay"></div>
|
||||
|
||||
<!-- Vendor js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/vendor.min.js"></script>
|
||||
<!-- ============================= -->
|
||||
<!-- Core Vendor JS (Local) -->
|
||||
<!-- ============================= -->
|
||||
<script src="<?= base_url("public/assets/js/vendor.min.js"); ?>"></script>
|
||||
|
||||
<!-- KNOB JS -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/jquery-knob/jquery.knob.min.js"></script>
|
||||
<!-- Apex js-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/apexcharts/apexcharts.min.js"></script>
|
||||
<!-- ============================= -->
|
||||
<!-- Charts -->
|
||||
<!-- ============================= -->
|
||||
<script src="<?= base_url("public/assets/libs/apexcharts/apexcharts.min.js"); ?>"></script>
|
||||
|
||||
<!-- third party js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net/js/jquery.dataTables.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.html5.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.flash.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-buttons/js/buttons.print.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/datatables.net-select/js/dataTables.select.min.js"></script>
|
||||
<!-- <script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/pdfmake.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/pdfmake/build/vfs_fonts.js"></script> -->
|
||||
<!-- third party js ends -->
|
||||
<!-- ============================= -->
|
||||
<!-- DataTables -->
|
||||
<!-- ============================= -->
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net/js/jquery.dataTables.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-bs4/js/dataTables.bootstrap4.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-responsive/js/dataTables.responsive.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-buttons/js/dataTables.buttons.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-buttons/js/buttons.html5.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-buttons/js/buttons.print.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-keytable/js/dataTables.keyTable.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/datatables.net-select/js/dataTables.select.min.js"); ?>"></script>
|
||||
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/bootstrap-datepicker/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/moment/min/moment.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/bootstrap-daterangepicker/daterangepicker.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script>
|
||||
|
||||
<!-- ============================= -->
|
||||
<!-- Date Handling -->
|
||||
<!-- ============================= -->
|
||||
<script src="<?= base_url("public/assets/libs/moment/min/moment.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/libs/bootstrap-daterangepicker/daterangepicker.js"); ?>"></script>
|
||||
|
||||
<!-- Datatables init -->
|
||||
<!-- <script src="<?= base_url() . "public"; ?>/assets/js/pages/datatables.init.js"></script> -->
|
||||
|
||||
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/tickets.init.js"></script>
|
||||
|
||||
<!-- Plugins js-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/admin-resources/jquery.vectormap/jquery-jvectormap-1.2.2.min.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/admin-resources/jquery.vectormap/maps/jquery-jvectormap-us-merc-en.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/libs/parsleyjs/parsley.min.js"></script>
|
||||
|
||||
<!-- Dashboard init-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/dashboard-analytics.init.js"></script>
|
||||
|
||||
<!-- Validation init js-->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/form-validation.init.js"></script>
|
||||
|
||||
<!-- App js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/app.min.js"></script>
|
||||
|
||||
|
||||
<!-- Sweet Alert CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-multiselect@1.1.0/dist/js/bootstrap-multiselect.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.13/css/bootstrap-multiselect.css" />
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css" rel="stylesheet">
|
||||
|
||||
<!-- flatpicker datepicker -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/dist/flatpickr.min.css" rel="stylesheet">
|
||||
<!-- OR: Flatpickr (prefer this long-term) -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr@4.6.13/dist/flatpickr.min.js"></script>
|
||||
|
||||
<!-- bootstrap datepicker -->
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.10.0/js/bootstrap-datepicker.min.js"></script> -->
|
||||
<!-- ============================= -->
|
||||
<!-- Forms -->
|
||||
<!-- ============================= -->
|
||||
<script src="<?= base_url("public/assets/libs/parsleyjs/parsley.min.js"); ?>"></script>
|
||||
<script src="<?= base_url("public/assets/js/pages/form-validation.init.js"); ?>"></script>
|
||||
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/pages/jquery.xeditable.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/form-xeditable.init.js"></script>
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/bootstrap-editable.min.js"></script>
|
||||
<!-- ============================= -->
|
||||
<!-- Notifications -->
|
||||
<!-- ============================= -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/toastr.min.js"></script>
|
||||
|
||||
<!-- Jodit Js -->
|
||||
<script src="<?= base_url() . "public"; ?>/assets/js/jodit.min.js"></script>
|
||||
|
||||
<!-- select2 -->
|
||||
<!-- ============================= -->
|
||||
<!-- Select2 -->
|
||||
<!-- ============================= -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
|
||||
|
||||
<!-- ============================= -->
|
||||
<!-- Editor -->
|
||||
<!-- ============================= -->
|
||||
<script src="<?= base_url("public/assets/js/jodit.min.js"); ?>"></script>
|
||||
|
||||
<script src="https://cdn.datatables.net/plug-ins/2.0.8/sorting/scientific.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.7.1/jszip.min.js"></script>
|
||||
<!-- ============================= -->
|
||||
<!-- App Init -->
|
||||
<!-- ============================= -->
|
||||
<script src="<?= base_url("public/assets/js/app.min.js"); ?>"></script>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
1242
app/Views/layout/footer_old_outdated.php
Normal file
1242
app/Views/layout/footer_old_outdated.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -50,17 +50,18 @@
|
||||
<link href="<?= base_url() . "public"; ?>/assets/css/jodit.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
|
||||
<!-- JQuery CDN -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
<!-- JQuery CDN -->
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
|
||||
|
||||
<!-- Sweet Alert CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.10.4/dist/sweetalert2.all.min.js"></script>
|
||||
<!-- Sweet Alert CDN -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.12.0/dist/sweetalert2.all.min.js"></script>
|
||||
|
||||
<!-- select2 -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" type="text/css">
|
||||
<!-- select2 -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.7.1.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
|
||||
|
||||
<!-- <link rel="manifest" href="../manifest.json"> -->
|
||||
|
||||
@ -83,7 +84,7 @@
|
||||
</script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css" />
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> -->
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
|
||||
<!-- srinivas -->
|
||||
|
||||
|
||||
2191
app/Views/layout/header_old_outdated.php
Normal file
2191
app/Views/layout/header_old_outdated.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -5,27 +5,6 @@ Options -Indexes
|
||||
# Rewrite engine
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
## ADDED for - block any script execution inside folder of public
|
||||
<If "%{REQUEST_URI} =~ m#/(logo|add_image_upload|e_card_imgs|claim_sample_forms|sample_import_excel|writable)/#">
|
||||
Deny from all
|
||||
# Disable PHP engine
|
||||
<IfModule mod_php.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
# 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
|
||||
<FilesMatch "\.(php|php5|php7|phtml|pl|py|cgi|ap|aspx|sh|rb)$">
|
||||
ForceType text/plain
|
||||
#Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
</If>
|
||||
|
||||
|
||||
# Turning on the rewrite engine is necessary for the following rules and features.
|
||||
# FollowSymLinks must be enabled for this to work.
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
25
public/assets/.htaccess
Normal file
25
public/assets/.htaccess
Normal file
@ -0,0 +1,25 @@
|
||||
# ===============================
|
||||
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||
# ===============================
|
||||
|
||||
# Disable CGI
|
||||
Options -ExecCGI
|
||||
|
||||
# Disable PHP for mod_php / LiteSpeed
|
||||
<IfModule mod_php.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule lsapi_module>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
# Block any script file access
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Block double extensions
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
BIN
public/assets/1.pdf
Normal file
BIN
public/assets/1.pdf
Normal file
Binary file not shown.
4
public/assets/1.php
Normal file
4
public/assets/1.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
echo 'Hi';
|
||||
?>
|
||||
25
public/claim_sample_forms/.htaccess
Normal file
25
public/claim_sample_forms/.htaccess
Normal file
@ -0,0 +1,25 @@
|
||||
# ===============================
|
||||
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||
# ===============================
|
||||
|
||||
# Disable CGI
|
||||
Options -ExecCGI
|
||||
|
||||
# Disable PHP for mod_php / LiteSpeed
|
||||
<IfModule mod_php.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule lsapi_module>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
# Block any script file access
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Block double extensions
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
25
public/e_card_imgs/.htaccess
Normal file
25
public/e_card_imgs/.htaccess
Normal file
@ -0,0 +1,25 @@
|
||||
# ===============================
|
||||
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||
# ===============================
|
||||
|
||||
# Disable CGI
|
||||
Options -ExecCGI
|
||||
|
||||
# Disable PHP for mod_php / LiteSpeed
|
||||
<IfModule mod_php.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule lsapi_module>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
# Block any script file access
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Block double extensions
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
25
public/sample_excel/.htaccess
Normal file
25
public/sample_excel/.htaccess
Normal file
@ -0,0 +1,25 @@
|
||||
# ===============================
|
||||
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||
# ===============================
|
||||
|
||||
# Disable CGI
|
||||
Options -ExecCGI
|
||||
|
||||
# Disable PHP for mod_php / LiteSpeed
|
||||
<IfModule mod_php.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule lsapi_module>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
# Block any script file access
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Block double extensions
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
BIN
public/sample_excel/1.pdf
Normal file
BIN
public/sample_excel/1.pdf
Normal file
Binary file not shown.
4
public/sample_excel/1.php
Normal file
4
public/sample_excel/1.php
Normal file
@ -0,0 +1,4 @@
|
||||
<?php
|
||||
|
||||
echo 'Hi';
|
||||
?>
|
||||
25
public/sample_import_excel/.htaccess
Normal file
25
public/sample_import_excel/.htaccess
Normal file
@ -0,0 +1,25 @@
|
||||
# ===============================
|
||||
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||
# ===============================
|
||||
|
||||
# Disable CGI
|
||||
Options -ExecCGI
|
||||
|
||||
# Disable PHP for mod_php / LiteSpeed
|
||||
<IfModule mod_php.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule lsapi_module>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
# Block any script file access
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Block double extensions
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
25
public/writable/.htaccess
Normal file
25
public/writable/.htaccess
Normal file
@ -0,0 +1,25 @@
|
||||
# ===============================
|
||||
# ABSOLUTE SCRIPT EXECUTION BLOCK
|
||||
# ===============================
|
||||
|
||||
# Disable CGI
|
||||
Options -ExecCGI
|
||||
|
||||
# Disable PHP for mod_php / LiteSpeed
|
||||
<IfModule mod_php.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
<IfModule lsapi_module>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
|
||||
# Block any script file access
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar|pl|py|cgi|asp|aspx|jsp|sh|rb)$">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
|
||||
# Block double extensions
|
||||
<FilesMatch "\.(php|php5|php7|php8|phtml|phar)\.">
|
||||
Require all denied
|
||||
</FilesMatch>
|
||||
Loading…
Reference in New Issue
Block a user