-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
46 lines (36 loc) · 1022 Bytes
/
index.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
<?php
session_start();
include('sec/require.php');
$db_manager = new Db_manager($db_host, $db_dbname, $db_username, $db_password);
$_SESSION['lexDejaProp'] = array();
$_SESSION['assocTestProp'] = array();
$_SESSION['test'] = true;
$_SESSION['nbTest'] = 0;
$_SESSION['nbBonneRep'] = 0;
unset($_SESSION['questionPrio']);
// get the id and the names of all variety
$listVar = $db_manager->getAllVar();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="script.css" />
<link href="img/icone.ico" rel="shortcut icon" >
<title>AitalDisèm</title>
</head>
<body>
<?php
echo '<h1>Planvengut !</h1>';
// ask the user to choose a variety
echo '<div class="selectVar">
<p>Abans de començar te cal causir la varietat a utilizar per aquela partida :</p>';
foreach($listVar as $var){
echo '<div class="var">
<a href="partie.php?codeVar='.$var['idVar'].'">'.$var['etiquetteOc'].'</a>
</div>';
}
echo '</div>';
?>
</body>
</html>