-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
76 lines (62 loc) · 2.28 KB
/
index.php
File metadata and controls
76 lines (62 loc) · 2.28 KB
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
<?php
use MintyPHP\Debugger;
use MintyPHP\Core\Debugger\View;
use MintyPHP\Session;
use MintyPHP\Router;
// Change directory to project root
chdir(__DIR__ . '/../..');
// Use default autoload implementation
require 'vendor/autoload.php';
// Load the config parameters
require 'config/config.php';
Debugger::$enabled = false;
Session::$enabled = true;
// Start the session
Session::start();
$requests = Debugger::getHistory();
?>
<!DOCTYPE html>
<html>
<head>
<base href="<?php echo Router::getBaseUrl(); ?>">
<title>MintyPHP Debugger</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="debugger/img/favicon.ico">
<!-- Bootstrap -->
<link href="debugger/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="debugger/css/bootstrap-theme.min.css" rel="stylesheet" media="screen">
<!-- jDB (necessary for Bootstrap's JavaScript plugins) -->
<script src="debugger/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="debugger/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-4">
<h3>
<img src="debugger/img/minty_square.png" alt="MintyPHP logo" style="height: 24px; float:left; margin-right:10px;">
MintyPHP Debugger
</h3>
</div>
</div>
<?php echo (new View())->getMainView($requests); ?>
<script>
$(function() {
var classes = [];
$('#debug-request-0 a[data-toggle="tab"]').each(function(e) {
classes.push($(this).attr('class'));
});
$(classes).each(function(i, c) {
$('a[data-toggle="tab"].' + c).on('shown.bs.tab', function() {
$('a[data-toggle="tab"].' + c).each(function() {
$(this).tab('show');
});
});
});
});
</script>
</div>
</body>
</html>