forked from telephone/LookingGlass
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
144 lines (135 loc) · 5.13 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?php
if (!file_exists('LookingGlass/Config.php')) {
exit('Config.php does not exist. Please run configure.sh');
}
require 'LookingGlass/Config.php';
?>
<!DOCTYPE html>
<html lang="en">
<!--
__ _
.: .' '.
/: / \_
;: ; ,-'/`:\
|: | | |() :|
;: ; '-.\_:/
\: \ /`
':_'._.'
||
/__\
.---. {====}
.' _,"-,__|:: |
/ ((O)=;--.:: |
; `|: | |:: |
| |: | |:: | *****************************
| |: | |:: | * LookingGlass by Telephone *
| |: | |:: | * http://iamtelephone.com *
| |: | |:: | *****************************
| |: | |:: |
| /:'__\ |:: |
| [______]|:: |
| `----` |:: |__
| _.--|:: | ''--._
; .' __{====}__ '.
\ .'_.-'._ `""` _.'-._ '.
'--'/` `''''` `\ '.__
'._ _.'
`""--......--""`
-->
<head>
<meta charset="utf-8">
<title><?php echo $siteName; ?> - Looking Glass</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="LookingGlass - Open source PHP looking glass">
<meta name="author" content="Telephone">
<!-- IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Styles -->
<link href="assets/css/<?php echo $theme; ?>.min.css" rel="stylesheet">
</head>
<body>
<!-- Container -->
<div class="container">
<!-- Header -->
<header class="header nohighlight" id="overview">
<div class="row">
<div class="span12">
<h1><a id="title" href="<?php echo $_SERVER['REQUEST_URI']; ?>"><?php echo $siteName; ?></a></h1>
</div>
</div>
</header>
<!-- Network Information -->
<section id="information">
<div class="row">
<div class="span12">
<div class="well">
<span id="legend">Network information</span><!-- IE/Safari dislike <legend> out of context -->
<p>Server Location: <b><?php echo $serverLocation; ?></b></p>
<div style="margin-left: 10px;">
<p>Test IPv4: <?php echo $ipv4; ?></p>
<p><?php if (!empty($ipv6)) { echo 'Test IPv6: ',$ipv6; } ?></p>
<p>Test files: <?php
foreach ($testFiles as $val) {
echo "<a href=\"{$val}.test\" id=\"testfile\">{$val}</a> ";
}
?></p>
</div>
<p>Your IP Address: <b><a href="#tests" id="userip"><?php echo $_SERVER['REMOTE_ADDR']; ?></a></b></p>
</div>
</div>
</div>
</section>
<!-- Network Tests -->
<section id="tests">
<div class="row">
<div class="span12">
<form class="well form-inline" id="networktest" action="#results" method="post">
<fieldset>
<span id="legend">Network tests</span>
<div id="hosterror" class="control-group">
<div class="controls">
<input id="host" name="host" type="text" class="input-large" placeholder="Host or IP address">
</div>
</div>
<select name="cmd" class="input-medium" style="margin-left: 5px;">
<option value="host">host</option>
<option value="mtr">mtr</option>
<?php if (!empty($ipv6)) { echo '<option value="mtr6">mtr6</option>'; } ?>
<option value="ping" selected="selected">ping</option>
<?php if (!empty($ipv6)) { echo '<option value="ping6">ping6</option>'; } ?>
<option value="traceroute">traceroute</option>
<?php if (!empty($ipv6)) { echo '<option value="traceroute6">traceroute6</option>'; } ?>
</select>
<button type="submit" id="submit" name="submit" class="btn btn-primary" style="margin-left: 10px;">Run Test</button>
</fieldset>
</form>
</div>
</div>
</section>
<!-- Results -->
<section id="results" style="display:none">
<div class="row">
<div class="span12">
<div class="well">
<span id="legend">Results</span>
<pre id="response" style="display:none"></pre>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer nohighlight">
<p class="pull-right">
<a href="#">Back to top</a>
</p>
<p>Powered by <a href="http://github.com/telephone/LookingGlass">LookingGlass</a></p>
</footer>
</div><!-- /container -->
<!-- Javascript -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="assets/js/LookingGlass.min.js"></script>
<script src="assets/js/XMLHttpRequest.min.js"></script>
</body>
</html>