-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathforumListEdit.php
47 lines (43 loc) · 1.27 KB
/
forumListEdit.php
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
<?php
include("common.php");
$fileC = file("db/forumList.dat");
foreach ($fileC as $item)
{
$temp = new Forum($item);
if ($temp->getForumId() == $_GET['forumId'])
{
$forum = $temp;
}
}
outHtml1("Edit Foru");
?>
<!-- TinyMCE -->
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="tiny_mce_init.js"></script>
<?php
outHtml2("Edit Forum:","index.php");
?>
<form action="forumListEditExecute.php?forumId=<?php echo $forum->getForumId(); ?>" method="post">
<div id="forumDiv">
Forum Name:<br />
<input type="text" name="name" class="textboxes" value="<?php echo $forum->getForumName() ?>" /><br />
Forum Description:<br />
<div style="margin-top: 10px; margin-left: 5%;">
<textarea name="description" class="textboxes" style="width: 95%; height: 150px"><?php echo $forum->getDescription() ?></textarea><br />
</div>
<?php
if ($_GET['error'] == 1)
{
echo "<div class='error'>Please enter a forum name!</div>";
}
else if ($_GET['error'] == 2)
{
echo "<div class='error'>Please enter a forum description!</div>";
}
?>
<input type="submit" value="Update" />
</div>
</form>
<?php
outHtml3();
?>