diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..88e449c --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,95 @@ + +@import url('https://fonts.googleapis.com/css2?family=Inter&family=Montserrat:wght@700&family=Poppins:wght@600&display=swap'); + +:root { + --background: #0D0D0D; + --neon-blue: #00A8FF; + --neon-purple: #A55BFF; + --red: #FF4B4B; + --text: #FFFFFF; +} + +body { + background-color: var(--background); + color: var(--text); + font-family: 'Inter', sans-serif; + display: flex; + align-items: center; + justify-content: center; + min-height: 100vh; + text-align: center; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Montserrat', sans-serif; + font-weight: 700; + color: var(--neon-blue); + text-shadow: 0 0 5px var(--neon-blue), 0 0 10px var(--neon-blue), 0 0 20px var(--neon-purple); +} + +.logo { + font-family: 'Montserrat', sans-serif; + font-weight: 700; + font-size: 2.5rem; + color: var(--text); + text-shadow: 0 0 8px var(--neon-purple); + margin-bottom: 2rem; +} + +.workshop-box { + border: 1px solid var(--neon-purple); + padding: 1.5rem; + margin: 2rem auto; + max-width: 450px; + border-radius: 8px; + background-color: rgba(13, 13, 13, 0.8); + box-shadow: 0 0 15px var(--neon-purple); +} + +.workshop-box p { + margin: 0.5rem 0; + font-size: 1.1rem; +} + +.btn-primary { + font-family: 'Poppins', sans-serif; + font-weight: 600; + background: var(--neon-blue); + border: none; + border-radius: 5px; + padding: 12px 30px; + color: var(--background); + text-transform: uppercase; + letter-spacing: 1px; + transition: all 0.3s ease; + box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue); +} + +.btn-primary:hover { + background: var(--neon-purple); + color: var(--text); + box-shadow: 0 0 15px var(--neon-purple), 0 0 30px var(--neon-purple); +} + +.form-control { + background-color: #1a1a1a; + border: 1px solid var(--neon-purple); + color: var(--text); + border-radius: 5px; +} + +.form-control:focus { + background-color: #1a1a1a; + border-color: var(--neon-blue); + color: var(--text); + box-shadow: 0 0 8px var(--neon-blue); +} + +.form-label { + font-family: 'Poppins', sans-serif; + color: var(--neon-purple); +} + +.container { + max-width: 600px; +} diff --git a/db/migrations/001_create_users_table.php b/db/migrations/001_create_users_table.php new file mode 100644 index 0000000..b9e8c3d --- /dev/null +++ b/db/migrations/001_create_users_table.php @@ -0,0 +1,28 @@ +exec($sql); + + echo "Table 'users' created successfully (if it didn't exist)." . PHP_EOL; + +} catch (PDOException $e) { + die("DB ERROR: " . $e->getMessage()); +} diff --git a/index.php b/index.php index 7205f3d..18701de 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,52 @@ - - - - New Style - - - - - - - - - - - - - - - - - - - + + + Studio RIT - Play & Win + + + + + + + + + + + + + + + + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- +
+ + +

+ STUDIO RIT PRESENTS
+ PLAY & WIN REWARD +

+ +
+

12th December – Illustrator

+

13th & 16th December – Premiere Pro

+

17th, 18th, & 19th December – Blender

+

Time: 4:30 PM – 5:30 PM

+
+ + Play Game → Win Reward! +
+ + - + \ No newline at end of file diff --git a/level1.php b/level1.php new file mode 100644 index 0000000..bb0e156 --- /dev/null +++ b/level1.php @@ -0,0 +1,50 @@ + + + + + + Level 1 - Studio RIT + + + + + +
+ +

Level 1: Draw a Logo

+

Draw any simple logo using the pen tool.

+ +
+ +
+ +
+ + +
+
+ + + + + + + + + \ No newline at end of file diff --git a/level1_complete.php b/level1_complete.php new file mode 100644 index 0000000..59dc490 --- /dev/null +++ b/level1_complete.php @@ -0,0 +1,51 @@ + + + + + + + Level 1 Complete - Studio RIT + + + + + + + + + diff --git a/level2.php b/level2.php new file mode 100644 index 0000000..c597a76 --- /dev/null +++ b/level2.php @@ -0,0 +1,94 @@ + + + + + + + Level 2 - Studio RIT + + + + + + +
+ +

Level 2: Video Timeline Puzzle

+

Arrange the clips in the correct order (1-2-3-4) by dragging them.

+ +
+
3
+
1
+
4
+
2
+
+ + +

+
+ + + + + + diff --git a/level2_complete.php b/level2_complete.php new file mode 100644 index 0000000..5e289dd --- /dev/null +++ b/level2_complete.php @@ -0,0 +1,50 @@ + + + + + + + Level 2 Complete - Studio RIT + + + + + + + + + diff --git a/level3.php b/level3.php new file mode 100644 index 0000000..2069dfa --- /dev/null +++ b/level3.php @@ -0,0 +1,146 @@ + + + + + + + Level 3 - The Spin Wheel + + + + + + + +
+ +

Level 3: The Spin Wheel

+

Spin the wheel and land on the 'Logo' segment to win!

+ +
+ +
SPIN
+
+ +
+ + + + + + + diff --git a/level3_complete.php b/level3_complete.php new file mode 100644 index 0000000..b3b4070 --- /dev/null +++ b/level3_complete.php @@ -0,0 +1,50 @@ + + + + + + + Game Complete - Studio RIT + + + + + + + + + diff --git a/register.php b/register.php new file mode 100644 index 0000000..8a8d351 --- /dev/null +++ b/register.php @@ -0,0 +1,36 @@ + + + + + + Register - Studio RIT + + + + + +
+ +

Create Your Account

+ +
+
+ + +
+
+ + +
+
+ + +
+ + +
+
+ + + + \ No newline at end of file diff --git a/start_game.php b/start_game.php new file mode 100644 index 0000000..aafecf5 --- /dev/null +++ b/start_game.php @@ -0,0 +1,68 @@ +prepare("SELECT id FROM users WHERE usn = ?"); + $stmt->execute([$usn]); + if ($stmt->fetch()) { + // For simplicity, we'll just log them in and send to the game. + // A real app might show an error "USN already registered". + $stmt = $pdo->prepare("SELECT id FROM users WHERE usn = ?"); + $stmt->execute([$usn]); + $user = $stmt->fetch(); + $_SESSION['user_id'] = $user['id']; + header('Location: level1.php'); // Redirect to level 1 + exit(); + } + + // 1. Create a new User (without referral link first) + $sql = "INSERT INTO users (name, usn, mobile, referralCount, hasWonReward, rewardClaimed, gameLevel) VALUES (?, ?, ?, 0, 'no', 'no', 0)"; + $stmt = $pdo->prepare($sql); + $stmt->execute([$name, $usn, $mobile]); + + // 2. Get the new User's ID + $userId = $pdo->lastInsertId(); + + // 3. Generate and update the referralLink + // Note: This assumes the domain is http:// and uses the current host. + // In a production app, this should be a configurable value. + $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https" : "http"; + $host = $_SERVER['HTTP_HOST'] ?? 'localhost'; + $referralLink = $protocol . '://' . $host . '?ref=' . $userId; + + $updateSql = "UPDATE users SET referralLink = ? WHERE id = ?"; + $updateStmt = $pdo->prepare($updateSql); + $updateStmt->execute([$referralLink, $userId]); + + // 4. Log this user in by storing their ID in the session + $_SESSION['user_id'] = $userId; + + // 5. Navigate to Level 1 (placeholder) + // We will create level1.php in a future step. + header('Location: level1.php'); + exit(); + +} catch (PDOException $e) { + // In a real app, log this error and show a generic error page. + die("Database error: " . $e->getMessage()); +} diff --git a/update_level.php b/update_level.php new file mode 100644 index 0000000..f2b6318 --- /dev/null +++ b/update_level.php @@ -0,0 +1,28 @@ +prepare("UPDATE users SET gameLevel = 1 WHERE id = :id"); + $stmt->bindParam(':id', $userId, PDO::PARAM_INT); + $stmt->execute(); + + // Redirect to a success page + header("Location: level1_complete.php"); + exit(); + +} catch (PDOException $e) { + // In a real app, log this error instead of displaying it + die("Database error: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/update_level2.php b/update_level2.php new file mode 100644 index 0000000..140f7f8 --- /dev/null +++ b/update_level2.php @@ -0,0 +1,28 @@ +prepare("UPDATE users SET gameLevel = 2 WHERE id = :id"); + $stmt->bindParam(':id', $userId, PDO::PARAM_INT); + $stmt->execute(); + + // Redirect to a success page + header("Location: level2_complete.php"); + exit(); + +} catch (PDOException $e) { + // In a real app, log this error instead of displaying it + die("Database error: " . $e->getMessage()); +} +?> \ No newline at end of file diff --git a/update_level3.php b/update_level3.php new file mode 100644 index 0000000..4ed54ce --- /dev/null +++ b/update_level3.php @@ -0,0 +1,28 @@ +prepare("UPDATE users SET gameLevel = 3 WHERE id = :id"); + $stmt->bindParam(':id', $userId, PDO::PARAM_INT); + $stmt->execute(); + + // Redirect to a success page + header("Location: level3_complete.php"); + exit(); + +} catch (PDOException $e) { + // In a real app, log this error instead of displaying it + die("Database error: " . $e->getMessage()); +} +?> \ No newline at end of file