-
Notifications
You must be signed in to change notification settings - Fork 0
/
suggestions.php
54 lines (49 loc) · 1.6 KB
/
suggestions.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
<?php require('sharedFiles/pageStart.inc.php'); ?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta name="author" content="Samuel Milette-Lacombe">
<title>Carcajou - Suggestions de médias</title>
<?php include('sharedFiles/style.inc.php'); ?>
<?php include('sharedFiles/javascript.inc.php'); ?>
</head>
<body>
<?php require('sharedFiles/header.inc.php'); ?>
<div id="content">
<div>
<h2>Suggestions</h2>
<?php
if($application->currentUser->isVisitor())
echo "Vous devez être connecté pour émettre des suggestions de médias.";
else
{
echo '
<form id="suggestion" method="post" action="php/sendSuggestion.php">
<p><label for="titre">Titre</label><input type="text" id="titre" name="titre" maxlength="75" required></p>
<p><label for="artiste">Artiste</label><input type="text" id="artiste" name="artiste" maxlength="75"></p>
<p><label for="typeSupport">Type de support</label>';
$query = $application->database->prepare('SELECT nom FROM supports WHERE inactif = FALSE ORDER BY nom ASC');
$query->execute();
echo '<select id="typeSupport" name="typeSupport">';
echo '<option value="0"></option>';
foreach($query as $row)
{
echo '<option value="'.$row['nom'].'">';
echo $row['nom'];
echo '</option>';
}
echo '</select>';
echo '
</p>
<p><label for="commentaire">Commentaire</label><input type="text" id="commentaire" name="commentaire" maxlength="75"></p>
<button type="submit">Envoyer</button>
</form>
';
}
?>
</div>
</div>
<?php require('sharedFiles/footer.inc.php'); ?>
</body>
</html>