-
Notifications
You must be signed in to change notification settings - Fork 0
/
buy_confirm.php
105 lines (104 loc) · 4.64 KB
/
buy_confirm.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
99
100
101
102
103
104
105
<?php
session_start();
require("signin_check.php");
require("dbconnect.php");
$h = 'htmlspecialchars';
// ナビバーに表示するため、サインインしている場合ユーザー情報を取得
$nav = array();
if(!empty($_SESSION["user_id"])){
$sql = 'SELECT * FROM users WHERE :signin_id = id;';
$stmt = $pdo->prepare($sql);
$stmt->bindValue(":signin_id",$_SESSION["user_id"],PDO::PARAM_INT);
$stmt->execute();
$nav = $stmt->fetch(PDO::FETCH_ASSOC);
}
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>購入確認</title>
<!-- navbar -->
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<!-- localcss -->
<link rel="stylesheet" type="text/css" href="assets/css/buy_confirm.css">
</head>
<body>
<header>
<!-- navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">巡り野菜</a>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<?php if(isset($_SESSION["user_id"])){ ?>
<ul class="nav navbar-nav navbar-right">
<li><a href="index.php">HOME</a></li>
<li class="dropdown">
<a href="#" class="user_icon dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img src="<?php echo $h($nav["pic"]); ?>" width="28" class="img-circle"><?php echo $h($nav["name"]); ?><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="mypage.php">マイページ</a></li>
<li><a href="product.php">野菜一覧</a></li>
<li><a href="sell.php">野菜出品</a></li>
<li><a href="sell_data.php">出品履歴</a></li>
<li><a href="purchase_history.php">購入履歴</a></li>
<li><a href="sales.php">購入された履歴</a></li>
<li><a href="signout.php">サインアウト</a></li>
</ul>
</li>
</ul>
<?php }else{ ?>
<ul class="nav navbar-nav navbar-right">
<li><a href="signup.php">サインアップ</a></li>
<li><a href="signin.php">サインイン</a></li>
<li><a href="product.php">野菜一覧</a></li>
</ul>
<?php } ?>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
<!-- /.navbar -->
</header>
<div class="container box">
<div class="row">
<div class="col-md-offset-4 col-md-4 contents text-center">
<h2>購入確認</h2>
<p>あなたは「<?php echo $h($_SESSION["name"]); ?> <?php echo $h($_SESSION["amount"]); ?><?php echo $h($_SESSION["unit"]); ?>」を購入しました。<br>購入履歴から出品者とメッセージでやりとりしてください。</p>
</div>
</div>
<div class="row text-center">
<div class="col-md-offset-4 col-md-4">
<a class="btn btn-danger" href="index.php">ホームへ戻る</a>
</div>
</div>
</div>
<footer>
<div class="navbar navbar-inverse navbar-fixed-bottom">
<div class="container">
<div class="navbar-text pull=left">
<p> © meguriyasai 2018.</p>
</div>
<div class="navbar-text pull=right">
<a href="mailto:yukiyohure@gmail.com">お問い合わせはこちら</a>
</div>
<div class="navbar-text pull=right">
<a href="rule.php">特定商標取引表示</a>
</div>
</div>
</div>
</footer>
<!-- navbar -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<!-- <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<!-- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> -->
</body>
</html>