You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errcode.php 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?
  2. // The path to the errcode.py script.
  3. $ERRCODE_PATH = './errcode.py';
  4. ?>
  5. <html>
  6. <head>
  7. <title>gPXE Error Code Lookup</title>
  8. <style>
  9. body, pre, div, form, p, h2, b, tt {
  10. padding: 0;
  11. border: 0;
  12. margin: 0;
  13. }
  14. body {
  15. padding: 0.5em;
  16. width: 750px;
  17. font-family: sans-serif;
  18. }
  19. pre {
  20. margin: 0.2em;
  21. padding: 0.1em;
  22. background-color: #ddd;
  23. }
  24. form {
  25. margin: 0.2em;
  26. }
  27. div {
  28. margin: 0.2em;
  29. padding: 0.4em;
  30. border: 1px dashed black;
  31. }
  32. </style>
  33. </head>
  34. <body>
  35. <?
  36. if (!empty($_REQUEST['e']) && preg_match('/^(0x)?[0-9a-f]{8}$/', $_REQUEST['e'])) {
  37. ?>
  38. <pre>
  39. <?
  40. system($ERRCODE_PATH . " " . $_REQUEST['e']);
  41. ?>
  42. </pre>
  43. <?
  44. }
  45. ?>
  46. <form action="" method="post">
  47. <label for="e">Error code:</label>
  48. <input type="text" name="e" id="e" value="0x12345678"></input>
  49. <input type="submit" value="Lookup"></input>
  50. </form>
  51. <div>
  52. <h2>Hint:</h2>
  53. <p>
  54. Firefox users can right-click on the <b>Error code</b>
  55. text box and select <b>Add a Keyword for this Search...</b>.
  56. Set <b>name</b> to <tt>gPXE Error Code Lookup</tt> and
  57. <b>keyword</b> to <tt>gxpe</tt> Then you can look up error
  58. codes by typing something like the following in your address
  59. bar: <tt>gpxe 0x3c018003</tt>
  60. <p>
  61. </div>
  62. </body>
  63. </html>