-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.php
51 lines (43 loc) · 1.73 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
<?php
error_reporting(E_ALL);
set_error_handler(function ($severity, $message, $file, $line) {
if (error_reporting() & $severity) {
throw new ErrorException($message, 0, $severity, $file, $line);
}
});
$config = parse_ini_file(__DIR__ . '/config.ini');
?><!DOCTYPE html>
<html>
<head>
<title>Gitstats</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
<body style="margin-left: 20px;">
<h1>Gitstats</h1>
<h2>Statistics</h2>
<ul>
<?php foreach (glob(__DIR__ . '/*-dashboards/*.weave') as $file) { ?>
<li><a href="weave.html?file=<?= htmlentities(rawurlencode(basename(dirname($file)) . '/' . basename($file))) ?>">
<?= htmlentities(pathinfo($file, PATHINFO_FILENAME)) ?>
</a></li>
<?php } ?>
</ul>
<?php if (! isset($statisticsOnly)) { ?>
<h2>Tools</h2>
<ul>
<li>
<a href="adminer.php">Create views</a>
(
DB: <?= htmlentities($config['mysql_db']) ?>,
user: <?= htmlentities($config['mysql_user']) ?>,
pass: <?= htmlentities($config['mysql_pass']) ?>
)
</li>
<li><a href="weave.html">Create new dashboard</a></li>
<li><a href="export.php">Export as static HTML and CSV</a></li>
</ul>
<?php } ?>
</body>
</html>