<?php
	$responseOk = (filter_input(INPUT_POST, 'value') == 4);
	$responseGlados = (filter_input(INPUT_POST, 'value') == 10);
?><!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<title><?php echo ($responseOk || $responseGlados ? 'Your form is valid' : 'Your form is not valid'); ?></title>
		<style>
			.msg {
				padding: 0.5em 0.5em;
				border: 1px solid black;
				border-radius: 8px;
				display: block;
			}
			.msg-ok {
				background-color: #dfd;
				color: green;
				border-color: green;
			}
			.msg-warn {
				background-color: #fed;
				border-color: orange;
			}
			.msg-warn a {
				color: orange;
			}
			.msg-error {
				background-color: #fdd;
				color: red;
				border-color: red;
			}
		</style>
	</head>
	<body><?php
		if ($responseOk) {
			?><div class="msg msg-ok">Vous avez entré la bonne réponse</div><?php
		}
		else if ($responseGlados) {
			?><div class="msg msg-warn"><a href="glados.html" target="popin">Two plus two is ten&#x2026;IN BASE FOUR! I'M FINE!</a></div><?php
		}
		else {
			?><div class="msg msg-error">Vous n'avez pas trouvé la bonne réponse</div><?php
		}
	?></body>
</html>
