Settings > Company details - your company as it shows on invoices, * quotes and emails: its name and tax ID, address, phone (with its country * code, following the country picked), email, website and logo, and the * client record that stands for it. Saved by edit_company; the logo is taken * off by remove_company_logo (admin/post/settings_company.php). */ require_once "includes/inc_all_admin.php"; $company = settingsCurrent(['company_name', 'company_tax_id', 'company_address', 'company_city', 'company_state', 'company_zip', 'company_country', 'company_phone_country_code', 'company_phone', 'company_email', 'company_website', 'company_logo'], 'companies'); $localization = settingsLocalizationArrays(); $countries = ['' => '- Country -']; foreach ($localization['countries'] as $country_name) { $countries[$country_name] = [$country_name, ' data-iso2="' . escapeHtml($localization['country_iso2'][$country_name] ?? '') . '"']; } $internal_clients = [0 => 'None']; $sql_internal_clients = mysqli_query($mysqli, "SELECT client_id, client_name, client_abbreviation FROM clients WHERE client_archived_at IS NULL OR client_id = " . intval($config_internal_client_id) . " ORDER BY client_name ASC"); while ($row = mysqli_fetch_assoc($sql_internal_clients)) { $internal_clients[intval($row['client_id'])] = [$row['client_name'], selectOptionClient($row['client_id'], $row['client_name'], $row['client_abbreviation'] ?? '')]; } $logo = (string) ($company['company_logo'] ?? ''); $logo_url = $logo !== '' && basename($logo) === $logo && is_file(dirname(__DIR__) . "/uploads/settings/$logo") ? "/uploads/settings/" . rawurlencode($logo) : ''; // The phone, as it is shown - its number formatted for its country, its code apart $phone_code = (string) settingsValue('company_phone_country_code', $company['company_phone_country_code']); $phone = (string) settingsValue('company_phone', formatPhoneNumber((string) $company['company_phone'], $phone_code, false)); echo settingsPageStart('company'); ?>