質問編集履歴

1

エラーコードは出ていないデバックです。

2020/12/25 02:34

投稿

Satochika
Satochika

スコア6

test CHANGED
File without changes
test CHANGED
@@ -8,374 +8,364 @@
8
8
 
9
9
 
10
10
 
11
- ### 発生している問題・エラーメッセージ
11
+
12
+
13
+ ### 該当のソースコード
14
+
15
+
16
+
17
+ ```php
18
+
19
+ <?
20
+
21
+ session_start();
22
+
23
+
24
+
25
+ $args = $_SESSION['sendmail_content']['args'];
26
+
27
+ $errors = $_SESSION['errors'];
28
+
29
+ ?>
30
+
31
+
32
+
33
+ <!DOCTYPE html>
34
+
35
+ <html>
36
+
37
+ <head>
38
+
39
+
40
+
41
+ <style>
42
+
43
+ span.items{display: block; clear: both;}
44
+
45
+ .items > input[type=checkbox]:checked + span > label > .wpcf7-list-item-label:before {opacity:1; }
46
+
47
+ .items > input[type=checkbox] ~ .plans {display: none;}
48
+
49
+ .items > input[type=checkbox]:checked ~ .plans {display: block;}
50
+
51
+ #send-message {display: block; text-align: center; color: #f00;}
52
+
53
+ #send:not([disabled]) ~ #send-message {display: none;}
54
+
55
+ #send[disabled] ~ #send-button {
56
+
57
+ background-color: #ccc;
58
+
59
+ color: #333;
60
+
61
+ pointer-events: none;
62
+
63
+ }
64
+
65
+ .grecaptcha-badge {
66
+
67
+ bottom: 74px !important;
68
+
69
+ z-index: 1000;
70
+
71
+ }
72
+
73
+ </style>
74
+
75
+
76
+
77
+ </head>
78
+
79
+
80
+
81
+
82
+
83
+ ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
84
+
85
+
86
+
87
+
88
+
89
+ <article>
90
+
91
+ <section class="cta contact cf">
92
+
93
+ <div class="inner">
94
+
95
+ <div class="title sa sa-up"><h2>お問い合わせ<span>CONTACT</span></h2></div>
96
+
97
+ <div class="cta-box">
98
+
99
+ <form action="./send.php" method="post" class="contact-form">
100
+
101
+ <input type="hidden" name="entryPlan" value="お問い合わせ">
102
+
103
+ <div style="display: none;"></div>
104
+
105
+
106
+
107
+
108
+
109
+ ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
110
+
111
+
112
+
113
+
114
+
115
+ <dl>
116
+
117
+ <dt>会社名<span class="hissu">必須</span></dt>
118
+
119
+ <dd><input type="text" name="company" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="例)株式会社○○○○" required></dd>
120
+
121
+ </dl>
122
+
123
+ <dl>
124
+
125
+ <dt>氏名<span class="hissu">必須</span></dt>
126
+
127
+ <dd>
128
+
129
+ <input type="text" name="fname" value="" style="width: 49%;" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="Family name" required>
130
+
131
+ <input type="text" name="lname" value="" style="width: 49%;" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="First name" required>
132
+
133
+ </dd>
134
+
135
+ </dl>
136
+
137
+ <dl>
138
+
139
+ <dt>メールアドレス<span class="hissu">必須</span></dt>
140
+
141
+ <dd><input type="text" name="email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-email" aria-invalid="false" placeholder="info@○○○○.com" required></dd>
142
+
143
+ </dl>
144
+
145
+ <dl>
146
+
147
+ <dt>電話番号<span class="hissu">必須</span></dt>
148
+
149
+ <dd><span class="wpcf7-form-control-wrap your-tel"><input type="tel" name="tel" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-tel" aria-invalid="false" placeholder="090○○○○○○○○" required></span></dd>
150
+
151
+ </dl>
152
+
153
+ <dl>
154
+
155
+ <dt>備考<span class="nini">任意</span></dt>
156
+
157
+ <dd><span class="wpcf7-form-control-wrap your-tel"><textarea name="textarea" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder=""></textarea></dd>
158
+
159
+ </dl>
160
+
161
+
162
+
163
+
164
+
165
+ ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
166
+
167
+
168
+
169
+
170
+
171
+ <dl class="last-dl">
172
+
173
+ <dt>個人情報<span class="hissu">必須</span></dt>
174
+
175
+ <dd>
176
+
177
+ <span class="wpcf7-form-control-wrap checkbox">
178
+
179
+ <span style="display: <?= $args["privacy"] ? "none" : "block" ?>;" class="privacy-leadarea"><a data-remodal-target="privacy-remodal" href="javascript:void(0);" style="color:#f00; text-decoration:underline;">個人情報の取り扱いについて確認</a>する。</span>
180
+
181
+ <span style="display: <?= $args["privacy"] ? "none" : "block" ?>;" class="privacy-leadarea">※個人情報の取り扱いについてのご確認は必須です。</span>
182
+
183
+ <span style="margin-top: 20px; display: <?= $args["privacy"] ? "block" : "none"; ?>" class="wpcf7-form-control wpcf7-checkbox wpcf7-validates-as-required privacy-checkarea">
184
+
185
+ <span class="wpcf7-list-item first">
186
+
187
+ <label>
188
+
189
+ <input type="checkbox" name="privacy" value="1"<? if($args["privacy"]) { echo " checked"; } ?>>
190
+
191
+ <span class="wpcf7-list-item-label" style="white-space:nowrap;"><a data-remodal-target="privacy-remodal" href="javascript:void(0);">個人情報の取り扱いについて</a>同意する</span>
192
+
193
+ </label>
194
+
195
+ </span>
196
+
197
+ </span>
198
+
199
+ </span>
200
+
201
+ </dd>
202
+
203
+ </dl>
204
+
205
+ <p>
206
+
207
+ <input id="send" type="submit" value="送信" class="hidden wpcf7-form-control wpcf7-submit" style="display:none;" disabled="disabled">
208
+
209
+ <button id="send-button" class="g-recaptcha wpcf7-form-control wpcf7-submit" data-sitekey="6Le4maYZAAAAAAV-xHnXEuSZpKuiJpaeGFBcF-6o" data-callback="onSubmit" data-action="submit">送信<span class="ajax-loader"></span></button>
210
+
211
+ <span id="send-message">必須項目を全て入力するとボタンが押せます。</span>
212
+
213
+ </p>
214
+
215
+ </form>
216
+
217
+   </div>
218
+
219
+  </div>
220
+
221
+ </section>
222
+
223
+
224
+
225
+ ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
226
+
227
+
228
+
229
+
230
+
231
+ <script>
232
+
233
+
234
+
235
+ $('.privacy').on('scroll', function(){
236
+
237
+ var innerHeight = $('.privacy-inner').innerHeight();
238
+
239
+ var outerHeight = $('.privacy').innerHeight();
240
+
241
+ var outerBottom = innerHeight - outerHeight - 40; // padding
242
+
243
+
244
+
245
+ if (outerBottom <= $('.privacy').scrollTop()) {
246
+
247
+ $('.privacy-submit').prop('disabled', false);
248
+
249
+ }
250
+
251
+ });
252
+
253
+ $('.privacy-submit').click(function() {
254
+
255
+ $('.privacy-leadarea').hide();
256
+
257
+ $('.privacy-checkarea').show();
258
+
259
+ $('input[name="privacy"]').prop('checked', true);
260
+
261
+ $('input[name="privacy"]').trigger('change');
262
+
263
+
264
+
265
+ $('.privacy-close').trigger('click');
266
+
267
+ });
268
+
269
+ $('input[name="privacy"]').change(function() {
270
+
271
+ checkAgreement();
272
+
273
+ });
274
+
275
+
276
+
277
+ function checkAgreement() {
278
+
279
+ var agreement = $('input[name="privacy"]').prop('checked');
280
+
281
+ $('#send').prop('disabled', !agreement);
282
+
283
+ }
284
+
285
+ $('form input').change(function() {
286
+
287
+ checkValidation();
288
+
289
+ });
290
+
291
+ function checkValidation() {
292
+
293
+ var form = $('form').serializeArray();
294
+
295
+ var formData = [];
296
+
297
+ for (var i in form) {
298
+
299
+ formData[form[i]["name"]] = form[i]["value"];
300
+
301
+ }
302
+
303
+ $('#send').removeClass("disabled");
304
+
305
+ $('form input[required]').each(function() {
306
+
307
+ if (!formData[$(this).attr('name')]) {
308
+
309
+ $('#send').addClass("disabled");
310
+
311
+ }
312
+
313
+ });
314
+
315
+ }
316
+
317
+ checkValidation();
318
+
319
+ </script>
320
+
321
+ <script src="https://player.vimeo.com/api/player.js"></script>
322
+
323
+ <script>
324
+
325
+ $(function() {
326
+
327
+ $('.btnBlue').click(function() {
328
+
329
+ var iframe = document.querySelector($(this).data('player'));
330
+
331
+ var player = new Vimeo.Player(iframe);
332
+
333
+
334
+
335
+ $(this).parents('ul').find('.btnBlue').removeClass('active');
336
+
337
+ $(this).addClass('active');
338
+
339
+
340
+
341
+ player.setPlaybackRate($(this).data('speed'));
342
+
343
+ });
344
+
345
+ });
346
+
347
+ </script>
348
+
349
+ <script src="https://www.google.com/recaptcha/api.js"></script>
350
+
351
+ <script>
352
+
353
+ function onSubmit(token) {
354
+
355
+ $("#form").find("input[type=submit]").click();
356
+
357
+ }
358
+
359
+ </script>
360
+
361
+ </html>
362
+
363
+
12
364
 
13
365
 
14
366
 
15
367
  ```
