diff --git a/.cpanel.yml b/.cpanel.yml new file mode 100644 index 00000000..944de66e --- /dev/null +++ b/.cpanel.yml @@ -0,0 +1,5 @@ +--- +deployment: + tasks: + - export DEPLOYPATH=/home/example/public_html/ + - /bin/cp . $DEPLOYPATH \ No newline at end of file diff --git a/app/Controllers/LoginController.php b/app/Controllers/LoginController.php index 1d646d01..4e677e88 100644 --- a/app/Controllers/LoginController.php +++ b/app/Controllers/LoginController.php @@ -15,8 +15,8 @@ class LoginController extends BaseController public function index(){ - $session_data = ['isLoggedIn' => True ,'userid' => '25']; - set_session_data($session_data); + //$session_data = ['isLoggedIn' => True ,'userid' => '25']; + //set_session_data($session_data); // $isLoggedIn = check_session(); $isLoggedIn = check_session(); diff --git a/app/Models/PolicesModel.php b/app/Models/PolicesModel.php index a6194255..d6a8182e 100644 --- a/app/Models/PolicesModel.php +++ b/app/Models/PolicesModel.php @@ -1,12 +1,11 @@ ( Image dimensions 100 x 100 pixels and size of 200KB. )
- " width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/> + " width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/>
@@ -363,77 +363,68 @@ input:checked + .slider:before { return false; } - function PreviewImage() { - var file = document.getElementById("client_logo").files[0]; - - if (file) { - if (file.size <= 200 * 1024) { // 200kb in bytes - var oFReader = new FileReader(); - oFReader.readAsDataURL(file); - oFReader.onload = function (oFREvent) { - document.getElementById("uploadPreview").src = oFREvent.target.result; + function PreviewImage() { + console.log('function called'); + var fileInput = document.getElementById("client_logo"); + var file = fileInput.files[0]; + + if (file) { + var allowedExtensions = ["jpg", "jpeg", "png"]; + var fileExtension = file.name.split('.').pop().toLowerCase(); + + if (!allowedExtensions.includes(fileExtension) || file.size > 200 * 1024) { + fileInput.value = ""; // Clear the file input + document.getElementById("uploadPreview").src = "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"; // Remove the preview image + } else { + var reader = new FileReader(); + reader.readAsDataURL(file); + + reader.onload = function (event) { + document.getElementById("uploadPreview").src = event.target.result; }; } - } - }; + } + } - - // function validateFile(input) { - // const file = input.files[0]; - // const allowedExtensions = ["jpg", "jpeg", "png"]; - // const fileExtension = file.name.split(".").pop().toLowerCase(); - - // if (!allowedExtensions.includes(fileExtension)) { - // toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.'); - // document.getElementById("uploadPreview").src = "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"; - // input.value = ""; - // return; - // } - // } - function validateFile(input) { - const file = input.files[0]; - const allowedExtensions = ["jpg", "jpeg", "png"]; - const fileExtension = file.name.split(".").pop().toLowerCase(); - // Check if the file extension is allowed - if (!allowedExtensions.includes(fileExtension)) { - toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.'); - document.getElementById("uploadPreview").src = ""; - $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); - // input.value = ""; - // return; - } + const file = input.files[0]; + const allowedExtensions = ["jpg", "jpeg", "png"]; + const fileExtension = file.name.split(".").pop().toLowerCase(); - // Check file size - const fileSize = file.size / 1024; // in KB - if (fileSize > 200) { - toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.'); - $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); - // input.value = ""; - // return; - } - - // Check image dimensions - const img = new Image(); - img.onload = function() { - if (this.width !== 100 || this.height !== 100) { - toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.'); - $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); - // input.value = ""; - // return; + // Check if the file extension is allowed + if (!allowedExtensions.includes(fileExtension)) { + toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.'); + $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); + input.value = ""; } - // If both size and dimensions are valid, you can proceed with your logic here - // For example, you can display the image - const reader = new FileReader(); - reader.onload = function(e) { - document.getElementById("uploadPreview").src = e.target.result; + + + // Check file size + const fileSize = file.size / 1024; // in KB + if (fileSize > 200) { + toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.'); + $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); + } + + // Check image dimensions + const img = new Image(); + img.onload = function() { + if (this.width !== 100 || this.height !== 100) { + toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.'); + $("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"); + } + // If both size and dimensions are valid, you can proceed with your logic here + // For example, you can display the image + const reader = new FileReader(); + reader.onload = function(e) { + document.getElementById("uploadPreview").src = e.target.result; + }; + reader.readAsDataURL(file); }; - reader.readAsDataURL(file); - }; - img.src = URL.createObjectURL(file); + img.src = URL.createObjectURL(file); } diff --git a/app/Views/client_deposit_list.php b/app/Views/client_deposit_list.php index 00a734eb..5d839d1a 100644 --- a/app/Views/client_deposit_list.php +++ b/app/Views/client_deposit_list.php @@ -2,16 +2,17 @@
-
-
- -

Client Deposit -

- -
- -
+
@@ -21,44 +22,41 @@ - + - + - + - insurer_name;?> - - - + insurer_id}?client_id={$value->client_id}"); ?>"> + View Deposit + + + - - + - +
Action
- + insurer_name;?> + ₹ - insurer_id; + insurer_id; + // Check if the balance information exists for the insurer + if (isset($balances[$insurerId])) { + $balance = $balances[$insurerId]->balance; + echo $balance; + } else { + echo "N/A"; // Display "Not Available" if balance information is not present + } + ?> - // Check if the balance information exists for the insurer - if (isset($balances[$insurerId])) { - $balance = $balances[$insurerId]->balance; - echo $balance; - } else { - echo "N/A"; // Display "Not Available" if balance information is not present - } - ?> - - insurer_id}?client_id={$value->client_id}"); ?>"> - View Deposit - -
@@ -67,22 +65,19 @@ \ No newline at end of file diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index 7e5a8568..cb0f925f 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -206,12 +206,12 @@ /* color: #02a8b5 !important; */ font-size: 12px; } - .form-group { - /* margin-bottom: -0.2rem !important; */ + /* .form-group { + margin-bottom: -0.2rem !important; } .form-row{ - /* width: 84%; */ - } + width: 84%; + } */ diff --git a/app/Views/view_deposit.php b/app/Views/view_deposit.php index 2e75f579..d12fba35 100644 --- a/app/Views/view_deposit.php +++ b/app/Views/view_deposit.php @@ -1,55 +1,63 @@ - -
-
-
-
-
-
-
-
- -

Deposit Summary Of short_name?>

- -
-
- -
-
- - - -

name; ?>

-
-
- -
-
-
-

Deposits

-

total_credit?>

-
- -
-

Consumed

-

total_withdraw?>

-
-
-

Refund

-

total_refund?>

-
-
-

Current Balance

-

balance?>

-
-
-
-
-
+
+
+
+
+
+ +
+
+ +

Deposit Summary Of short_name?>

+ +
+
+ +

name; ?>

+
+
+ +
+
+ +
+

Deposits

+

total_credit?> +

+
+ +
+

Consumed

+

total_withdraw?> +

+
+ +
+

Refund

+

total_refund?> +

+
+ +
+

Current Balance

+

balance?> +

+
+ +
+
+
+
+
+
-
+ +
--> +
-
-
-
-
-
-

Transaction Details

-
-
- +
+
+
- -
- +
+
+

Transaction Details

- - +
+ +
+ + +
+ - + - - - - - - - - - - - - - - - - - - - - - - - -
Date User Description Sub Type Credit DebitBalnce
created_at)); ?>username; ?>description; ?>sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>transaction_type == 'Credit') ? $row->amount : ''; ?>transaction_type == 'Debit') ? $row->amount : ''; ?>balance; ?>
-
+ Balnce + + + + + + + created_at)); ?> + username; ?> + description; ?> + sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?> + + transaction_type == 'Credit') ? $row->amount : ''; ?> + transaction_type == 'Debit') ? $row->amount : ''; ?> + balance; ?> + + + + +
-
-
- + +
+
+ -