-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
59 lines (50 loc) · 1.57 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
<?php header('X-Frame-Options: ALLOW-FROM http://localhost/'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Localhost Index</title>
<link href="assets/css/index.css" rel="stylesheet" type="text/css">
<script src="assets/js/debug.js" type="text/javascript"></script>
<script src="assets/js/index.js" type="text/javascript"></script>
</head>
<body>
<?php
$useIframe = (isset($_GET['iframe']) && $_GET['iframe'] == 1) ? true : false;
$usePortCheck = (isset($_GET['portcheck']) && $_GET['portcheck'] == 0) ? false : true;
$usePortFilter = (isset($_GET['portfilter']) && $_GET['portfilter'] == 0) ? false : true;
?>
<header <?php if ($useIframe) echo 'style="position: absolute"'; ?>>
<h1><a href="http://localhost">Localhost Index</a></h1>
</header>
<div id="container">
<?php
if ($useIframe) {
?>
<aside id="sidebar<?php $useIframe ? 'iframe-mode' : '' ?>">
<div id="dragbar"></div>
<?php
}
include('funcs.php');
make_dir_links($useIframe);
make_port_links($useIframe, $usePortCheck, $usePortFilter, 32773);
if ($useIframe) {
?>
</aside>
<div id="main">
<div id="iframe_src"></div>
<iframe id="site_contents" scrolling="no" frameborder="0" src=""></iframe>
</div>
<?php
}
?>
</div>
<footer>
<?php if ($useIframe) { ?>
<span>[<a href="?iframe=0">switch to standard</a>]</span>
<?php } else { ?>
<span>[<a href="?iframe=1">switch to iframe</a>]</span>
<?php } ?>
<span class="toggle-text">(ctrl+shift+alt+i to toggle)</span>
</footer>
</body>
</html>