diff options
| author | haturatu <taro@eyes4you.org> | 2025-10-12 18:52:35 +0900 |
|---|---|---|
| committer | haturatu <taro@eyes4you.org> | 2025-10-12 18:52:35 +0900 |
| commit | 0cf0d195218fc289f2a04db5535d8fbbd96c988c (patch) | |
| tree | e5d1911b7e0aae157b3cd93719a4f547ca88a965 /templates/php/login.php | |
| parent | 957dc75eddf69ccf26bd387828b9e205a5425f30 (diff) | |
add: php support
- ja doc
Diffstat (limited to 'templates/php/login.php')
| -rw-r--r-- | templates/php/login.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/templates/php/login.php b/templates/php/login.php new file mode 100644 index 0000000..f3e5113 --- /dev/null +++ b/templates/php/login.php @@ -0,0 +1,42 @@ +<?php + $paths = [ + 'Login' => $_SERVER['AUTH_PATH_LOGIN'] ?? '/login', + 'Register' => $_SERVER['AUTH_PATH_REGISTER'] ?? '/register', + 'Assets' => $_SERVER['AUTH_ASSETS_PATH'] ?? '/assets', + ]; +?> +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <title>Login</title> + <link rel="stylesheet" href="<?php echo htmlspecialchars($paths['Assets']); ?>/css/style.css"> +</head> +<body> + <div class="container form-container"> + <h2>Login Required</h2> + <form id="login-form" action="<?php echo htmlspecialchars($paths['Login']); ?>" method="post"> + <div class="form-group"> + <label for="username">Username</label> + <input type="text" id="username" name="username" required> + </div> + <div class="form-group"> + <label for="password">Password</label> + <input type="password" id="password" name="password" required> + </div> + <button type="submit">Login</button> + </form> + <p class="error"> + <?php + if (!empty($_GET['error'])) { + echo htmlspecialchars($_GET['error']); + } + ?> + </p> + <div style="text-align: center; margin-top: 1rem;"> + <a href="<?php echo htmlspecialchars($paths['Register']); ?>">Don't have an account? Register</a> + </div> + </div> +</body> +</html>
\ No newline at end of file |
