[release] Update version to 0.9.6+ post release
[gpxe.git] / contrib / errcode / errcode.php
blob87114495356ae19145a58d4d117a4681a7957c81
1 <?
2 /*
3 * Copyright (C) 2008 Stefan Hajnoczi <stefanha@gmail.com>.
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.
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.
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.
20 // The path to the errcode.py script.
21 $ERRCODE_PATH = './errcode.py';
24 <html>
25 <head>
26 <title>gPXE Error Code Lookup</title>
27 <style>
28 body, pre, div, form, p, h2, b, tt {
29 padding: 0;
30 border: 0;
31 margin: 0;
33 body {
34 padding: 0.5em;
35 width: 750px;
36 font-family: sans-serif;
38 pre {
39 margin: 0.2em;
40 padding: 0.1em;
41 background-color: #ddd;
43 form {
44 margin: 0.2em;
46 div {
47 margin: 0.2em;
48 padding: 0.4em;
49 border: 1px dashed black;
51 </style>
52 </head>
53 <body>
55 if (!empty($_REQUEST['e']) && preg_match('/^(0x)?[0-9a-f]{8}$/', $_REQUEST['e'])) {
57 <pre>
59 system($ERRCODE_PATH . " " . $_REQUEST['e']);
61 </pre>
65 <form action="" method="post">
66 <label for="e">Error code:</label>
67 <input type="text" name="e" id="e" value="0x12345678"></input>
68 <input type="submit" value="Lookup"></input>
69 </form>
71 <div>
72 <h2>Hint:</h2>
73 <p>
74 Firefox users can right-click on the <b>Error code</b>
75 text box and select <b>Add a Keyword for this Search...</b>.
76 Set <b>name</b> to <tt>gPXE Error Code Lookup</tt> and
77 <b>keyword</b> to <tt>gxpe</tt> Then you can look up error
78 codes by typing something like the following in your address
79 bar: <tt>gpxe 0x3c018003</tt>
80 <p>
81 </div>
82 </body>
83 </html>