質問編集履歴

1

jspの追記

2016/06/21 03:01

投稿

l_l_l_l_l_l_l_l
l_l_l_l_l_l_l_l

スコア38

test CHANGED
File without changes
test CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  ###JSP(book_kanri.jsp)
28
28
 
29
- ```ここに言語を入力
29
+ ```java
30
30
 
31
31
  <%@ page contentType="text/html; charset=UTF-8"
32
32
 
@@ -168,8 +168,254 @@
168
168
 
169
169
  </form>
170
170
 
171
-
171
+ <br>
172
+
173
+
174
+
172
-
175
+ <br>
176
+
177
+ <form method="POST" action="book_memo">
178
+
179
+
180
+
181
+ <p>
182
+
183
+ 書籍ID
184
+
185
+ <select name="book_no">
186
+
187
+ <c:forEach var="row" items="${rs2.rows}">
188
+
189
+ <option>${row.book_no}</option>
190
+
191
+ </c:forEach>
192
+
193
+ </select>
194
+
195
+ </p>
196
+
197
+ <div>
198
+
199
+ 備考<input type="text" name="note" />
200
+
201
+ </div>
202
+
203
+ <br>
204
+
205
+
206
+
207
+ <INPUT style="color:white;
208
+
209
+ background-color:D57200;" type="submit" value="登録" />
210
+
211
+ </form>
212
+
213
+ <br>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+ <table class="tbl_01" border="1">
222
+
223
+ <tr>
224
+
225
+ <th>書籍ID</th>
226
+
227
+ <th>書籍名</th>
228
+
229
+ <th>ジャンル</th>
230
+
231
+ <th>貸出</th>
232
+
233
+ <th>貸出変更</th>
234
+
235
+ <th>削除</th>
236
+
237
+ <th>備考(メモ)</th>
238
+
239
+ </tr>
240
+
241
+ <tr>
242
+
243
+ <%
244
+
245
+ while (rs.next()) {
246
+
247
+ %>
248
+
249
+ <td><%=rs.getString("book_no")%></td>
250
+
251
+ <td><%=rs.getString("book_name")%></td>
252
+
253
+ <td><%=rs.getString("genre_name")%></td>
254
+
255
+ <td>
256
+
257
+ <%
258
+
259
+ String str = rs.getString("state");
260
+
261
+ if ("1".equals(str)) {
262
+
263
+ %>○<%
264
+
265
+ } else {
266
+
267
+ %>×<%
268
+
269
+ }
270
+
271
+ %>
272
+
273
+ </td>
274
+
275
+
276
+
277
+ <%
278
+
279
+ if ("1".equals(str)) {
280
+
281
+ %><td><form method="POST" action="kano">
282
+
283
+
284
+
285
+ <input type="hidden" name="id" value="<%=rs.getString("book_no")%>">
286
+
287
+ <button class="button" type="submit">不可へ</button>
288
+
289
+ </form></td>
290
+
291
+ <%
292
+
293
+ } else {
294
+
295
+ %>
296
+
297
+ <td><form method="POST" action="huka">
298
+
299
+ <input type="hidden" name="id" value="<%=rs.getString("book_no")%>">
300
+
301
+ <button class="button" type="submit">可能へ</button>
302
+
303
+ </form></td>
304
+
305
+ <%
306
+
307
+ }
308
+
309
+ %>
310
+
311
+ <td><form method="POST" action="delete_book">
312
+
313
+ <input type="hidden" name="user_edit" value="<%=rs.getString("book_no")%>">
314
+
315
+ <button class="button" type="submit">削除</button>
316
+
317
+ </form></td>
318
+
319
+
320
+
321
+ <td><%
322
+
323
+ String memo = rs.getString("note");
324
+
325
+ if ("".equals(memo)) {
326
+
327
+ %>-<%
328
+
329
+ } else if ("null".equals(memo)){
330
+
331
+ %>-<%
332
+
333
+ }else{
334
+
335
+ %><%=rs.getString("note")%>
336
+
337
+ <%} %></td>
338
+
339
+
340
+
341
+
342
+
343
+ </tr>
344
+
345
+ <%
346
+
347
+ }
348
+
349
+ %>
350
+
351
+ </table>
352
+
353
+ <br>
354
+
355
+ <form action="kanri_mypage.jsp">
356
+
173
- --------------------------------以下略-----------------------------------------------------------------
357
+ <input style="color: white; background-color: D57200;" type="submit"
358
+
359
+ name="mypage" value="TOPページ">
360
+
361
+
362
+
363
+ </form>
364
+
365
+
366
+
367
+ <form action="book_resurrection.jsp">
368
+
369
+ <input style="color: white; background-color: D57200;" type="submit"
370
+
371
+ name="reset2" value="削除済書籍編集">
372
+
373
+ </form>
374
+
375
+ <%
376
+
377
+ } catch (Exception e) {
378
+
379
+ throw new ServletException(e);
380
+
381
+ } finally {
382
+
383
+ try {
384
+
385
+ if (rs != null) {
386
+
387
+ rs.close();
388
+
389
+ }
390
+
391
+ if (ps != null) {
392
+
393
+ ps.close();
394
+
395
+ }
396
+
397
+ if (con != null) {
398
+
399
+ con.close();
400
+
401
+ }
402
+
403
+ } catch (Exception e) {
404
+
405
+ }
406
+
407
+ }
408
+
409
+ %>
410
+
411
+ <c:if test="${!empty requestScope['errorMessage']}">
412
+
413
+ <div>${requestScope['errorMessage']}</div>
414
+
415
+ </c:if>
416
+
417
+ </body>
418
+
419
+ </html>
174
420
 
175
421
  ```