diff --git a/app/Controllers/Config.php b/app/Controllers/Config.php index 5fdaa99c5..ee34dbba0 100644 --- a/app/Controllers/Config.php +++ b/app/Controllers/Config.php @@ -56,7 +56,7 @@ class Config extends Secure_Controller $this->sale_lib = new Sale_lib(); $this->receiving_lib = new receiving_lib(); $this->tax_lib = new Tax_lib(); - + $this->appconfig = model('Appconfig'); $this->attribute = model('Attribute'); $this->customer_rewards = model('Customer_rewards'); $this->dinner_table = model('Dinner_table'); @@ -253,6 +253,7 @@ class Config extends Secure_Controller $data['dinner_tables'] = $this->dinner_table->get_all()->getResultArray(); $data['customer_rewards'] = $this->customer_rewards->get_all()->getResultArray(); $data['support_barcode'] = $this->barcode_lib->get_list_barcodes(); + $data['barcode_fonts'] = $this->barcode_lib->listfonts('fonts'); $data['logo_exists'] = $this->config['company_logo'] != ''; $data['line_sequence_options'] = $this->sale_lib->get_line_sequence_options(); $data['register_mode_options'] = $this->sale_lib->get_register_mode_options(); @@ -263,6 +264,7 @@ class Config extends Secure_Controller $data['tax_jurisdiction_options'] = $this->tax_lib->get_tax_jurisdiction_options(); $data['show_office_group'] = $this->module->get_show_office_group(); $data['currency_code'] = $this->config['currency_code']; + $data['db_version'] = mysqli_get_server_info(db_connect()->mysqli); // load all the license statements, they are already XSS cleaned in the private function $data['licenses'] = $this->_licenses(); @@ -317,7 +319,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_info(): void + public function postSaveInfo(): void { $upload_data = $this->upload_logo(); $upload_success = !empty($upload_data['error']); @@ -388,7 +390,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_general(): void + public function postSaveGeneral(): void { $batch_save_data = [ 'theme' => $this->request->getPost('theme', FILTER_SANITIZE_STRING), @@ -482,7 +484,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_locale(): void + public function postSaveLocale(): void { $exploded = explode(":", $this->request->getPost('language', FILTER_SANITIZE_STRING)); $batch_save_data = [ @@ -514,7 +516,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_email(): void + public function postSaveEmail(): void { $password = ''; @@ -542,7 +544,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_message(): void + public function postSaveMessage(): void { $password = ''; @@ -608,7 +610,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_mailchimp(): void + public function postSaveMailchimp(): void { $api_key = ''; $list_id = ''; @@ -665,7 +667,7 @@ class Config extends Secure_Controller $this->receiving_lib->clear_all(); } - public function save_locations(): void + public function postSaveLocations(): void { $this->db->transStart(); @@ -709,7 +711,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_tables(): void + public function postSaveTables(): void { $this->db->transStart(); @@ -758,7 +760,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_tax(): void + public function postSaveTax(): void { $this->db->transStart(); @@ -789,7 +791,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_rewards(): void + public function postSaveRewards(): void { $this->db->transStart(); @@ -848,7 +850,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_barcode(): void + public function postSaveBarcode(): void { $batch_save_data = [ 'barcode_type' => $this->request->getPost('barcode_type', FILTER_SANITIZE_STRING), @@ -876,7 +878,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_receipt(): void + public function postSaveReceipt(): void { $batch_save_data = [ 'receipt_template' => $this->request->getPost('receipt_template', FILTER_SANITIZE_STRING), @@ -907,7 +909,7 @@ class Config extends Secure_Controller /** * @throws ReflectionException */ - public function save_invoice(): void + public function postSaveInvoice(): void { $batch_save_data = [ 'invoice_enable' => $this->request->getPost('invoice_enable') != NULL, diff --git a/app/Views/configs/barcode_config.php b/app/Views/configs/barcode_config.php index 57d11a809..2f370d090 100644 --- a/app/Views/configs/barcode_config.php +++ b/app/Views/configs/barcode_config.php @@ -3,7 +3,7 @@ * @var array $support_barcode */ ?> - 'barcode_config_form', 'class' => 'form-horizontal']) ?> + 'barcode_config_form', 'class' => 'form-horizontal']) ?>
@@ -52,7 +52,7 @@
barcode_lib->listfonts('fonts')), + esc($barcode_fonts), esc($config['barcode_font']), ['class' => 'form-control input-sm required'] ) ?> @@ -93,7 +93,7 @@ 'barcode_content', 'value' => 'id', - 'checked' => $config['barcode_content' === 'id'] + 'checked' => @$config['barcode_content' === 'id'] ]) ?> @@ -101,7 +101,7 @@ 'barcode_content', 'value' => 'number', - 'checked' => $config['barcode_content'] === 'number']) ?> + 'checked' => @$config['barcode_content'] === 'number']) ?>   diff --git a/app/Views/configs/email_config.php b/app/Views/configs/email_config.php index b23b31c1c..362bb0346 100644 --- a/app/Views/configs/email_config.php +++ b/app/Views/configs/email_config.php @@ -1,4 +1,4 @@ - 'email_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> + 'email_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?>
@@ -38,7 +38,7 @@ 'name' => 'smtp_host', 'id' => 'smtp_host', 'class' => 'form-control input-sm', - 'value' => esc($config['smtp_host']) + 'value' => esc(@$config['smtp_host']) ]) ?>
@@ -90,7 +90,7 @@ 'name' => 'smtp_user', 'id' => 'smtp_user', 'class' => 'form-control input-sm', - 'value' => esc($config['smtp_user']) + 'value' => esc(@$config['smtp_user']) ]) ?>
@@ -105,7 +105,7 @@ 'name' => 'smtp_pass', 'id' => 'smtp_pass', 'class' => 'form-control input-sm', - 'value' => esc($config['smtp_pass']) + 'value' => esc(@$config['smtp_pass']) ]) ?> diff --git a/app/Views/configs/general_config.php b/app/Views/configs/general_config.php index 7d9b8130c..694d80a4c 100644 --- a/app/Views/configs/general_config.php +++ b/app/Views/configs/general_config.php @@ -7,7 +7,7 @@ * @var string $controller_name */ ?> - 'general_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> + 'general_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?>
@@ -38,9 +38,9 @@ 'floating_labels' => lang('Config.floating_labels'), 'input_groups' => lang('Config.input_groups') ], - esc($config['login_form']), + esc(@$config['login_form']), ['class' => 'form-control input-sm'] - ) ?> + ) ?>s
@@ -127,7 +127,7 @@ 'name' => 'receiving_calculate_average_price', 'id' => 'receiving_calculate_average_price', 'value' => 'receiving_calculate_average_price', - 'checked' => $config['receiving_calculate_average_price'] + 'checked' => @$config['receiving_calculate_average_price'] ]) ?> @@ -428,7 +428,7 @@ 'name' => 'category_dropdown', 'id' => 'category_dropdown', 'value' => 'category_dropdown', - 'checked' => $config['category_dropdown'] + 'checked' => @$config['category_dropdown'] ]) ?> diff --git a/app/Views/configs/info_config.php b/app/Views/configs/info_config.php index 5220a6f1f..be1b182a6 100644 --- a/app/Views/configs/info_config.php +++ b/app/Views/configs/info_config.php @@ -5,7 +5,7 @@ * @var array $config */ ?> - 'info_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> + 'info_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/integrations_config.php b/app/Views/configs/integrations_config.php index e01f3953a..2dcca5c81 100644 --- a/app/Views/configs/integrations_config.php +++ b/app/Views/configs/integrations_config.php @@ -4,7 +4,7 @@ * @var string $controller_name */ ?> - 'mailchimp_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> + 'mailchimp_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?>
@@ -61,7 +61,7 @@ $(document).ready(function() { $('#mailchimp_api_key').change(function() { - $.post("", { + $.post("", { 'mailchimp_api_key': $('#mailchimp_api_key').val() }, function(response) { diff --git a/app/Views/configs/invoice_config.php b/app/Views/configs/invoice_config.php index 9587e9851..408293ba4 100644 --- a/app/Views/configs/invoice_config.php +++ b/app/Views/configs/invoice_config.php @@ -4,7 +4,7 @@ * @var array $line_sequence_options */ ?> - 'invoice_config_form', 'class' => 'form-horizontal']) ?> + 'invoice_config_form', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/locale_config.php b/app/Views/configs/locale_config.php index 9063dc11d..2c7ba7cbe 100644 --- a/app/Views/configs/locale_config.php +++ b/app/Views/configs/locale_config.php @@ -6,7 +6,7 @@ */ ?> - 'locale_config_form', 'class' => 'form-horizontal']) ?> + 'locale_config_form', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/message_config.php b/app/Views/configs/message_config.php index 3afc35b28..e3553379d 100644 --- a/app/Views/configs/message_config.php +++ b/app/Views/configs/message_config.php @@ -1,4 +1,4 @@ - 'message_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> + 'message_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/receipt_config.php b/app/Views/configs/receipt_config.php index 7aeb737a6..d953cf47b 100644 --- a/app/Views/configs/receipt_config.php +++ b/app/Views/configs/receipt_config.php @@ -1,4 +1,4 @@ - 'receipt_config_form', 'class' => 'form-horizontal']) ?> + 'receipt_config_form', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/reward_config.php b/app/Views/configs/reward_config.php index ffd345121..2d8092274 100644 --- a/app/Views/configs/reward_config.php +++ b/app/Views/configs/reward_config.php @@ -3,7 +3,7 @@ * @var array $customer_rewards */ ?> - 'reward_config_form', 'class' => 'form-horizontal']) ?> + 'reward_config_form', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/stock_config.php b/app/Views/configs/stock_config.php index dc918e9f4..0a290bd8e 100644 --- a/app/Views/configs/stock_config.php +++ b/app/Views/configs/stock_config.php @@ -3,7 +3,7 @@ * @var array $stock_locations */ ?> - 'location_config_form', 'class' => 'form-horizontal']) ?> + 'location_config_form', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/system_info.php b/app/Views/configs/system_info.php index 1b1805c9e..3ccdc9e93 100644 --- a/app/Views/configs/system_info.php +++ b/app/Views/configs/system_info.php @@ -47,7 +47,7 @@ ?>
.Server Software:
.PHP Version:
- .DB Version: db->conn_id)) ?>
+ .DB Version:
.Server Port:
.OS:

File Permissions:
diff --git a/app/Views/configs/table_config.php b/app/Views/configs/table_config.php index 5dc6301bf..9d0de9646 100644 --- a/app/Views/configs/table_config.php +++ b/app/Views/configs/table_config.php @@ -3,7 +3,7 @@ * @var array $dinner_tables */ ?> - 'table_config_form', 'class' => 'form-horizontal']) ?> + 'table_config_form', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/configs/tax_config.php b/app/Views/configs/tax_config.php index a401d3883..bf15d485f 100644 --- a/app/Views/configs/tax_config.php +++ b/app/Views/configs/tax_config.php @@ -6,7 +6,7 @@ * @var string $controller_name */ ?> - 'tax_config_form', 'class' => 'form-horizontal']) ?> + 'tax_config_form', 'class' => 'form-horizontal']) ?>
diff --git a/app/Views/items/form.php b/app/Views/items/form.php index 965a8536b..9793ff2ca 100644 --- a/app/Views/items/form.php +++ b/app/Views/items/form.php @@ -224,7 +224,7 @@ ]) ?> - + `