aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@gmail.com>2008-05-10 14:29:40 +0100
committerMichael Brown <mcb30@etherboot.org>2008-05-20 20:27:52 +0100
commitce298a9628b0f78631a326c1c60b9c8e990f23f8 (patch)
tree2195be5f08f09326ca104b4ad571f41526e6b702 /contrib
parent43b04236ec7dd8ae39ed4b8bb14d57cc321ffd45 (diff)
downloadipxe-ce298a9628b0f78631a326c1c60b9c8e990f23f8.zip
ipxe-ce298a9628b0f78631a326c1c60b9c8e990f23f8.tar.gz
ipxe-ce298a9628b0f78631a326c1c60b9c8e990f23f8.tar.bz2
[Contribs] Add a web interface for looking up error codes.
Add a PHP script to act as a web interface for looking up error codes.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/errcode/errcode.php65
1 files changed, 65 insertions, 0 deletions
diff --git a/contrib/errcode/errcode.php b/contrib/errcode/errcode.php
new file mode 100644
index 0000000..d7c1dd0
--- /dev/null
+++ b/contrib/errcode/errcode.php
@@ -0,0 +1,65 @@
+<?
+// The path to the errcode.py script.
+$ERRCODE_PATH = './errcode.py';
+?>
+
+<html>
+ <head>
+ <title>gPXE Error Code Lookup</title>
+ <style>
+ body, pre, div, form, p, h2, b, tt {
+ padding: 0;
+ border: 0;
+ margin: 0;
+ }
+ body {
+ padding: 0.5em;
+ width: 750px;
+ font-family: sans-serif;
+ }
+ pre {
+ margin: 0.2em;
+ padding: 0.1em;
+ background-color: #ddd;
+ }
+ form {
+ margin: 0.2em;
+ }
+ div {
+ margin: 0.2em;
+ padding: 0.4em;
+ border: 1px dashed black;
+ }
+ </style>
+ </head>
+ <body>
+<?
+if (!empty($_REQUEST['e']) && preg_match('/^(0x)?[0-9a-f]{8}$/', $_REQUEST['e'])) {
+?>
+ <pre>
+<?
+ system($ERRCODE_PATH . " " . $_REQUEST['e']);
+?>
+ </pre>
+<?
+}
+?>
+ <form action="" method="post">
+ <label for="e">Error code:</label>
+ <input type="text" name="e" id="e" value="0x12345678"></input>
+ <input type="submit" value="Lookup"></input>
+ </form>
+
+ <div>
+ <h2>Hint:</h2>
+ <p>
+ Firefox users can right-click on the <b>Error code</b>
+ text box and select <b>Add a Keyword for this Search...</b>.
+ Set <b>name</b> to <tt>gPXE Error Code Lookup</tt> and
+ <b>keyword</b> to <tt>gxpe</tt> Then you can look up error
+ codes by typing something like the following in your address
+ bar: <tt>gpxe 0x3c018003</tt>
+ <p>
+ </div>
+ </body>
+</html>