Files
intra.noxus.fi/fix_domains.php
2026-03-10 16:45:13 +02:00

21 lines
839 B
PHP
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
ini_set('display_errors', '1');
error_reporting(E_ALL);
require_once __DIR__ . '/db.php';
$existing = _dbFetchColumn("SELECT domain FROM company_domains WHERE company_id = 'empor'");
if (!in_array('intra.empor.fi', $existing)) {
_dbExecute("INSERT INTO company_domains (company_id, domain) VALUES ('empor', 'intra.empor.fi')");
echo "✅ intra.empor.fi lisätty Emporille\n";
} else {
echo " intra.empor.fi oli jo Emporilla\n";
}
_dbExecute("UPDATE companies SET subtitle = ? WHERE id = 'empor'", ['Asiakkuudenhallinta']);
echo "✅ Empor subtitle: Asiakkuudenhallinta\n";
echo "\nKaikki domainit:\n";
$all = _dbFetchAll("SELECT cd.domain, c.nimi FROM company_domains cd JOIN companies c ON c.id = cd.company_id ORDER BY cd.domain");
foreach ($all as $row) {
echo " {$row['domain']}{$row['nimi']}\n";
}