-
Notifications
You must be signed in to change notification settings - Fork 0
/
editpora.php
73 lines (65 loc) · 1.91 KB
/
editpora.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
// AcmlmBoard XD - Points of Required Attention editing page
// Access: administrators
include("lib/common.php");
$title = __("Points of Required Attention");
AssertForbidden("editPoRA");
if($loguser['powerlevel'] < 3)
Kill(__("You must be an administrator to edit the Points of Required Attention."));
$key = hash('sha256', "{$loguserid},{$loguser['pss']},{$salt}");
if (isset($_POST['action']) && $key != $_POST['key'])
Kill(__("No."));
if($_POST['action'] == __("Edit"))
{
//TidyPost($_POST['text']);
$qPora = "update misc set porabox = '".justEscape($_POST['text'])."', poratitle = '".justEscape($_POST['title'])."'";
$rPora = Query($qPora);
Report("[b]".$loguser['name']."[/] edited the PoRA.", 1);
Redirect(__("Edited!"), "./", __("the main page"));
}
write(
"
<div class=\"PoRT\">
<div class=\"errort\">
<strong id=\"previewtitle\">
{0}
</strong>
</div>
<div class=\"errorc cell2 left\" id=\"previewtext\">
{1}
</div>
</div>
<form action=\"editpora.php\" method=\"post\">
<table id=\"t\" class=\"outline margin width50\">
<tr class=\"header1\">
<th colspan=\"2\">
".__("PoRA Editor")."
</th>
</tr>
<tr class=\"cell0\">
<td>
".__("Title (plain)")."
</td>
<td>
<input type=\"text\" name=\"title\" id=\"title\" maxlength=\"256\" style=\"width: 80%;\" value=\"{2}\" />
</td>
</tr>
<tr class=\"cell1\">
<td>
".__("Content (HTML)")."
</td>
<td style=\"width: 80%;\">
<textarea name=\"text\" rows=\"16\" style=\"width: 97%;\" id=\"editbox\" onkeyup=\"startPoraUpdate()\">{3}</textarea>
</td>
</tr>
<tr class=\"cell2\">
<td></td>
<td>
<input type=\"submit\" name=\"action\" value=\"".__("Edit")."\" />
<input type=\"hidden\" name=\"key\" value=\"{4}\" />
</td>
</tr>
</table>
</form>
", $misc['poratitle'], $misc['porabox'], htmlval($misc['poratitle']), htmlval($misc['porabox']), $key);
?>