-
Notifications
You must be signed in to change notification settings - Fork 1
/
job.php
65 lines (48 loc) · 1.39 KB
/
job.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
61
62
63
64
65
<?php
require_once '_include/authenticate-user.php';
// Si il n'y a pas l'ID du job à afficher sur la page.
if (!isset($_GET['job_id'])) {
exit("Le parametre 'job_id' n'est pas present dans l'URL");
}
// Chargement du code de la fonction...
$sql = 'SELECT *
FROM `jobs`
WHERE id = ?';
$r = $db->prepare($sql);
$r->execute(array($_GET['job_id']));
if ($r->rowCount() != 1) {
exit('Ce job est introuvable.');
}
$job = $r->fetch();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>PoleJob</title>
</head>
<body>
<header>
<h1>PoleJob</h1>
</header>
<link rel="stylesheet" type="text/css" href="style.css"/>
<hr />
<nav>
<ul>
<li><a href="dashboard.php?my_token=<?php echo $user['token']; ?>">Offres d'emploi</a></li>
<li><a href="logout.php?my_token=<?php echo $user['token']; ?>">Se déconnecter</a></li>
<li><a href="settings.php?my_token=<?php echo $user['token']; ?>">Paramètres personelles</a></li>
</ul>
</nav>
<hr />
<article>
<h2><?php echo $job['title'] ?></h2>
<?php echo $job['description'] ?>
</article>
<h2>Postuler</h2>
<form action="mailto:contact+<?php echo $job['id']; ?>@pole-job.com" class="formulaire">
<TEXTAREA name="content" rows="25" cols="120"></TEXTAREA>
<INPUT type="submit" value="Envoyer" />
</form>
</body>
</html>