質問編集履歴
1
ソースコード追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -193,3 +193,217 @@
|
|
193
193
|
phpのmysql系の関数は脆弱性があり、削除されたという情報をお聞きしました。
|
194
194
|
|
195
195
|
現状他の機能もこの状態で実装されており、書き換えればならないと思うのですが、小耳にはさむ程度でもよいので効率よく置き換える方法等ご存じであれば教えて頂ければと思います。
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
####追記
|
200
|
+
|
201
|
+
改めて見返すとわかりにくかったので、
|
202
|
+
|
203
|
+
メイン部分のソースコードそのまま貼ります
|
204
|
+
|
205
|
+
```
|
206
|
+
|
207
|
+
<div class="contents">
|
208
|
+
|
209
|
+
<!-- 1つ目のコンテンツ [開始] -->
|
210
|
+
|
211
|
+
<div id="modal-content-01" class="modal-content">
|
212
|
+
|
213
|
+
<!-- モーダルウィンドウのコンテンツ開始 -->
|
214
|
+
|
215
|
+
<p>1</p>
|
216
|
+
|
217
|
+
<p>「閉じる」か「背景」をクリックするとモーダルウィンドウを終了します。</p>
|
218
|
+
|
219
|
+
<p><a id="modal-close" class="button-link">閉じる</a></p>
|
220
|
+
|
221
|
+
<!-- モーダルウィンドウのコンテンツ終了 -->
|
222
|
+
|
223
|
+
</div>
|
224
|
+
|
225
|
+
<!-- 1つ目のコンテンツ [終了] -->
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<!-- 2つ目のコンテンツ [開始] -->
|
230
|
+
|
231
|
+
<div id="modal-content-02" class="modal-content">
|
232
|
+
|
233
|
+
<!-- モーダルウィンドウのコンテンツ開始 -->
|
234
|
+
|
235
|
+
<p><h2>顧客情報を選択してください</p>
|
236
|
+
|
237
|
+
<p><table>
|
238
|
+
|
239
|
+
<tr><th>ID</th><th>会社名</th><th>担当者様名</th><th>住所</th><th>電話番号</th><td>選択</td></tr>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<?php
|
244
|
+
|
245
|
+
$con = mysql_connect('localhost', 'root', 'パスワード') or die('error(connect)');
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
mysql_select_db('testdb', $con) or die('error(select_db)');
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
mysql_set_charset('utf8');
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
$sql = 'select * from kokyaku';
|
258
|
+
|
259
|
+
$result = mysql_query($sql, $con);
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
while ($row = mysql_fetch_array($result)) {
|
264
|
+
|
265
|
+
echo '<tr><td>' .$row['顧客ID'] . '</td><td>' .$row['coltd'] . '</td><td> ' .$row['担当者様名'].'</td><td>' .$row['住所']. '</td><td>' .$row['電話番号']. '</td><td><button type="button" class="btn">選択</button></td></tr>' ;
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
}
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
mysql_close($con);
|
274
|
+
|
275
|
+
?>
|
276
|
+
|
277
|
+
</table>
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
</p>
|
282
|
+
|
283
|
+
<p><a id="modal-close" class="button-link">閉じる</a></p>
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</p>
|
290
|
+
|
291
|
+
<p><a id="modal-close" class="button-link">閉じる</a></p>
|
292
|
+
|
293
|
+
<!-- モーダルウィンドウのコンテンツ終了 -->
|
294
|
+
|
295
|
+
</div>
|
296
|
+
|
297
|
+
<!-- 2つ目のコンテンツ [終了] -->
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<!-- 3つ目のコンテンツ [開始] -->
|
302
|
+
|
303
|
+
<div id="modal-content-03" class="modal-content">
|
304
|
+
|
305
|
+
<!-- モーダルウィンドウのコンテンツ開始 -->
|
306
|
+
|
307
|
+
<p>2つ目のモーダルウィンドウです。全体を囲むdiv要素に[id="modal-content-03"]が設定されています。</p>
|
308
|
+
|
309
|
+
<p>「閉じる」か「背景」をクリックするとモーダルウィンドウを終了します。</p>
|
310
|
+
|
311
|
+
<p><a id="modal-close" class="button-link">閉じる</a></p>
|
312
|
+
|
313
|
+
<!-- モーダルウィンドウのコンテンツ終了 -->
|
314
|
+
|
315
|
+
</div>
|
316
|
+
|
317
|
+
<!-- 3つ目のコンテンツ [終了] -->
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
<!-- 右カラム -->
|
324
|
+
|
325
|
+
<div id="main">
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
<h1>請求書作成</h1>
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
<!--テスト-->
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
<form action="" method="post">
|
340
|
+
|
341
|
+
<p>
|
342
|
+
|
343
|
+
<label for="">会社名</label>
|
344
|
+
|
345
|
+
<input type="text" name="company_name" />
|
346
|
+
|
347
|
+
</p>
|
348
|
+
|
349
|
+
<p>
|
350
|
+
|
351
|
+
<button type='submit'>更新</button>
|
352
|
+
|
353
|
+
</p>
|
354
|
+
|
355
|
+
</form>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
<!--テストここまで-->
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
<p><a class="modal-syncer button-link" data-target="modal-content-01">見積もり書のデータを参照する</a></p>
|
364
|
+
|
365
|
+
<p><a class="modal-syncer button-link" data-target="modal-content-02">顧客情報を自動入力する</a></p>
|
366
|
+
|
367
|
+
<p><a class="modal-syncer button-link" data-target="modal-content-03">商品情報を自動入力する</a></p>
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
<p><button type="button" class="modal-syncer button-lin" data-target="modal-content-02">顧客情報を一覧から入力する</button> <button type="button" class="modal-syncer button-lin" data-target="modal-content-01">見積書データを入力する</button>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
<form action = "kakunin.php" method="post">
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
<table><tr><th>会社名:</th><td><input type="text" name="coltd" size="45"></td><th>担当者様名:</th><td><input type="text" name="name" size="30"></td><th>郵便番号:</th><td><input type="text" name="znum" size="10"></td></tr>
|
380
|
+
|
381
|
+
<tr><th>住所:</th><td colspan="5"><input type="text" name="zyuusyo" size="100%"></td></tr></table>
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
<table>
|
386
|
+
|
387
|
+
<tr><td>*</td><td>商品名</td><td>数量</td><td>単価</td><td>金額</td><td>備考</td></tr>
|
388
|
+
|
389
|
+
<tr><td><button type="button" class="modal-syncer button-lin" data-target="modal-content-03">選択</button></td><td><input type="text" name="nm" size="40"></td><td><input type="text" size="2" name="kosuu" value="1"></td><td><input type="text" name="nm" size="7"></td><td><input type="text" name="nm" size="10"></td><td><input type="text" name="nm"></td></tr>
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
<tr><td><p>プレビュー</p></td>
|
396
|
+
|
397
|
+
<td><p><input type=submit name=send value="登録"><br></p></td></tr>
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
</table>
|
402
|
+
|
403
|
+
</form>
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
```
|