Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?
  2. /*
  3. * Copyright (C) 2008 Stefan Hajnoczi <stefanha@gmail.com>.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License as
  7. * published by the Free Software Foundation; either version 2 of the
  8. * License, or any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19. // The path to the errcode.py script.
  20. $ERRCODE_PATH = './errcode.py';
  21. ?>
  22. <html>
  23. <head>
  24. <title>iPXE Error Code Lookup</title>
  25. <style>
  26. body, pre, div, form, p, h2, b, tt {
  27. padding: 0;
  28. border: 0;
  29. margin: 0;
  30. }
  31. body {
  32. padding: 0.5em;
  33. width: 750px;
  34. font-family: sans-serif;
  35. }
  36. pre {
  37. margin: 0.2em;
  38. padding: 0.1em;
  39. background-color: #ddd;
  40. }
  41. form {
  42. margin: 0.2em;
  43. }
  44. div {
  45. margin: 0.2em;
  46. padding: 0.4em;
  47. border: 1px dashed black;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <?
  53. if (!empty($_REQUEST['e']) && preg_match('/^(0x)?[0-9a-f]{8}$/', $_REQUEST['e'])) {
  54. ?>
  55. <pre>
  56. <?
  57. system($ERRCODE_PATH . " " . $_REQUEST['e']);
  58. ?>
  59. </pre>
  60. <?
  61. }
  62. ?>
  63. <form action="" method="post">
  64. <label for="e">Error code:</label>
  65. <input type="text" name="e" id="e" value="0x12345678"></input>
  66. <input type="submit" value="Lookup"></input>
  67. </form>
  68. <div>
  69. <h2>Hint:</h2>
  70. <p>
  71. Firefox users can right-click on the <b>Error code</b>
  72. text box and select <b>Add a Keyword for this Search...</b>.
  73. Set <b>name</b> to <tt>iPXE Error Code Lookup</tt> and
  74. <b>keyword</b> to <tt>gxpe</tt> Then you can look up error
  75. codes by typing something like the following in your address
  76. bar: <tt>ipxe 0x3c018003</tt>
  77. <p>
  78. </div>
  79. </body>
  80. </html>