diff --git a/setup.php b/setup.php index b4374e07..77f0c4f3 100644 --- a/setup.php +++ b/setup.php @@ -790,6 +790,9 @@ $locales_array = [ 'zu' => 'Zulu', ]; +// Get a list of all available timezones +$timezones = DateTimeZone::listIdentifiers(); + if (isset($_POST['add_database'])) { // Check if database has been set up already. If it has, direct user to edit directly instead. @@ -955,6 +958,7 @@ if (isset($_POST['add_company_settings'])) { $website = sanitizeInput($_POST['website']); $locale = sanitizeInput($_POST['locale']); $currency_code = sanitizeInput($_POST['currency_code']); + $timezone = sanitizeInput($_POST['timezone']); mysqli_query($mysqli,"INSERT INTO companies SET company_name = '$name', company_address = '$address', company_city = '$city', company_state = '$state', company_zip = '$zip', company_country = '$country', company_phone = '$phone', company_email = '$email', company_website = '$website', company_locale = '$locale', company_currency = '$currency_code'"); @@ -1003,7 +1007,7 @@ if (isset($_POST['add_company_settings'])) { $latest_database_version = LATEST_DATABASE_VERSION; - mysqli_query($mysqli,"INSERT INTO settings SET company_id = 1, config_current_database_version = '$latest_database_version', config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_default_net_terms = 30, config_ticket_next_number = 1, config_ticket_prefix = 'TCK-'"); + mysqli_query($mysqli,"INSERT INTO settings SET company_id = 1, config_current_database_version = '$latest_database_version', config_invoice_prefix = 'INV-', config_invoice_next_number = 1, config_recurring_prefix = 'REC-', config_recurring_next_number = 1, config_invoice_overdue_reminders = '1,3,7', config_quote_prefix = 'QUO-', config_quote_next_number = 1, config_default_net_terms = 30, config_ticket_next_number = 1, config_ticket_prefix = 'TCK-', config_timezone = '$timezone'"); # Used only for the install script to grab the generated cronkey and insert into the db if (file_exists("uploads/tmp/cronkey.php")) { @@ -1343,7 +1347,7 @@ if (isset($_POST['add_telemetry'])) {
-

Company Details

+

Company Details

@@ -1358,6 +1362,11 @@ if (isset($_POST['add_telemetry'])) {
+
+ + +
+
@@ -1443,6 +1452,8 @@ if (isset($_POST['add_telemetry'])) {
+ Localization +
@@ -1465,7 +1476,7 @@ if (isset($_POST['add_telemetry'])) {
+ +
+
+ +
+ +