⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
dalily.dev-unit.com
/
app
/
Models
/
Setting
/
View File Name :
OtherSetting.php
<?php /* * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * Author: Mayeul Akpovi (BeDigit - https://bedigit.com) * * LICENSE * ------- * This software is provided under a license agreement and may only be used or copied * in accordance with its terms, including the inclusion of the above copyright notice. * As this software is sold exclusively on CodeCanyon, * please review the full license details here: https://codecanyon.net/licenses/standard */ namespace App\Models\Setting; /* * settings.other.option */ class OtherSetting { public static function getValues($value, $disk) { if (empty($value)) { $value['account_closure_enabled'] = '1'; $value['cookie_consent_enabled'] = '0'; $value['show_tips_messages'] = '1'; $value['timer_new_messages_checking'] = 60000; $value['wysiwyg_editor'] = 'tinymce'; $value['cookie_expiration'] = 1440; } else { if (!array_key_exists('account_closure_enabled', $value)) { $value['account_closure_enabled'] = '1'; } if (!array_key_exists('cookie_consent_enabled', $value)) { $value['cookie_consent_enabled'] = '0'; } if (!array_key_exists('show_tips_messages', $value)) { $value['show_tips_messages'] = '1'; } if (!array_key_exists('timer_new_messages_checking', $value)) { $value['timer_new_messages_checking'] = 60000; } if (!array_key_exists('wysiwyg_editor', $value)) { $value['wysiwyg_editor'] = 'tinymce'; } if (!array_key_exists('cookie_expiration', $value)) { $value['cookie_expiration'] = 1440; } } return $value; } public static function setValues($value, $setting) { return $value; } public static function getFields($diskName): array { $wysiwygEditors = (array)config('larapen.options.wysiwyg'); $fields = [ [ 'name' => 'account_option_title', 'type' => 'custom_html', 'value' => trans('admin.account_option_title'), ], [ 'name' => 'account_closure_enabled', 'label' => trans('admin.account_closure_enabled_label'), 'type' => 'checkbox_switch', 'hint' => trans('admin.account_closure_enabled_hint'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'separator_1', 'type' => 'custom_html', 'value' => trans('admin.other_html_alerts_boxes'), ], [ 'name' => 'cookie_consent_enabled', 'label' => trans('admin.Cookie Consent Enabled'), 'type' => 'checkbox_switch', 'hint' => trans('admin.Enable Cookie Consent Alert to comply for EU law'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'show_tips_messages', 'label' => trans('admin.Show Tips Notification Messages'), 'type' => 'checkbox_switch', 'hint' => trans('admin.show_tips_messages_hint'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'separator_2', 'type' => 'custom_html', 'value' => trans('admin.other_html_google_maps'), ], [ 'name' => 'googlemaps_key', 'label' => trans('admin.Google Maps Key'), 'type' => 'text', 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'separator_3', 'type' => 'custom_html', 'value' => trans('admin.other_html_messenger'), ], [ 'name' => 'timer_new_messages_checking', 'label' => trans('admin.Timer for New Messages Checking'), 'type' => 'number', 'attributes' => [ 'min' => 0, 'step' => 2000, 'required' => true, ], 'hint' => trans('admin.timer_new_messages_checking_hint'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'separator_4', 'type' => 'custom_html', 'value' => trans('admin.textarea_editor_h3'), ], [ 'name' => 'wysiwyg_editor', 'label' => trans('admin.wysiwyg_editor_label'), 'type' => 'select2_from_array', 'options' => $wysiwygEditors, 'hint' => trans('admin.wysiwyg_editor_hint'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'separator_5', 'type' => 'custom_html', 'value' => trans('admin.other_html_mobile_app'), ], [ 'name' => 'ios_app_url', 'label' => trans('admin.App Store'), 'type' => 'text', 'hint' => trans('admin.Available on the App Store with the given URL'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'android_app_url', 'label' => trans('admin.Google Play'), 'type' => 'text', 'hint' => trans('admin.Available on Google Play with the given URL'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'separator_6', 'type' => 'custom_html', 'value' => trans('admin.other_html_number_format'), ], [ 'name' => 'decimals_superscript', 'label' => trans('admin.Decimals Superscript'), 'type' => 'checkbox_switch', ], [ 'name' => 'cookie_sep', 'type' => 'custom_html', 'value' => trans('admin.cookie_sep_value'), ], [ 'name' => 'cookie_expiration', 'label' => trans('admin.cookie_expiration_label'), 'type' => 'number', 'hint' => trans('admin.cookie_expiration_hint'), 'wrapper' => [ 'class' => 'col-md-6', ], ], [ 'name' => 'separator_8', 'type' => 'custom_html', 'value' => trans('admin.other_html_head_js'), ], [ 'name' => 'js_code', 'label' => trans('admin.JavaScript Code'), 'type' => 'textarea', 'attributes' => [ 'rows' => '10', ], 'hint' => trans('admin.js_code_hint'), ], ]; return $fields; } }