forked from CAU-JMT/JMTGR
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchineselist.php
More file actions
114 lines (93 loc) · 3.34 KB
/
chineselist.php
File metadata and controls
114 lines (93 loc) · 3.34 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>CAU - JMT : 중앙대 맛집 사이트</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template -->
<link href="css/agency.css" rel="stylesheet">
</head>
<body>
<?php
include('navbar.html');
include 'db.php';
$limit=5;
$start=$_GET['page']*$limit;
$sql="SELECT *FROM restaurant WHERE type='중식' LIMIT $start,$limit";
$element=$connect->query($sql);
?>
<!-- Page Content -->
<section class="container" id="list">
<div class="container">
<!-- Page Heading -->
<h1 class="my-4">중식 맛집 리스트
</h1>
<?php //db에서 음식점 row 하나씩 불러오기
while($cur_list = $element->fetch_array()) // cur_list : 음식점정보 db row
{
$rname = $cur_list['name'];
$rlocation = $cur_list['location'];
$rmenu = $cur_list['mainmenu'];
echo
"
<div class='row'>
<div class='col-md-7'>
<a href='information.php';>
<img class='img-fluid rounded mb-3 mb-md-0' src='http://placehold.it/500x300' alt=''>
</a>
</div>
<div class = 'col-md-5'>
<h2> $rname </h2>
<h5> $rmenu </h5>
<p> $rlocation </p>
<a class ='btn btn-primary' href='information.php';> 더보기 </a>
</div>
</div>
<hr>
";
}
?>
<!-- Pagination -->
<ul class="pagination justify-content-center">
<li class="page-item">
<a class="page-link" href="#" aria-label="Previous">
<span aria-hidden="true">«</span>
<span class="sr-only">Previous</span>
</a>
</li>
<li class="page-item">
<a class="page-link" href="?page=0">1</a>
</li>
<li class="page-item">
<a class="page-link" href="?page=1">2</a>
</li>
<li class="page-item">
<a class="page-link" href="?page=2">3</a>
</li>
<li class="page-item">
<a class="page-link" href="#" aria-label="Next">
<span aria-hidden="true">»</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
</div>
</section>
<!-- /.container -->
<?php
include('footer.html');
?>
<!-- Bootstrap core JavaScript -->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>
</html>