Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfa8617644 |
BIN
assets/pasted-20250904-144312-f8e1c105.jpg
Normal file
BIN
assets/pasted-20250904-144312-f8e1c105.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 467 KiB |
BIN
assets/pasted-20250904-145026-3fdef966.jpg
Normal file
BIN
assets/pasted-20250904-145026-3fdef966.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
33
db/migrate.php
Normal file
33
db/migrate.php
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
require_once 'config.php';
|
||||||
|
|
||||||
|
try {
|
||||||
|
$pdo = db();
|
||||||
|
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||||
|
|
||||||
|
$migrationsDir = __DIR__ . '/migrations';
|
||||||
|
$files = glob($migrationsDir . '/*.sql');
|
||||||
|
sort($files);
|
||||||
|
|
||||||
|
if (empty($files)) {
|
||||||
|
echo "No migration files found.\n";
|
||||||
|
} else {
|
||||||
|
foreach ($files as $file) {
|
||||||
|
$sql = file_get_contents($file);
|
||||||
|
if ($sql === false) {
|
||||||
|
throw new Exception("Could not read migration file: $file");
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdo->exec($sql);
|
||||||
|
echo "Successfully executed migration: " . basename($file) . "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "All migrations completed successfully.\n";
|
||||||
|
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
die("Database migration failed: " . $e->getMessage() . "\n");
|
||||||
|
} catch (Exception $e) {
|
||||||
|
die("An error occurred: " . $e->getMessage() . "\n");
|
||||||
|
}
|
||||||
|
|
||||||
6
db/migrations/001_create_users_table.sql
Normal file
6
db/migrations/001_create_users_table.sql
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS `users` (
|
||||||
|
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
`username` VARCHAR(50) NOT NULL UNIQUE,
|
||||||
|
`password` VARCHAR(255) NOT NULL,
|
||||||
|
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
168
index.php
168
index.php
@ -12,92 +12,156 @@ $now = date('Y-m-d H:i:s');
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<title>New Style</title>
|
<title>Horse Riding Club</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link href="https://fonts.cdnfonts.com/css/tiktok-sans" rel="stylesheet">
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
|
||||||
<style>
|
<style>
|
||||||
:root {
|
:root {
|
||||||
--bg-color-start: #6a11cb;
|
--primary-color: #AC86A8;
|
||||||
--bg-color-end: #2575fc;
|
--white-color: #ffffff;
|
||||||
--text-color: #ffffff;
|
--placeholder-color: #cccccc;
|
||||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
|
||||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: 'Inter', sans-serif;
|
font-family: 'TikTok Sans', sans-serif;
|
||||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
font-weight: 300;
|
||||||
color: var(--text-color);
|
color: var(--white-color);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: flex-start;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
text-align: center;
|
background-image: url('./assets/pasted-20250904-144312-f8e1c105.jpg');
|
||||||
overflow: hidden;
|
background-size: cover;
|
||||||
position: relative;
|
background-position: center;
|
||||||
}
|
}
|
||||||
body::before {
|
body::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
max-width: 450px; /* Adjusted for a sleeker look */
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
|
||||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M-10 10L110 10M10 -10L10 110" stroke-width="1" stroke="rgba(255,255,255,0.05)"/></svg>');
|
|
||||||
animation: bg-pan 20s linear infinite;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
@keyframes bg-pan {
|
|
||||||
0% { background-position: 0% 0%; }
|
|
||||||
100% { background-position: 100% 100%; }
|
|
||||||
}
|
|
||||||
main {
|
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
.card {
|
.form-panel {
|
||||||
background: var(--card-bg-color);
|
background: transparent;
|
||||||
border: 1px solid var(--card-border-color);
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
backdrop-filter: blur(20px);
|
border-radius: 0;
|
||||||
-webkit-backdrop-filter: blur(20px);
|
box-shadow: none;
|
||||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
font-size: 3rem;
|
font-size: 2.5rem; /* Made title bigger */
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
letter-spacing: -1px;
|
text-align: center;
|
||||||
|
color: var(--white-color);
|
||||||
}
|
}
|
||||||
p {
|
p.subtitle {
|
||||||
margin: 0.5rem 0;
|
text-align: center;
|
||||||
font-size: 1.1rem;
|
margin-bottom: 3rem; /* More space */
|
||||||
|
color: var(--white-color);
|
||||||
|
font-weight: 300;
|
||||||
}
|
}
|
||||||
code {
|
.form-group {
|
||||||
background: rgba(0,0,0,0.2);
|
margin-bottom: 2rem; /* More space */
|
||||||
padding: 2px 6px;
|
position: relative;
|
||||||
border-radius: 4px;
|
}
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
label {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-weight: 400; /* Regular weight */
|
||||||
|
color: var(--white-color);
|
||||||
|
}
|
||||||
|
input[type="email"],
|
||||||
|
input[type="password"] {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
border-bottom: 1px solid var(--white-color);
|
||||||
|
border-radius: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: var(--white-color);
|
||||||
|
font-family: 'TikTok Sans', sans-serif;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
input[type="email"]:focus,
|
||||||
|
input[type="password"]:focus {
|
||||||
|
outline: none;
|
||||||
|
border-bottom-color: var(--primary-color);
|
||||||
|
}
|
||||||
|
::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
|
||||||
|
color: var(--placeholder-color);
|
||||||
|
opacity: 1; /* Firefox */
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.85rem;
|
||||||
|
border: 1px solid var(--primary-color);
|
||||||
|
border-radius: 4px; /* A slight radius for the button */
|
||||||
|
background-color: var(--primary-color);
|
||||||
|
color: var(--white-color);
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 700;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
background-color: transparent;
|
||||||
|
color: var(--primary-color);
|
||||||
|
}
|
||||||
|
.form-footer {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
margin-top: 1.5rem;
|
||||||
|
}
|
||||||
|
.form-footer a {
|
||||||
|
color: var(--white-color);
|
||||||
|
text-decoration: underline;
|
||||||
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
footer {
|
footer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 1rem;
|
bottom: 1rem;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
opacity: 0.7;
|
color: var(--white-color);
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<div class="container">
|
||||||
<div class="card">
|
<div class="form-panel">
|
||||||
<h1>Welcome!</h1>
|
<h1>Welcome Back</h1>
|
||||||
<p>Your project is ready to conquer the peaks.</p>
|
<p class="subtitle">Login or create an account to book your ride</p>
|
||||||
<p>PHP version: <code><?= htmlspecialchars($phpVersion) ?></code></p>
|
<form action="#" method="POST">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">Email</label>
|
||||||
|
<input type="email" id="email" name="email" 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>
|
||||||
|
<div class="form-footer">
|
||||||
|
Don't have an account? <a href="#">Sign Up</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</div>
|
||||||
<footer>
|
<footer>
|
||||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
PHP v<?= htmlspecialchars($phpVersion) ?> | Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user