-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsection.php
More file actions
35 lines (29 loc) · 841 Bytes
/
Copy pathsection.php
File metadata and controls
35 lines (29 loc) · 841 Bytes
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
<?php
require_once 'private_php/p_global.php';
require_once 'private_php/m_section.php';
require_once 'private_php/v_html_section.php';
require_once 'private_php/v_html_document.php';
try {
$section = Section::loadByUri($_SERVER['REQUEST_URI']);
$sectionView = new HtmlSectionView($section);
} catch (ModelAccessException $ex) {
errorPage(404);
}
pageHeader($sectionView->displayName());
?>
<div id="subNav"><?php
$anyDivisions = !empty($section->divisions());
$sectionView->showDivisionIndex();
showDocumentIndex($section->documents());
?></div>
<div id="subBody">
<h2><?php echo htmlspecialchars($sectionView->displayName()); ?></h2>
<?php if (!$anyDivisions) { ?>
<p>Sorry, there is nothing to see in this section.</p>
<?php } else { ?>
<p>Please select a Division to view.</p>
<?php } ?>
</div>
<?php
pageFooter();
?>