Header.php
2.7 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
<?php
/**
* Header file.
*/
use PhpOffice\PhpSpreadsheet\Helper\Sample;
error_reporting(E_ALL);
require_once __DIR__ . '/../src/Bootstrap.php';
$helper = new Sample();
// Return to the caller script when runs by CLI
if ($helper->isCli()) {
return;
}
?>
<html>
<head>
<title><?php echo $helper->getPageTitle(); ?></title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet" href="/bootstrap/css/font-awesome.min.css"/>
<link rel="stylesheet" href="/bootstrap/css/phpspreadsheet.css"/>
<script src="/bootstrap/js/jquery.min.js"></script>
<script src="/bootstrap/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">PHPSpreadsheet</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav"><?php
foreach ($helper->getSamples() as $category => $files) {
?><li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $category ?><strong class="caret"></strong></a>
<ul class="dropdown-menu"><?php
foreach ($files as $name => $file) {
echo '<li><a href="/' . $file . '">' . $name . '</a></li>';
} ?></ul>
</li>
<?php
} ?>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/PHPOffice/PHPSpreadsheet"><i class="fa fa-github fa-lg" title="GitHub"></i> </a></li>
<li><a href="https://phpspreadsheet.readthedocs.io"><i class="fa fa-book fa-lg" title="Docs"></i> </a></li>
</ul>
</div>
</div>
</div>
<?php
echo $helper->getPageHeading();