Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | <?php |
| 2 | require_once("core.php"); |
| 3 | security::checkType(security::ADMIN); |
| 4 | |
| 5 | if (!security::checkParams("POST", [ |
| 6 | ["place", security::PARAM_ISINT], |
| 7 | ["url", security::PARAM_ISSET] |
| 8 | ])) { |
| 9 | security::go("help.php?msg=empty"); |
| 10 | } |
| 11 | |
| 12 | $status = help::set($_POST["place"], $_POST["url"]); |
| 13 | switch ($status) { |
| 14 | case 0: |
| 15 | security::go("help.php?msg=success"); |
| 16 | break; |
| 17 | |
| 18 | case 1: |
| 19 | security::go("help.php?msg=invalidurl"); |
| 20 | break; |
| 21 | |
| 22 | default: |
| 23 | security::go("help.php?msg=unexpected"); |
| 24 | } |