Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | require_once(__DIR__."/../core.php"); |
| 3 | security::checkType(security::HYPERADMIN, security::METHOD_NOTFOUND); |
| 4 | |
| 5 | if (!security::checkParams("GET", [ |
| 6 | ["place", security::PARAM_ISINT] |
| 7 | ])) { |
| 8 | security::notFound(); |
| 9 | } |
| 10 | |
| 11 | $place = $_GET["place"]; |
| 12 | if (!in_array($place, help::$places)) security::notFound(); |
| 13 | |
| 14 | $url = help::get($place); |
| 15 | ?> |
| 16 | |
| 17 | <form action="dosethelpresource.php" method="POST" autocomplete="off"> |
| 18 | <input type="hidden" name="place" value="<?=(int)$place?>"> |
| 19 | <h4 class="mdl-dialog__title">Enlace de ayuda</h4> |
| 20 | <div class="mdl-dialog__content"> |
| 21 | <p><b>Lugar:</b> <?=security::htmlsafe(help::$placesName[$place] ?? "undefined")?></b></p> |
| 22 | <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label"> |
| 23 | <input class="mdl-textfield__input" type="url" name="url" id="url" autocomplete="off"<?=($url !== false ? ' value="'.security::htmlsafe($url).'"' : '')?>> |
| 24 | <label class="mdl-textfield__label" for="url">URL</label> |
| 25 | </div> |
| 26 | </div> |
| 27 | <div class="mdl-dialog__actions"> |
| 28 | <button type="submit" class="mdl-button mdl-js-button mdl-js-ripple-effect mdl-button--primary">Configurar</button> |
| 29 | <button data-dyndialog-close class="mdl-button mdl-js-button mdl-js-ripple-effect cancel">Cancelar</button> |
| 30 | </div> |
| 31 | </form> |