index.php (1081B)
1 <?php 2 declare(strict_types=1); 3 ?> 4 <!DOCTYPE html> 5 <html lang="en"> 6 <head> 7 <meta charset="utf-8"> 8 <title>Arboricx Web</title> 9 <script src="https://unpkg.com/htmx.org@2.0.4"></script> 10 </head> 11 <body> 12 <h1>Arboricx Bundle Runner</h1> 13 <form hx-post="eval.php" hx-target="#result" enctype="multipart/form-data"> 14 <p> 15 <label>Bundle (.arboricx)<br> 16 <input type="file" name="bundle" accept=".arboricx" required></label> 17 </p> 18 <p><label>Export name <input name="export" required value="id"></label></p> 19 <p><label>Result format <select name="format"><option>string</option><option>number</option><option>bool</option><option>bytes</option></select></label></p> 20 <?php for ($i = 0; $i < 5; $i++): ?> 21 <p> 22 <label>Arg <?= $i + 1 ?> <small>(ignored if empty)</small><br> 23 <input type="text" name="arg<?= $i ?>"></label> 24 </p> 25 <?php endfor; ?> 26 <p> 27 <button type="submit">Run</button> 28 </p> 29 </form> 30 <pre id="result"></pre> 31 </body> 32 </html>