-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathupdate_book_chapters.php
More file actions
63 lines (52 loc) · 2.17 KB
/
Copy pathupdate_book_chapters.php
File metadata and controls
63 lines (52 loc) · 2.17 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
<?php
require_once("gb/mapper/ChapterMapper.php");
require_once("gb/controller/BookController.php");
$bookController = new gb\controller\BookController();
$bookController->process();
$title = "book_uri =" . $bookController->getSelectedBookUri();
$uri = $bookController->getSelectedBookUri();
require("template/top.tpl.php");
$uri = '"'.$uri.'"';
$chapterMapper = new gb\mapper\ChapterMapper($uri);
$allChapters = $chapterMapper->findAll();
?>
<form method="post">
<table style="width: 100%">
<tr>
<td colspan="2">
<table style="width: 100%">
<tr>
<td>Chapter</td>
<td style="width: 85%">
<select style="width: 50%" name="chapter" >
<option value="0">--------Chapter ---------- </option>
<?php
foreach($allChapters as $chapter) {
echo "<option value=\"", $chapter->getChapter_number(), "\">", $chapter->getChapter_number(), "</option>" ;
}
?>
</select>
</td>
</tr>
<tr>
<td>Old text:</td>
<td><textarea name="old_text" cols="60" rows="6">
<?php
?>
</textarea></td>
</tr>
<tr>
<td>New text:</td>
<td><textarea name="new_text" cols="60" rows="6"></textarea></td>
</tr>
<tr>
<td > </td>
<td><input type ="submit" name="update" value="Update" ></td>
</tr>
</table>
</td>
</table>
</form>
<?php
require("template/bottom.tpl.php");
?>