forked from pmt-mcpe-me/plugingen-source
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editCmd.php
43 lines (42 loc) · 969 Bytes
/
editCmd.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
<?php
include_once dirname(__FILE__) . "/utils.php";
$proj = forceProject();
if(!isset($_GET["name"])){
redirect(".");
}
$name = strtolower($_GET["name"]);
if(!isset($proj->cmds[$name])){
echo "<pre>Error: Cannot find such command.</pre>";
http_response_code(404);
die;
}
$cmd = $proj->cmds[$name];
?>
<html>
<head>
<title>Edit Command | Plugin Generator</title>
<link rel="stylesheet" type="text/css" href="style/normal.css">
</head>
<body>
<h1>Edit Command <i>/<?= $name ?></i></h1>
<hr>
<table>
<tr>
<th>Basic Information</th>
<th>(Click to Edit)</th>
</tr>
<tr>
<td class="left">Description:</td>
<td class="right clickable editable" id="descEdit"><?= htmlspecialchars($cmd->desc) ?></td>
</tr>
<tr>
<td class="left">Usage:</td>
<td class="right clickable editable" id="usageEdit"><?= htmlspecialchars($cmd->usage) ?></td>
<!-- TODO add edit dialog -->
</tr>
</table>
<hr>
<h2>Executor</h2>
<?php include "footer.php"; ?>
</body>
</html>