-
Notifications
You must be signed in to change notification settings - Fork 0
/
p_jatek.php
62 lines (52 loc) · 1.54 KB
/
p_jatek.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
$min=1;
$max=100;
$tipp=1;
$valasz="";
$ok=false;
$szam=floor(($min+$max)/2);
$tippek="";
$valasztas="";
if ($jatekos=='gg') {
include('gepgondol.php');
$valasztas="
<input type='number' name='x' min='$min' max='$max' required autofocus>
";
}
else if ($jatekos=='jg') {
include('jatekosgondol.php');
$valasztas="
<input type='text' name='x' value='$szam' readonly>
<select name='valasz' required autofocus>
<option value='0'></option>
<option value='1'>kisebb</option>
<option value='2'>nagyobb</option>
<option value='3'>eltaláltad</option>
</select>
";
}
else
header('Location: ./');
?>
<p class='pontok'>
<?php echo "Játékos: ".$_SESSION[$jatekos]['jatekos']." / Gép: ".$_SESSION[$jatekos]['gep']; ?>
</p>
<h2><?php echo $gondol?> gondol</h2>
<? include('jelki.php'); ?>
<h3><?php echo $tippel?> tippjei</h3>
<p>
<?php echo $tippek; ?>
</p>
<?php if (!$ok) { ?>
<form method='GET'>
<?php echo $tipp; ?>. tipp:
<input type='hidden' name='jatek' value='gep'>
<input type='hidden' name='tipp' value='<?php echo $tipp; ?>'>
<input type='hidden' name='min' value='<?php echo $min; ?>'>
<input type='hidden' name='max' value='<?php echo $max; ?>'>
<input type='hidden' name='jatek' value='<?php echo $jatekos;?>'>
<input type='hidden' name='tippek' value='<?php echo $tippek; ?>'>
<?php echo $valasztas; ?>
<input type='submit' value='mehet'>
</form>
<?php } ?>