Vaihda brändäys: Noxus Intra → Noxus HUB © Empor Oy 2026
Kaikki viittaukset "Noxus Intra" vaihdettu muotoon "Noxus HUB" koko koodikannassa. Footer ja login-sivu näyttävät nyt "Noxus HUB © Empor Oy 2026". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
10
api.php
10
api.php
@@ -18,7 +18,7 @@ define('SITE_URL', 'https://' . ($_SERVER['HTTP_HOST'] ?? 'intra.noxus.fi'));
|
|||||||
|
|
||||||
// Sähköpostiasetukset (fallback)
|
// Sähköpostiasetukset (fallback)
|
||||||
define('MAIL_FROM', 'noreply@noxus.fi');
|
define('MAIL_FROM', 'noreply@noxus.fi');
|
||||||
define('MAIL_FROM_NAME', 'Noxus Intra');
|
define('MAIL_FROM_NAME', 'Noxus HUB');
|
||||||
|
|
||||||
// Varmista data-kansio (tiedostoja varten)
|
// Varmista data-kansio (tiedostoja varten)
|
||||||
if (!file_exists(DATA_DIR)) mkdir(DATA_DIR, 0755, true);
|
if (!file_exists(DATA_DIR)) mkdir(DATA_DIR, 0755, true);
|
||||||
@@ -1258,7 +1258,7 @@ switch ($action) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$url = "https://api.telegram.org/bot{$botToken}/sendMessage";
|
$url = "https://api.telegram.org/bot{$botToken}/sendMessage";
|
||||||
$data = ['chat_id' => $chatId, 'text' => '✅ Noxus Intra Telegram-hälytys toimii!', 'parse_mode' => 'Markdown'];
|
$data = ['chat_id' => $chatId, 'text' => '✅ Noxus HUB Telegram-hälytys toimii!', 'parse_mode' => 'Markdown'];
|
||||||
$ch = curl_init($url);
|
$ch = curl_init($url);
|
||||||
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5]);
|
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 5]);
|
||||||
$resp = curl_exec($ch);
|
$resp = curl_exec($ch);
|
||||||
@@ -1610,7 +1610,7 @@ switch ($action) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$branding) {
|
if (!$branding) {
|
||||||
$branding = ['found' => false, 'nimi' => 'Noxus Intra', 'primary_color' => '#0f3460', 'subtitle' => 'Hallintapaneeli', 'logo_url' => ''];
|
$branding = ['found' => false, 'nimi' => 'Noxus HUB', 'primary_color' => '#0f3460', 'subtitle' => 'Hallintapaneeli', 'logo_url' => ''];
|
||||||
}
|
}
|
||||||
// Tarkista onko yrityksellä integraatioita päällä
|
// Tarkista onko yrityksellä integraatioita päällä
|
||||||
$hasIntegrations = false;
|
$hasIntegrations = false;
|
||||||
@@ -1660,13 +1660,13 @@ switch ($action) {
|
|||||||
dbSaveToken($user['id'], $token);
|
dbSaveToken($user['id'], $token);
|
||||||
$resetUrl = SITE_URL . '/?reset=' . $token;
|
$resetUrl = SITE_URL . '/?reset=' . $token;
|
||||||
$html = '<div style="font-family:sans-serif;max-width:500px;margin:0 auto;">';
|
$html = '<div style="font-family:sans-serif;max-width:500px;margin:0 auto;">';
|
||||||
$html .= '<h2 style="color:#0f3460;">Noxus Intra</h2>';
|
$html .= '<h2 style="color:#0f3460;">Noxus HUB</h2>';
|
||||||
$html .= '<p>Hei ' . htmlspecialchars($user['nimi'] ?: $user['username']) . ',</p>';
|
$html .= '<p>Hei ' . htmlspecialchars($user['nimi'] ?: $user['username']) . ',</p>';
|
||||||
$html .= '<p>Sait tämän viestin koska salasanan palautusta pyydettiin tilillesi.</p>';
|
$html .= '<p>Sait tämän viestin koska salasanan palautusta pyydettiin tilillesi.</p>';
|
||||||
$html .= '<p><a href="' . $resetUrl . '" style="display:inline-block;background:#0f3460;color:#fff;padding:12px 24px;border-radius:8px;text-decoration:none;font-weight:600;">Vaihda salasana</a></p>';
|
$html .= '<p><a href="' . $resetUrl . '" style="display:inline-block;background:#0f3460;color:#fff;padding:12px 24px;border-radius:8px;text-decoration:none;font-weight:600;">Vaihda salasana</a></p>';
|
||||||
$html .= '<p style="color:#888;font-size:0.9em;">Linkki on voimassa 1 tunnin. Jos et pyytänyt salasanan vaihtoa, voit jättää tämän viestin huomiotta.</p>';
|
$html .= '<p style="color:#888;font-size:0.9em;">Linkki on voimassa 1 tunnin. Jos et pyytänyt salasanan vaihtoa, voit jättää tämän viestin huomiotta.</p>';
|
||||||
$html .= '</div>';
|
$html .= '</div>';
|
||||||
sendMail($user['email'], 'Salasanan palautus - Noxus Intra', $html);
|
sendMail($user['email'], 'Salasanan palautus - Noxus HUB', $html);
|
||||||
}
|
}
|
||||||
echo json_encode(['success' => true, 'message' => 'Jos käyttäjätunnus löytyy ja sillä on sähköposti, palautuslinkki lähetetään.']);
|
echo json_encode(['success' => true, 'message' => 'Jos käyttäjätunnus löytyy ja sillä on sähköposti, palautuslinkki lähetetään.']);
|
||||||
break;
|
break;
|
||||||
|
|||||||
4
db.php
4
db.php
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Noxus Intra — Tietokantakerros (MySQLi)
|
* Noxus HUB — Tietokantakerros (MySQLi)
|
||||||
*
|
*
|
||||||
* Korvaa kaikki JSON-tiedosto-operaatiot MySQL-kutsuilla.
|
* Korvaa kaikki JSON-tiedosto-operaatiot MySQL-kutsuilla.
|
||||||
* Funktiot palauttavat samat tietorakenteet kuin vanhat JSON-funktiot.
|
* Funktiot palauttavat samat tietorakenteet kuin vanhat JSON-funktiot.
|
||||||
@@ -840,7 +840,7 @@ function dbGetBranding(string $host): array {
|
|||||||
return [
|
return [
|
||||||
'found' => false,
|
'found' => false,
|
||||||
'company_id' => '',
|
'company_id' => '',
|
||||||
'nimi' => 'Noxus Intra',
|
'nimi' => 'Noxus HUB',
|
||||||
'primary_color' => '#0f3460',
|
'primary_color' => '#0f3460',
|
||||||
'subtitle' => 'Hallintapaneeli',
|
'subtitle' => 'Hallintapaneeli',
|
||||||
'logo_url' => '',
|
'logo_url' => '',
|
||||||
|
|||||||
28
index.html
28
index.html
@@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Noxus Intra</title>
|
<title>Noxus HUB</title>
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<div id="login-screen" class="login-screen" style="display:none">
|
<div id="login-screen" class="login-screen" style="display:none">
|
||||||
<div class="login-box">
|
<div class="login-box">
|
||||||
<img id="login-logo" src="" alt="Logo" style="height:48px;margin-bottom:0.75rem;display:none;">
|
<img id="login-logo" src="" alt="Logo" style="height:48px;margin-bottom:0.75rem;display:none;">
|
||||||
<h1 id="login-title">Noxus Intra</h1>
|
<h1 id="login-title">Noxus HUB</h1>
|
||||||
<p id="login-subtitle">Kirjaudu sisään</p>
|
<p id="login-subtitle">Kirjaudu sisään</p>
|
||||||
<form id="login-form">
|
<form id="login-form">
|
||||||
<input type="text" id="login-username" placeholder="Käyttäjätunnus" required autofocus>
|
<input type="text" id="login-username" placeholder="Käyttäjätunnus" required autofocus>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Salasanan palautuspyyntö -->
|
<!-- Salasanan palautuspyyntö -->
|
||||||
<div class="login-box" id="forgot-box" style="display:none">
|
<div class="login-box" id="forgot-box" style="display:none">
|
||||||
<h1 class="login-brand-title">Noxus Intra</h1>
|
<h1 class="login-brand-title">Noxus HUB</h1>
|
||||||
<p>Salasanan palautus</p>
|
<p>Salasanan palautus</p>
|
||||||
<form id="forgot-form">
|
<form id="forgot-form">
|
||||||
<input type="text" id="forgot-username" placeholder="Käyttäjätunnus" required autofocus>
|
<input type="text" id="forgot-username" placeholder="Käyttäjätunnus" required autofocus>
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- Uusi salasana (reset token) -->
|
<!-- Uusi salasana (reset token) -->
|
||||||
<div class="login-box" id="reset-box" style="display:none">
|
<div class="login-box" id="reset-box" style="display:none">
|
||||||
<h1 class="login-brand-title">Noxus Intra</h1>
|
<h1 class="login-brand-title">Noxus HUB</h1>
|
||||||
<p>Aseta uusi salasana</p>
|
<p>Aseta uusi salasana</p>
|
||||||
<form id="reset-form">
|
<form id="reset-form">
|
||||||
<input type="password" id="reset-password" placeholder="Uusi salasana" required>
|
<input type="password" id="reset-password" placeholder="Uusi salasana" required>
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
<div id="reset-msg" class="success-msg" style="display:none"></div>
|
<div id="reset-msg" class="success-msg" style="display:none"></div>
|
||||||
<div id="reset-error" class="error" style="display:none"></div>
|
<div id="reset-error" class="error" style="display:none"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="login-footer">Noxus HUB © Empor Oy 2026</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Dashboard -->
|
<!-- Dashboard -->
|
||||||
@@ -59,7 +60,7 @@
|
|||||||
<img id="header-logo" src="" alt="Logo" style="height:32px;display:none;">
|
<img id="header-logo" src="" alt="Logo" style="height:32px;display:none;">
|
||||||
<span class="brand-icon" id="header-brand-icon">⚡</span>
|
<span class="brand-icon" id="header-brand-icon">⚡</span>
|
||||||
<div>
|
<div>
|
||||||
<h1 id="header-title">Noxus Intra</h1>
|
<h1 id="header-title">Noxus HUB</h1>
|
||||||
<span class="subtitle" id="header-subtitle">Hallintapaneeli</span>
|
<span class="subtitle" id="header-subtitle">Hallintapaneeli</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1142,9 +1143,18 @@
|
|||||||
<p class="empty-hint">Klikkaa "Hae postit" hakeaksesi sähköpostit.</p>
|
<p class="empty-hint">Klikkaa "Hae postit" hakeaksesi sähköpostit.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="summary-bar">
|
<div class="summary-bar" style="display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0.5rem;">
|
||||||
<span id="ticket-count">0 tikettiä</span>
|
<span><span id="ticket-count">0 tikettiä</span> <span id="ticket-status-summary" style="margin-left:0.5rem;"></span></span>
|
||||||
<span id="ticket-status-summary"></span>
|
<span style="display:flex;align-items:center;gap:0.3rem;font-size:0.85rem;color:#666;">
|
||||||
|
Näytä
|
||||||
|
<select id="ticket-page-size" style="padding:0.2rem 0.4rem;border:1px solid #ccc;border-radius:4px;font-size:0.85rem;">
|
||||||
|
<option value="25">25</option>
|
||||||
|
<option value="50">50</option>
|
||||||
|
<option value="100" selected>100</option>
|
||||||
|
<option value="250">250</option>
|
||||||
|
</select>
|
||||||
|
/sivu
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -1792,7 +1802,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p id="footer-text">Noxus Intra © 2026</p>
|
<p id="footer-text">Noxus HUB © Empor Oy 2026</p>
|
||||||
<button class="footer-idea-btn" onclick="openFeatureSuggestion()" title="Ehdota kehitysideaa">💡 Kehitysehdotus?</button>
|
<button class="footer-idea-btn" onclick="openFeatureSuggestion()" title="Ehdota kehitysideaa">💡 Kehitysehdotus?</button>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Noxus Intra — JSON → MySQL migraatioskripti
|
* Noxus HUB — JSON → MySQL migraatioskripti
|
||||||
*
|
*
|
||||||
* Aja kerran: php migrate.php
|
* Aja kerran: php migrate.php
|
||||||
* Lukee kaikki data/*.json -tiedostot ja siirtää ne MySQL-tietokantaan.
|
* Lukee kaikki data/*.json -tiedostot ja siirtää ne MySQL-tietokantaan.
|
||||||
@@ -13,7 +13,7 @@ error_reporting(E_ALL);
|
|||||||
|
|
||||||
require_once __DIR__ . '/db.php';
|
require_once __DIR__ . '/db.php';
|
||||||
|
|
||||||
echo "=== Noxus Intra: JSON → MySQL migraatio ===\n\n";
|
echo "=== Noxus HUB: JSON → MySQL migraatio ===\n\n";
|
||||||
|
|
||||||
// Reset-tila: ?reset=1 tyhjentää taulut ensin
|
// Reset-tila: ?reset=1 tyhjentää taulut ensin
|
||||||
if (isset($_GET['reset']) || (isset($argv[1]) && $argv[1] === '--reset')) {
|
if (isset($_GET['reset']) || (isset($argv[1]) && $argv[1] === '--reset')) {
|
||||||
|
|||||||
@@ -6359,7 +6359,7 @@ function applyModules(modules, hasIntegrations) {
|
|||||||
|
|
||||||
function applyBranding(branding) {
|
function applyBranding(branding) {
|
||||||
const color = branding.primary_color || '#0f3460';
|
const color = branding.primary_color || '#0f3460';
|
||||||
const nimi = branding.nimi || 'Noxus Intra';
|
const nimi = branding.nimi || 'Noxus HUB';
|
||||||
const subtitle = branding.subtitle || '';
|
const subtitle = branding.subtitle || '';
|
||||||
const logoUrl = branding.logo_url || '';
|
const logoUrl = branding.logo_url || '';
|
||||||
|
|
||||||
@@ -6404,7 +6404,7 @@ async function loadBranding() {
|
|||||||
applyBranding(data);
|
applyBranding(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Oletusbrändäys
|
// Oletusbrändäys
|
||||||
applyBranding({ nimi: 'Noxus Intra', primary_color: '#0f3460', subtitle: 'Hallintapaneeli', logo_url: '' });
|
applyBranding({ nimi: 'Noxus HUB', primary_color: '#0f3460', subtitle: 'Hallintapaneeli', logo_url: '' });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,11 +21,18 @@ body {
|
|||||||
/* Login */
|
/* Login */
|
||||||
.login-screen {
|
.login-screen {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
|
background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
|
||||||
}
|
}
|
||||||
|
.login-footer {
|
||||||
|
color: rgba(255,255,255,0.6);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.login-box {
|
.login-box {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
|||||||
Reference in New Issue
Block a user