forked from ndmsp/connectedbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
livre.php
98 lines (74 loc) · 2.64 KB
/
livre.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php session_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="iso-8859-1" />
<meta name="author" content="Thomas Diot" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/sticky.full.js"></script>
<?php include('include/config.php'); ?>
<title><?php echo $site; ?> - Fiche de livre</title>
</head>
<body id="site-wrapper">
<?php
include('include/no-js.php');
?>
<div id="header">
<?php
include('include/top.inc.php');
include('include/menu.inc.php');
?>
</div>
<div class="main" id="main-two-columns">
<div class="left" id="main-content">
<?php
if(!empty($_GET['id']) && Livre::isExist($bdd, $_GET['id'])){
$book = new Livre($bdd);
$book->get($_GET['id']);
?>
<img src="<?php echo $book->getCover(); ?>" width="200" height="300" class="cover" />
<h4><?php echo $book->getTitle(); ?> de <?php echo strtoupper($book->getAuthor()); ?></h4>
<div id="consult">
<fieldset>
<legend> A propos de ce livre: </legend>
<span class="titre">Année de parution: </span><?php echo $book->getYear(); ?><br />
<span class="titre">Collection: </span><?php echo $book->getCollection(); ?><br />
<span class="titre">Note: </span>
<?php
$i = 0;
while($i < $book->getNote()){
echo '<img src="img/etoile.png" />';
$i++;
}
if($i < 5){
while($i < 5){
echo '<img src="img/etoile_grise.gif" />';
$i++;
}
}
?>
<br />
<span class="titre">Isbn: </span><?php echo $book->getIsbn(); ?><br />
</fieldset>
<br /><br />
<span class="titre">Résumé: </span><?php echo $book->getResume(); ?><br />
<?php
}
else{
?>
<p>Nous sommes désolés, mais le livre demandé ne semble plus exister... Si vous pensez être victime d'un complot, n'hésitez pas à contacter un administrateur !!</p>
<p> </p><p> </p><p> </p>
<a href="index.php"><img src="img/vide.png" alt="" title="Vide !" height="261" width="261" class="imagecenter" /></a>
<?php
}
?>
</div>
</div>
<?php include('include/sidebar_right.inc.php'); ?>
</div>
<div id="footer">
<?php include('include/footer.inc.php'); ?>
</div>
</body>
</html>