<?php
session_start();
$err = "";
if ($_POST) {
  $u = trim($_POST["user"] ?? "");
  $p = trim($_POST["pass"] ?? "");
  if ($u === "admin" && $p === "admin") {
    $_SESSION["auth"] = 1;
    $_SESSION["user_name"] = "Emre Emre";
    header("Location: dashboard.php");
    exit;
  } else {
    $err = "Login failed";
  }
}
?><!doctype html>
<html lang="tr"><head>
<meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ECUPRATIX | Login</title>
<link rel="stylesheet" href="assets/css/theme.css?v=1"/>
<link rel="stylesheet" href="assets/css/components.css?v=1"/>
<link rel="stylesheet" href="assets/css/login_video_bg.css?v=1"/>
<link rel="stylesheet" href="assets/css/login__bg.css?v=4"/>
</head>
<body class="authbg">
<div class="login-video-wrap">
  <video autoplay muted loop playsinline>
    <source src="assets/video/login_bg.mp4?v=61" type="video/mp4">
  </video>
</div>
<div class="login-video-veil"></div>

  
  <div class="-veil"></div>

  <div class="auth-wrap">
    <div class="auth-card">
      <div class="auth-brand">
        <div class="brand-logo big">ECU</div>
        <div>
          <div class="auth-title">ECUPRATIX</div>
          <div class="auth-sub">Black / Red · Sharp UI</div>
        </div>
      </div>

      <?php if($err): ?>
        <div class="alert"><?= htmlspecialchars($err) ?></div>
      <?php endif; ?>

      <form method="post" class="auth-form">
  <div class="field">
    <label><span data-i18n="username">Kullanıcı Adı</span></label>
    <input type="text" name="user" autocomplete="username" required>
  </div>

  <div class="field">
    <label><span data-i18n="password">Şifre</span></label>
    <input type="password" name="pass" autocomplete="current-password" required>
  </div>

  <button type="submit" class="btn-login"><span data-i18n="login">Giriş Yap</span></button>

  <div class="login-options">
    <label class="remember-me">
      <input type="checkbox" name="remember_me">
      <span><span data-i18n="remember">Beni hatırla</span></span>
    </label>

    <label class="user-terms">
      <input type="checkbox" name="user_terms" required>
      <span><a href="user_agreement.php" target="_blank"><a href="user_agreement.php" target="_blank" data-i18n="terms_link">Kullanıcı Sözleşmesini</a> <span data-i18n="terms">okudum ve kabul ediyorum</span></span>
    </label>
  </div>
</form>

      <div class="auth-foot">
        Demo: <b>admin / admin</b>
      </div>
    </div>
  </div>
</body></html>