forked from rioleo/CS147
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
40 lines (37 loc) · 1.16 KB
/
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
<!DOCTYPE html>
<html>
<head>
<title>Maya Online Books</title>
<link rel="apple-touch-icon" href="appicon.png" />
<link rel="apple-touch-startup-image" href="startup.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="viewport" content="width=device-width, user-scalable=no" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="banner"></div>
<?php
include("menu.php");
?>
<table>
<?php
include("config.php");
$query = "SELECT * FROM books";
$result = mysql_query($query);
while ($row = mysql_fetch_assoc($result)) {
echo "<tr><td><h2>".$row["title"]."</h2>";
echo "<p class='author'>".$row["author"]."</p>";
echo "<td><img width='100' class='pretty' src='".$row["image"]."' /></td></td>";
}
?>
</table>
<script type="text/javascript">
$("a").click(function (event) {
event.preventDefault();
window.location = $(this).attr("href");
});
</script>
</body>
</html>