-
Notifications
You must be signed in to change notification settings - Fork 0
/
list.php
91 lines (86 loc) · 4.83 KB
/
list.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
<?php
require "src/restaurant.php";
if (isset($_POST["id"])) {
$res = (new Restaurant())->getAll($_POST);
} else {
include("404.html");
exit();
}
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="assets/uikit-3.14.3/uikit.min.css" />
<script src="assets/uikit-3.14.3/uikit.min.js"></script>
<script src="assets/uikit-3.14.3/uikit-icons.min.js"></script>
<script src="assets/jquery-3.6.0.js"></script>
<script src="assets/list.js"></script>
<title>検討リスト|レストラン検索</title>
</head>
<body>
<div class="uk-position-fixed uk-width-expand uk-position-z-index-negative uk-height-viewport uk-background-cover" style="background-image: url(assets/img/first_view.png);"></div>
<div class="uk-background-secondary uk-position-z-index" uk-sticky>
<div class="uk-width-5-6 uk-width-3-4@l uk-margin-auto uk-flex uk-flex-between uk-flex-middle">
<a href="./" class="uk-link-heading" style="color:white;">RestaurantSearch</a>
<form action="./list.php" method="post">
<input type="hidden" name="id">
</form>
<ul class="uk-subnav uk-subnav-divider" uk-margin>
<li><a tabindex="-1" class="js_tolist"><span uk-icon="icon: star; ratio: 0.8"></span><span class="uk-visible@s">検討リスト</span></a></li>
<li><a href="./description.html"><span uk-icon="icon: info; ratio: 0.8"></span><span class="uk-visible@s">このサイトについて</span></a></li>
</ul>
</div>
</div>
<main class="uk-margin-mediun-top uk-margin-large-bottom uk-width-5-6 uk-width-3-4@l uk-margin-auto">
<div class="uk-comment-primary uk-padding-small uk-margin-small-top uk-margin-small-bottom uk-border-rounded">
<h4 class="uk-comment-title uk-margin-remove-bottom">検討リスト(最大10件)</h4>
</div>
<?php if ($res && $res["results_returned"] != 0) : ?>
<div class="uk-child-width-1-2@m uk-grid-match" uk-grid>
<?php foreach ($res["shop"] as $shop) : ?>
<div>
<article class="uk-comment uk-height-1-1 uk-comment-primary uk-border-rounded uk-padding-small">
<header class="uk-comment-header uk-position-relative">
<div class="uk-flex uk-flex-between">
<div class="uk-width-5-6 uk-height-small">
<img class="uk-border-rounded uk-height-max-small" src="<?= $shop["photo"]["pc"]["l"] ?>" alt="">
</div>
<div class="uk-flex-none"><a tabindex="-1" class="js_removelist" data-id="<?= $shop["id"] ?>"><span class="uk-icon-button" uk-icon="icon: trash; ratio: 0.8"></span></a></div>
</div>
<h4 class="uk-comment-title uk-margin-small-bottom"><a href="./show.php?id=<?= $shop["id"] ?>" class="uk-text-decoration-none"><?= $shop["name"] ?></a></h4>
<p class="uk-comment-meta uk-margin-remove"><?= $shop["genre"]["catch"] ?></p>
</header>
<div class="uk-comment-body">
<dl class="uk-description-list uk-margin-remove">
<dt>アクセス</dt>
<dd><?= $shop["access"] ?></dd>
<dt>営業日</dt>
<dd><?= $shop["open"] ?></dd>
<dt>定休日</dt>
<dd><?= $shop["close"] ?></dd>
</dl>
<hr class="uk-margin-small">
<span class="uk-label"><?= $shop["large_area"]["name"] ?></span>
<span class="uk-label"><?= $shop["small_area"]["name"] ?></span>
<span class="uk-label"><?= $shop["genre"]["name"] ?></span>
</div>
</article>
</div>
<?php endforeach; ?>
</div>
<?php else : ?>
<article class="uk-comment uk-comment-primary uk-border-rounded uk-padding-small">
リストに追加されていません。
</article>
<?php endif; ?>
</main>
<?php if ($res && $res["results_returned"] >= 4) : ?>
<div class="uk-background-secondary uk-text-center uk-padding-small">
<a href="#" uk-totop uk-scroll></a>
</div>
<?php endif; ?>
</body>
</html>