16
368
 
17
- エラーメッセージ
18
-
19
- ```
20
-
21
-
22
-
23
- ### 該当のソースコード
24
-
25
-
26
-
27
- ```php
28
-
29
- <?
30
-
31
- session_start();
32
-
33
-
34
-
35
- $args = $_SESSION['sendmail_content']['args'];
36
-
37
- $errors = $_SESSION['errors'];
38
-
39
- ?>
40
-
41
-
42
-
43
- <!DOCTYPE html>
44
-
45
- <html>
46
-
47
- <head>
48
-
49
-
50
-
51
- <style>
52
-
53
- span.items{display: block; clear: both;}
54
-
55
- .items > input[type=checkbox]:checked + span > label > .wpcf7-list-item-label:before {opacity:1; }
56
-
57
- .items > input[type=checkbox] ~ .plans {display: none;}
58
-
59
- .items > input[type=checkbox]:checked ~ .plans {display: block;}
60
-
61
- #send-message {display: block; text-align: center; color: #f00;}
62
-
63
- #send:not([disabled]) ~ #send-message {display: none;}
64
-
65
- #send[disabled] ~ #send-button {
66
-
67
- background-color: #ccc;
68
-
69
- color: #333;
70
-
71
- pointer-events: none;
72
-
73
- }
74
-
75
- .grecaptcha-badge {
76
-
77
- bottom: 74px !important;
78
-
79
- z-index: 1000;
80
-
81
- }
82
-
83
- </style>
84
-
85
-
86
-
87
- </head>
88
-
89
-
90
-
91
-
92
-
93
- ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
94
-
95
-
96
-
97
-
98
-
99
- <article>
100
-
101
- <section class="cta contact cf">
102
-
103
- <div class="inner">
104
-
105
- <div class="title sa sa-up"><h2>お問い合わせ<span>CONTACT</span></h2></div>
106
-
107
- <div class="cta-box">
108
-
109
- <form action="./send.php" method="post" class="contact-form">
110
-
111
- <input type="hidden" name="entryPlan" value="お問い合わせ">
112
-
113
- <div style="display: none;"></div>
114
-
115
-
116
-
117
-
118
-
119
- ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
120
-
121
-
122
-
123
-
124
-
125
- <dl>
126
-
127
- <dt>会社名<span class="hissu">必須</span></dt>
128
-
129
- <dd><input type="text" name="company" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="例)株式会社○○○○" required></dd>
130
-
131
- </dl>
132
-
133
- <dl>
134
-
135
- <dt>氏名<span class="hissu">必須</span></dt>
136
-
137
- <dd>
138
-
139
- <input type="text" name="fname" value="" style="width: 49%;" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="Family name" required>
140
-
141
- <input type="text" name="lname" value="" style="width: 49%;" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="First name" required>
142
-
143
- </dd>
144
-
145
- </dl>
146
-
147
- <dl>
148
-
149
- <dt>メールアドレス<span class="hissu">必須</span></dt>
150
-
151
- <dd><input type="text" name="email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-email" aria-invalid="false" placeholder="info@○○○○.com" required></dd>
152
-
153
- </dl>
154
-
155
- <dl>
156
-
157
- <dt>電話番号<span class="hissu">必須</span></dt>
158
-
159
- <dd><span class="wpcf7-form-control-wrap your-tel"><input type="tel" name="tel" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-tel" aria-invalid="false" placeholder="090○○○○○○○○" required></span></dd>
160
-
161
- </dl>
162
-
163
- <dl>
164
-
165
- <dt>備考<span class="nini">任意</span></dt>
166
-
167
- <dd><span class="wpcf7-form-control-wrap your-tel"><textarea name="textarea" cols="40" rows="10" class="wpcf7-form-control wpcf7-textarea wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder=""></textarea></dd>
168
-
169
- </dl>
170
-
171
-
172
-
173
-
174
-
175
- ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
176
-
177
-
178
-
179
-
180
-
181
- <dl class="last-dl">
182
-
183
- <dt>個人情報<span class="hissu">必須</span></dt>
184
-
185
- <dd>
186
-
187
- <span class="wpcf7-form-control-wrap checkbox">
188
-
189
- <span style="display: <?= $args["privacy"] ? "none" : "block" ?>;" class="privacy-leadarea"><a data-remodal-target="privacy-remodal" href="javascript:void(0);" style="color:#f00; text-decoration:underline;">個人情報の取り扱いについて確認</a>する。</span>
190
-
191
- <span style="display: <?= $args["privacy"] ? "none" : "block" ?>;" class="privacy-leadarea">※個人情報の取り扱いについてのご確認は必須です。</span>
192
-
193
- <span style="margin-top: 20px; display: <?= $args["privacy"] ? "block" : "none"; ?>" class="wpcf7-form-control wpcf7-checkbox wpcf7-validates-as-required privacy-checkarea">
194
-
195
- <span class="wpcf7-list-item first">
196
-
197
- <label>
198
-
199
- <input type="checkbox" name="privacy" value="1"<? if($args["privacy"]) { echo " checked"; } ?>>
200
-
201
- <span class="wpcf7-list-item-label" style="white-space:nowrap;"><a data-remodal-target="privacy-remodal" href="javascript:void(0);">個人情報の取り扱いについて</a>同意する</span>
202
-
203
- </label>
204
-
205
- </span>
206
-
207
- </span>
208
-
209
- </span>
210
-
211
- </dd>
212
-
213
- </dl>
214
-
215
- <p>
216
-
217
- <input id="send" type="submit" value="送信" class="hidden wpcf7-form-control wpcf7-submit" style="display:none;" disabled="disabled">
218
-
219
- <button id="send-button" class="g-recaptcha wpcf7-form-control wpcf7-submit" data-sitekey="6Le4maYZAAAAAAV-xHnXEuSZpKuiJpaeGFBcF-6o" data-callback="onSubmit" data-action="submit">送信<span class="ajax-loader"></span></button>
220
-
221
- <span id="send-message">必須項目を全て入力するとボタンが押せます。</span>
222
-
223
- </p>
224
-
225
- </form>
226
-
227
-   </div>
228
-
229
-  </div>
230
-
231
- </section>
232
-
233
-
234
-
235
- ーーーーーーーーーーーーーーーーーーーーー中略ーーーーーーーーーーーーーーーーーーーーー
236
-
237
-
238
-
239
-
240
-
241
- <script>
242
-
243
-
244
-
245
- $('.privacy').on('scroll', function(){
246
-
247
- var innerHeight = $('.privacy-inner').innerHeight();
248
-
249
- var outerHeight = $('.privacy').innerHeight();
250
-
251
- var outerBottom = innerHeight - outerHeight - 40; // padding
252
-
253
-
254
-
255
- if (outerBottom <= $('.privacy').scrollTop()) {
256
-
257
- $('.privacy-submit').prop('disabled', false);
258
-
259
- }
260
-
261
- });
262
-
263
- $('.privacy-submit').click(function() {
264
-
265
- $('.privacy-leadarea').hide();
266
-
267
- $('.privacy-checkarea').show();
268
-
269
- $('input[name="privacy"]').prop('checked', true);
270
-
271
- $('input[name="privacy"]').trigger('change');
272
-
273
-
274
-
275
- $('.privacy-close').trigger('click');
276
-
277
- });
278
-
279
- $('input[name="privacy"]').change(function() {
280
-
281
- checkAgreement();
282
-
283
- });
284
-
285
-
286
-
287
- function checkAgreement() {
288
-
289
- var agreement = $('input[name="privacy"]').prop('checked');
290
-
291
- $('#send').prop('disabled', !agreement);
292
-
293
- }
294
-
295
- $('form input').change(function() {
296
-
297
- checkValidation();
298
-
299
- });
300
-
301
- function checkValidation() {
302
-
303
- var form = $('form').serializeArray();
304
-
305
- var formData = [];
306
-
307
- for (var i in form) {
308
-
309
- formData[form[i]["name"]] = form[i]["value"];
310
-
311
- }
312
-
313
- $('#send').removeClass("disabled");
314
-
315
- $('form input[required]').each(function() {
316
-
317
- if (!formData[$(this).attr('name')]) {
318
-
319
- $('#send').addClass("disabled");
320
-
321
- }
322
-
323
- });
324
-
325
- }
326
-
327
- checkValidation();
328
-
329
- </script>
330
-
331
- <script src="https://player.vimeo.com/api/player.js"></script>
332
-
333
- <script>
334
-
335
- $(function() {
336
-
337
- $('.btnBlue').click(function() {
338
-
339
- var iframe = document.querySelector($(this).data('player'));
340
-
341
- var player = new Vimeo.Player(iframe);
342
-
343
-
344
-
345
- $(this).parents('ul').find('.btnBlue').removeClass('active');
346
-
347
- $(this).addClass('active');
348
-
349
-
350
-
351
- player.setPlaybackRate($(this).data('speed'));
352
-
353
- });
354
-
355
- });
356
-
357
- </script>
358
-
359
- <script src="https://www.google.com/recaptcha/api.js"></script>
360
-
361
- <script>
362
-
363
- function onSubmit(token) {
364
-
365
- $("#form").find("input[type=submit]").click();
366
-
367
- }
368
-
369
- </script>
370
-
371
- </html>
372
-
373
-
374
-
375
-
376
-
377
- ```
378
-
379
369
 
380
370
 
381
371