( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/../tmpr/../tmpr/../tmpr/../sso/login.php
<?php
// idp/login.php
require_once 'config.php';

// Check if user is already logged in, redirect to dashboard
if (isset($_SESSION['euserid'])) {
    header('Location: dashboard.php');
    exit;
}

// Capture error message if any
$error = $_SESSION['error'] ?? null;
unset($_SESSION['error']);
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Login | Brand App SSO</title>
    <style>
        /* Reset and base styles */
        * {
            box-sizing: border-box;
        }
        body, html {
            height: 100%;
            margin: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #4a90e2, #50e3c2);
            display: flex;
            justify-content: center;
            align-items: center;
            color: #333;
        }
        .login-container {
            background: #fff;
            padding: 2.5rem 3rem;
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.15);
            max-width: 400px;
            width: 100%;
            text-align: center;
        }
        .login-container h1 {
            margin-bottom: 1.5rem;
            font-weight: 700;
            color: #222;
        }
        .login-button {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 0.85rem 1.5rem;
            font-size: 1.1rem;
            font-weight: 600;
            border-radius: 8px;
            cursor: pointer;
            width: 100%;
            transition: background-color 0.3s ease;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.75rem;
            box-shadow: 0 4px 12px rgba(0,123,255,0.4);
        }
        .login-button:hover {
            background-color: #0056b3;
            box-shadow: 0 6px 16px rgba(0,86,179,0.6);
        }
        .login-button svg {
            width: 24px;
            height: 24px;
        }
        input[type="email"],
        input[type="password"] {
            width: 100%;
            padding: 0.75rem;
            margin-bottom: 1rem;
            border-radius: 6px;
            border: 1px solid #ccc;
            font-size: 1rem;
        }
        .error-message {
            background: #f8d7da;
            color: #842029;
            padding: 0.75rem;
            margin-bottom: 1rem;
            border-radius: 6px;
            border: 1px solid #f5c2c7;
        }
        .footer-text {
            margin-top: 1.5rem;
            font-size: 0.9rem;
            color: #666;
        }
        @media (max-width: 480px) {
            .login-container {
                padding: 2rem 1.5rem;
            }
        }
    </style>
</head>
<body>
<div class="login-container" role="main" aria-label="Login to Brand App">
    <h1>Welcome to Brand App</h1>

    <?php if ($error): ?>
        <div class="error-message" role="alert"><?= htmlspecialchars($error) ?></div>
    <?php endif; ?>

    <form action="auth.php" method="POST" aria-describedby="login-description">
        <input type="email" name="email" placeholder="Email" required autofocus />
        <input type="password" name="password" placeholder="Password" required />
        <input type="hidden" name="project" value="project1"/>

        <button type="submit" class="login-button" aria-label="Login with Brand App">
            <svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-in" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
                <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/>
                <polyline points="10 17 15 12 10 7"/>
                <line x1="15" y1="12" x2="3" y2="12"/>
            </svg>
            Login with Brand App
        </button>
    </form>
    <p class="footer-text" id="login-description">Securely login using your Brand App account.</p>
</div>
</body>
</html>