This repository has been archived on 2020-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
nemubot-askweb/subscriptionConfirmation.php

41 lines
621 B
PHP
Raw Normal View History

2012-06-19 16:30:51 +00:00
<?php
2012-06-19 17:32:41 +00:00
include ("header.html");
2012-06-19 16:30:51 +00:00
include("User.class.php");
2012-06-19 17:23:26 +00:00
$users = User::getUsers();
2012-06-19 17:03:50 +00:00
if (!array_key_exists($_GET['id'], $users))
2012-06-19 17:23:26 +00:00
{
2012-06-19 17:55:40 +00:00
$message = "unknown";
2012-06-19 17:23:26 +00:00
}
2012-06-19 17:55:40 +00:00
else if (!$users[$_GET['id']]->isValidated())
2012-06-19 16:30:51 +00:00
{
2012-06-19 17:23:26 +00:00
$users[$_GET['id']]->set_validated(true);
2012-06-19 17:55:40 +00:00
$message = "ok";
2012-06-19 16:30:51 +00:00
}
else
{
2012-06-19 17:55:40 +00:00
$message = "already";
}
?>
<section id="introduction">
<article>
2012-06-19 16:30:51 +00:00
<?php
if ($message == "ok") {
?>
<h2>Vous êtes maintenant inscrit !</h2>
<?php } else if ($message == "already") {
2012-06-19 16:30:51 +00:00
?>
<h2>Vous êtes déjà inscrit</h2>
<?php } else {?>
<h2>Une erreur est survenue</h2>
2012-06-19 17:55:40 +00:00
<?php } ?>
</article>
</section>
</body>
</html>