質問するログイン新規登録

質問編集履歴

1

ソースコード追加

2016/07/18 04:23

投稿

AY6M_
AY6M_

スコア14

title CHANGED
File without changes
body CHANGED
@@ -95,4 +95,111 @@
95
95
  ####余談ですが...
96
96
 
97
97
  phpのmysql系の関数は脆弱性があり、削除されたという情報をお聞きしました。
98
- 現状他の機能もこの状態で実装されており、書き換えればならないと思うのですが、小耳にはさむ程度でもよいので効率よく置き換える方法等ご存じであれば教えて頂ければと思います。
98
+ 現状他の機能もこの状態で実装されており、書き換えればならないと思うのですが、小耳にはさむ程度でもよいので効率よく置き換える方法等ご存じであれば教えて頂ければと思います。
99
+
100
+ ####追記
101
+ 改めて見返すとわかりにくかったので、
102
+ メイン部分のソースコードそのまま貼ります
103
+ ```
104
+ <div class="contents">
105
+ <!-- 1つ目のコンテンツ [開始] -->
106
+ <div id="modal-content-01" class="modal-content">
107
+ <!-- モーダルウィンドウのコンテンツ開始 -->
108
+ <p>1</p>
109
+ <p>「閉じる」か「背景」をクリックするとモーダルウィンドウを終了します。</p>
110
+ <p><a id="modal-close" class="button-link">閉じる</a></p>
111
+ <!-- モーダルウィンドウのコンテンツ終了 -->
112
+ </div>
113
+ <!-- 1つ目のコンテンツ [終了] -->
114
+
115
+ <!-- 2つ目のコンテンツ [開始] -->
116
+ <div id="modal-content-02" class="modal-content">
117
+ <!-- モーダルウィンドウのコンテンツ開始 -->
118
+ <p><h2>顧客情報を選択してください</p>
119
+ <p><table>
120
+ <tr><th>ID</th><th>会社名</th><th>担当者様名</th><th>住所</th><th>電話番号</th><td>選択</td></tr>
121
+
122
+ <?php
123
+ $con = mysql_connect('localhost', 'root', 'パスワード') or die('error(connect)');
124
+
125
+ mysql_select_db('testdb', $con) or die('error(select_db)');
126
+
127
+ mysql_set_charset('utf8');
128
+
129
+ $sql = 'select * from kokyaku';
130
+ $result = mysql_query($sql, $con);
131
+
132
+ while ($row = mysql_fetch_array($result)) {
133
+ 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>' ;
134
+
135
+ }
136
+
137
+ mysql_close($con);
138
+ ?>
139
+ </table>
140
+
141
+ </p>
142
+ <p><a id="modal-close" class="button-link">閉じる</a></p>
143
+
144
+
145
+ </p>
146
+ <p><a id="modal-close" class="button-link">閉じる</a></p>
147
+ <!-- モーダルウィンドウのコンテンツ終了 -->
148
+ </div>
149
+ <!-- 2つ目のコンテンツ [終了] -->
150
+
151
+ <!-- 3つ目のコンテンツ [開始] -->
152
+ <div id="modal-content-03" class="modal-content">
153
+ <!-- モーダルウィンドウのコンテンツ開始 -->
154
+ <p>2つ目のモーダルウィンドウです。全体を囲むdiv要素に[id="modal-content-03"]が設定されています。</p>
155
+ <p>「閉じる」か「背景」をクリックするとモーダルウィンドウを終了します。</p>
156
+ <p><a id="modal-close" class="button-link">閉じる</a></p>
157
+ <!-- モーダルウィンドウのコンテンツ終了 -->
158
+ </div>
159
+ <!-- 3つ目のコンテンツ [終了] -->
160
+
161
+
162
+ <!-- 右カラム -->
163
+ <div id="main">
164
+
165
+ <h1>請求書作成</h1>
166
+
167
+
168
+ <!--テスト-->
169
+
170
+ <form action="" method="post">
171
+ <p>
172
+ <label for="">会社名</label>
173
+ <input type="text" name="company_name" />
174
+ </p>
175
+ <p>
176
+ <button type='submit'>更新</button>
177
+ </p>
178
+ </form>
179
+
180
+ <!--テストここまで-->
181
+
182
+ <p><a class="modal-syncer button-link" data-target="modal-content-01">見積もり書のデータを参照する</a></p>
183
+ <p><a class="modal-syncer button-link" data-target="modal-content-02">顧客情報を自動入力する</a></p>
184
+ <p><a class="modal-syncer button-link" data-target="modal-content-03">商品情報を自動入力する</a></p>
185
+
186
+ <p><button type="button" class="modal-syncer button-lin" data-target="modal-content-02">顧客情報を一覧から入力する</button>&nbsp;<button type="button" class="modal-syncer button-lin" data-target="modal-content-01">見積書データを入力する</button>
187
+
188
+ <form action = "kakunin.php" method="post">
189
+
190
+ <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>
191
+ <tr><th>住所:</th><td colspan="5"><input type="text" name="zyuusyo" size="100%"></td></tr></table>
192
+
193
+ <table>
194
+ <tr><td>*</td><td>商品名</td><td>数量</td><td>単価</td><td>金額</td><td>備考</td></tr>
195
+ <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>
196
+
197
+
198
+ <tr><td><p>プレビュー</p></td>
199
+ <td><p><input type=submit name=send value="登録"><br></p></td></tr>
200
+
201
+ </table>
202
+ </form>
203
+
204
+
205
+ ```