Skip to content

Commit b4bdb91

Browse files
committed
Really moved debug to a separate file
1 parent beae459 commit b4bdb91

2 files changed

Lines changed: 73 additions & 0 deletions

File tree

inc/debug.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!-- Debug -->
2+
<div id="debug">
3+
<form>
4+
<label><input type="radio" name="showdebug" value="none" checked /> Hide debug info</label>
5+
<label><input type="radio" name="showdebug" value="simplexml" /> Show SimpleXML object</label>
6+
<label><input type="radio" name="showdebug" value="rawxml" /> Show raw XML</label>
7+
</form>
8+
<div class="simplexml"><pre><?php print_r($result); ?></pre></div>
9+
<div class="rawxml"><pre><?php
10+
// Add indentation to XML output
11+
$dom = new DOMDocument('1.0');
12+
$dom->preserveWhiteSpace = false;
13+
$dom->formatOutput = true;
14+
$dom->loadXML($result->asXML());
15+
echo htmlspecialchars($dom->saveXML());
16+
?></pre></div>
17+
</div>

inc/style.css

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
html {
2+
overflow-y: scroll;
3+
}
4+
5+
html, body {
6+
font-family: helvetica, arial, verdana, sans-serif;
7+
color: #222;
8+
background: #efefef;
9+
}
10+
11+
h1 {
12+
font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans","Helvetica Neue", Arial, Helvetica, sans-serif;
13+
}
14+
15+
16+
#debug form {
17+
background: #667;
18+
color: white;
19+
padding: 6px;
20+
border-radius: 4px;
21+
font-size: 12px;
22+
margin-top: 40px;
23+
margin-bottom: 0;
24+
}
25+
26+
#debug form label {
27+
cursor: pointer;
28+
}
29+
30+
a {
31+
color: #009;
32+
text-decoration: none;
33+
}
34+
35+
a:hover {
36+
text-decoration: underline;
37+
}
38+
39+
pre {
40+
background: white;
41+
padding: 10px;
42+
43+
font-family: "Lucida Console", Monaco, monospace;
44+
line-height: 140%;
45+
font-size: 12px;
46+
47+
overflow: hidden;
48+
color: #444;
49+
margin-top: 0;
50+
margin-left: 4px;
51+
margin-right: 4px;
52+
border-radius: 0px 0px 4px 4px;
53+
border-right: 1px solid #ccc;
54+
border-bottom: 1px solid #ccc;
55+
border-left: 1px solid #ccc;
56+
}

0 commit comments

Comments
 (0)