View file servis/china.php

File size: 1.2Kb
<?

include_once '../style/head.php';

if (isset($_POST['submit'])) {

$year = intval($_POST['year']);
$date = date('Y');
$x = ($date - $year) % 12;

echo "Вы родились в год ";

if (($x == 1) || ($x == -11)) {
echo "МЫШИ";
} else
if ($x == 0) {
echo "БЫКА";
} else
if (($x == 11) || ($x == -1)) {
echo "ТИГРА";
} else
if (($x == 10) || ($x == -2)) {
echo "КРОЛИКА";
} else
if (($x == 9) || ($x == -3)) {
echo "ДРАКОНА";
} else
if (($x == 8) || ($x == -4)) {
echo "ЗМЕИ";
} else
if (($x == 7) || ($x == -5)) {
echo "ЛОШАДИ";
} else
if (($x == 6) || ($x == -6)) {
echo "ОВЦЫ";
} else
if (($x == 5) || ($x == -7)) {
echo "ОБЕЗЬЯНЫ";
} else
if (($x == 4) || ($x == -8)) {
echo "ЦЫПЛЕНКА";
} else
if (($x == 3) || ($x == -9)) {
echo "СОБАКИ";
} else
if (($x == 2) || ($x == -10)) {
echo "СВИНЬИ";
}
echo "<br/><hr /><br />";
}

echo '<form action="china.php" method="post">
Введите год своего рождения:<br/>
<input type="text" name="year"/><br />
<input style="font-size:9px" type="submit" name="submit" value="Пуск"/></form>';
include_once '../style/foot.php';
?>