-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3.html
More file actions
251 lines (238 loc) · 11.6 KB
/
3.html
File metadata and controls
251 lines (238 loc) · 11.6 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<script src="https://ajaxzip3.github.io/ajaxzip3.js" charset="UTF-8"></script>
<title>宅配ピザ屋</title>
<style>
body {
background-image: linear-gradient(to right, green 33.333%, white 33.333%, white 66.666%, red 66.666%);
background-size: 100% 100%;
margin: 0;
}
.header {
border-bottom: double 5px peru;
}
.spacer {
height: 60px;
}
input[value=" クリア "] {
border: 2px solid rgb(0, 0, 0);
height: 50px;
width: 150px;
font-size: 25px;
color: rgb(0, 0, 0);
background-color: rgb(255, 126, 126);
}
input[value="内容を確認する"] {
border: 2px solid rgb(0, 0, 0);
height: 50px;
width: 200px;
font-size: 25px;
color: rgb(0, 0, 0);
background-color: rgb(20, 147, 250);
}
input:hover {
background-color: #bdbdbd;
}
input:active {
background-color: dimgray;
box-shadow: 0 3px rgb(0, 0, 0);
transform: translateY(3px);
}
table {
border-collapse: collapse;
background-color: rgba(207, 207, 207, 0.7);
}
</style>
<script type="text/javascript">
function CanAlcohol() {
var age = document.form1.age.value;
if (age == "under9" || age == "10~19") {
document.getElementById('alcohol').style.display = "none";
document.form1.ram.checked = false;
document.form1.gin.checked = false;
document.form1.vodka.checked = false;
document.form1.tequila.checked = false;
document.form1.shelley.checked = false;
document.form1.bourbon.checked = false;
document.form1.RomaneeConti.checked = false;
calc();
} else {
document.getElementById('alcohol').style.display = "";
}
}
function calc() {
var total = 0;
var subtotal = 0;
if (document.getElementsByName('size').item(0).checked) total = 1400;
else if (document.getElementsByName('size').item(1).checked) total = 1200;
else if (document.getElementsByName('size').item(2).checked) total = 1000;
if (document.form1.cheese.checked) total += 120;
if (document.form1.tomato.checked) total += 140;
if (document.form1.bacon.checked) total += 160;
if (document.form1.cauliflower.checked) total += 160;
if (document.form1.sweetcorn.checked) total += 180;
if (document.form1.salami.checked) total += 200;
if (document.form1.pineapple.checked) total += 200;
if (document.getElementsByName('side').item(0).checked) total += 500;
else if (document.getElementsByName('side').item(1).checked) total += 600;
if (document.form1.milk.checked) total += 100;
if (document.form1.orange.checked) total += 100;
if (document.form1.apple.checked) total += 100;
if (document.form1.tea.checked) total += 120;
if (document.form1.cola.checked) total += 150;
if (document.form1.sprite.checked) total += 150;
if (document.form1.ram.checked) total += 300;
if (document.form1.gin.checked) total += 350;
if (document.form1.vodka.checked) total += 350;
if (document.form1.tequila.checked) total += 350;
if (document.form1.shelley.checked) total += 400;
if (document.form1.bourbon.checked) total += 450;
if (document.form1.RomaneeConti.checked) total += 9000;
subtotal = total;
if (document.form1.donate1.checked) total = total + subtotal * 0.05;
if (document.form1.donate2.checked) total = total + subtotal * 0.05;
if (document.form1.donate3.checked) total = total + subtotal * 0.10;
total = parseFloat(total).toFixed(0);
document.form1.total.value = total + "円";
}
</script>
</head>
<body>
<h2 align="center"><span class="header"><i>Pizza Delivery</i></span></h2>
<form name="form1" action="3.php" method="POST">
<table align="center" border="2" cellpadding=10 cellspacing=0 height=50 width=800 bgcolor="white">
<tr>
<td width="150">名前<font color="red">※必須</font>
</td>
<td width="0.1" bgcolor="orange" rowspan=16></td>
<td><input type="text" name="name" size=20 placeholder="山田 太郎 (例)" required></td>
</tr>
<tr>
<td>パスワード<font color="red">※必須</font>
</td>
<td><input type="password" name="password" size=20 required autocomplete="on">
</td>
</tr>
<tr>
<td>電子メール<font color="red">※必須</font>
</td>
<td><input type="text" name="mail" size=40 placeholder="aaaaaaa0123@mails.com (例)" required></td>
</tr>
<td>郵便番号<font color="red">※必須</font>
</td>
<td>〒<input type="text" size="10" maxlength="8" onkeyup="AjaxZip3.zip2addr(this,'','address','address')"
name="zip-code" placeholder="012-3456 (例)" required></td>
</tr>
<tr>
<td>住所<font color="red">※必須</font>
</td>
<td><input size="40" name="address" type="text" required> (自動入力されます)</td>
</tr>
<tr>
<td>部屋番号等</td>
<td><input size="40" name="room-number" type="text"></td>
</tr>
<tr>
<td>性別<font color="red">※必須</font>
</td>
<td>
<input type="radio" name="sex" value="man" required>男
<input type="radio" name="sex" value="woman" required>女
<input type="radio" name="sex" value="others" required>その他
</td>
</tr>
<tr>
<td>年齢<font color="red">※必須</font>
</td>
<td>
<select name="age" onchange="CanAlcohol()" required>
<option value="" disabled selected>選択して下さい</option>
<option value="under9">9歳以下</option>
<option value="10~19">10~19</option>
<option value="20~29">20~29</option>
<option value="30~39">30~39</option>
<option value="40~49">40~49</option>
<option value="50~59">50~59</option>
<option value="60~69">60~69</option>
<option value="70~79">70~79</option>
<option value="over80">80歳以上</option>
</select>
</td>
</tr>
<tr>
<td>ピザの大きさ<font color="red">※必須</font>
</td>
<td>
<input type="radio" name="size" value="big" onChange="calc()" required>大 1,400 円
<input type="radio" name="size" value="medium" onChange="calc()" required>中 1,200 円
<input type="radio" name="size" value="small" onChange="calc()" required>小 1,000 円
</td>
</tr>
<tr>
<td>トッピング</td>
<td><input type="checkbox" name="cheese" onChange="calc()">チーズ 120 円
<input type="checkbox" name="tomato" onChange="calc()">トマト 140 円
<input type="checkbox" name="bacon" onChange="calc()">ベーコン 160 円
<input type="checkbox" name="cauliflower" onChange="calc()">カリフラワー 160 円<br>
<input type="checkbox" name="sweetcorn" onChange="calc()">スイートコーン 180 円
<input type="checkbox" name="salami" onChange="calc()">サラミ 200 円
<input type="checkbox" name="pineapple" onChange="calc()">パイナップル 200 円
</td>
</tr>
<td>サイド<font color="red">※必須</font>
</td>
<td>
<input type="radio" name="side" value="potato" onChange="calc()" required>ポテト 500 円
<input type="radio" name="side" value="chicken" onChange="calc()" required>旨辛チキン 600 円
<input type="radio" name="side" value="none" onChange="calc()" required>無し
</td>
<tr>
<td>ソフトドリンク</td>
<td><input type="checkbox" name="milk" onChange="calc()">牛乳 100 円
<input type="checkbox" name="orange" onChange="calc()">オレンジジュース 100 円
<input type="checkbox" name="apple" onChange="calc()">アップルジュース 100 円<br>
<input type="checkbox" name="tea" onChange="calc()">お茶 120 円
<input type="checkbox" name="cola" onChange="calc()">コーラ 150 円
<input type="checkbox" name="sprite" onChange="calc()">スプライト 150 円
</td>
</tr>
<tr id="alcohol">
<td>アルコール</td>
<td>
<font color="red">※20歳未満の方の飲酒は法律によって禁止されています。</font>
<br> <input type="checkbox" name="ram" onChange="calc()">ラム 300 円
<input type="checkbox" name="gin" onChange="calc()">ジン 350 円
<input type="checkbox" name="vodka" onChange="calc()">ウォッカ 350 円
<input type="checkbox" name="tequila" onChange="calc()">テキーラ 350 円<br>
<input type="checkbox" name="shelley" onChange="calc()">シェリー 400 円
<input type="checkbox" name="bourbon" onChange="calc()">バーボン 450 円
<input type="checkbox" name="RomaneeConti" onChange="calc()">ロマネ・コンティ 9,000 円
</td>
</tr>
<tr>
<td>寄付</td>
<td>
<input type="checkbox" name="donate1" onChange="calc()">国際マリオ歌劇団 5%
<input type="checkbox" name="donate2" onChange="calc()">キノコスイミングスクール 5%
<input type="checkbox" name="donate3" onChange="calc()">ピーチ教会 10%
</td>
</tr>
<tr>
<td>要望</td>
<td><textarea name="request" rows=3 cols=40 placeholder="焼き方に要望があれば記入して下さい"></textarea></td>
</tr>
<tr>
<td>合計</td>
<td><input type="text" name="total" size=20 value="0円" readonly></td>
</tr>
</table>
<input type="hidden" name="uketsuke" value="j520329b@mails.cc.ehime-u.ac.jp">
<p align="center"><input type="reset" value=" クリア ">
<input type="submit" value="内容を確認する">
</p>
</form>
<div class="spacer"></div>
</body>
</html>