1.1
This commit is contained in:
parent
cbbf66135c
commit
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
|
||||
);
|
||||
170
index.php
170
index.php
@ -12,92 +12,156 @@ $now = date('Y-m-d H:i:s');
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>New Style</title>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<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">
|
||||
<title>Horse Riding Club</title>
|
||||
<link href="https://fonts.cdnfonts.com/css/tiktok-sans" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
--bg-color-start: #6a11cb;
|
||||
--bg-color-end: #2575fc;
|
||||
--text-color: #ffffff;
|
||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
||||
--primary-color: #AC86A8;
|
||||
--white-color: #ffffff;
|
||||
--placeholder-color: #cccccc;
|
||||
}
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
color: var(--text-color);
|
||||
font-family: 'TikTok Sans', sans-serif;
|
||||
font-weight: 300;
|
||||
color: var(--white-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background-image: url('./assets/pasted-20250904-144312-f8e1c105.jpg');
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 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%;
|
||||
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;
|
||||
}
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
.form-panel {
|
||||
background: transparent;
|
||||
padding: 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
h1 {
|
||||
font-size: 3rem;
|
||||
font-size: 2.5rem; /* Made title bigger */
|
||||
font-weight: 700;
|
||||
margin: 0 0 1rem;
|
||||
letter-spacing: -1px;
|
||||
text-align: center;
|
||||
color: var(--white-color);
|
||||
}
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
p.subtitle {
|
||||
text-align: center;
|
||||
margin-bottom: 3rem; /* More space */
|
||||
color: var(--white-color);
|
||||
font-weight: 300;
|
||||
}
|
||||
code {
|
||||
background: rgba(0,0,0,0.2);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
.form-group {
|
||||
margin-bottom: 2rem; /* More space */
|
||||
position: relative;
|
||||
}
|
||||
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 {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
font-size: 0.8rem;
|
||||
opacity: 0.7;
|
||||
color: var(--white-color);
|
||||
z-index: 2;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Welcome!</h1>
|
||||
<p>Your project is ready to conquer the peaks.</p>
|
||||
<p>PHP version: <code><?= htmlspecialchars($phpVersion) ?></code></p>
|
||||
<div class="container">
|
||||
<div class="form-panel">
|
||||
<h1>Welcome Back</h1>
|
||||
<p class="subtitle">Login or create an account to book your ride</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>
|
||||
</main>
|
||||
</div>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
PHP v<?= htmlspecialchars($phpVersion) ?> | Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user