connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Gravitrek-themed email prompts
$emailPrompts = [
"Embark on the ultimate journey through the cosmos with Gravitrek. Your email will unlock the first door to the
universe's wonders. Are you ready to be a part of this historic voyage?",
"Dive into the heart of the unknown, where every star holds a story waiting to be unveiled. Provide your email to
receive exclusive updates and join the ranks of Gravitrek's esteemed pioneers.",
"The vast expanse of the universe awaits, filled with mysteries only the brave dare to explore. By entering your email,
you step closer to becoming an integral part of Gravitrek's legendary odyssey.",
"Your passport to the stars is just an email away. Join us on a journey where gravity is but a mere concept, and the
cosmos unfolds in front of your very eyes. Welcome to Gravitrek, future pioneer.",
"Gravitrek is not just a journey; it's a call to those who dream of the infinite. Enter your email to embark on an
unparalleled adventure among the celestial realms, where your story becomes a part of the universe itself.",
"As the fabric of space unfolds, your destiny awaits among the stars. Let your email be the key that opens the gateway
to new horizons with Gravitrek. Become a pioneer of the future, today.",
"In the tapestry of the cosmos, every light is a destination, every planet a new beginning. Submit your email and take
your first step towards the unknown with Gravitrek – where dreams meet the stars.",
"The echoes of the universe have led you here, to the brink of discovery and adventure. Your email is the beacon that
lights your path to joining Gravitrek's mission into the cosmos. Dare to dream, dare to explore."
];
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['email'])) {
$email = $conn->real_escape_string($_POST['email']);
$sql = "SELECT * FROM waitinglist WHERE email = '$email'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
$signupDate = new DateTime($row['signup_date']);
$currentDate = new DateTime();
$interval = $signupDate->diff($currentDate);
$days = $interval->days;
// Success messages
$welcomeBackMessages = [
"Welcome back, Pioneer! You've been with us since {$signupDate->format('Y-m-d')}, making it a stellar journey of $days
days!",
"Explorer, your saga in the cosmos has spanned $days days since your sign-up on {$signupDate->format('Y-m-d')}. The
universe expands, and so does our story together.",
"Ah, our valued voyager! You embarked on this celestial journey with us on {$signupDate->format('Y-m-d')}, contributing
$days days of adventure and discovery.",
"Legend of the cosmos, you've been navigating the Gravitrek realms with us for $days days since your enlistment on
{$signupDate->format('Y-m-d')}. Together, we continue to explore the infinite.",
"Eternal pioneer, since {$signupDate->format('Y-m-d')} for $days days, you've been charting the stars with us. Your
legacy among the stars is ever-growing."
];
$randIndex = rand(0, count($welcomeBackMessages) - 1);
echo "
" . $welcomeBackMessages[$randIndex] ;
echo "
Rest assured, as soon as we set course for our next grand venture, you will be the first to know. Gravitrek
is committed to keeping our esteemed pioneers informed and engaged. Await our transmission — the journey of a
lifetime is on the horizon.
";
echo "
";
echo '
';
echo ' Acolal Asteroid Dashboard
';
echo ' ';
echo '
Distance from Earth: Loading...
';
echo '
Time until impact: Loading...
';
echo '
Days until visible from Earth: Loading...
';
echo '
Days until first attempt to save Earth: Loading...
';
echo '
';
echo '';
echo '
';
?>
Pioneer's Dashboard
Location: Earth
Rank: Citizen
XP: 0
AP: 0
Energy Level: High
# of Deben Coins: 0
# of SX Coins: 0
# Gravi Coins: 0
# Shat Coins: 0
Number of Cats Found: 0
Number of Robots Owned: 0
Code Trekkers Hired: 0
Gangs Enrolled: 0
Deeds Owned: Earth (0), Heliopoly (0), Fertilius (0), Planet 61 (0), Island Lands (0)
Not a pioneer yet?
Sign Up Here ";
}
} else {
$promptIndex = array_rand($emailPrompts);
?>