-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.php
More file actions
25 lines (25 loc) · 952 Bytes
/
content.php
File metadata and controls
25 lines (25 loc) · 952 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
<?php include('includes/header.php'); findSelectedPage(); ?>
<div class="container">
<?php if (!is_null($selected_subject)) { ?>
<h1>
<?php echo $selected_subject['menu_name']; ?>
</h1>
<?php } elseif (!is_null($selected_page)) { ?>
<h1>
<?php echo $selected_page['menu_name']; ?>
</h1>
<div class="container page-content">
<?php echo $selected_page['content']; ?>
</div>
<?php } else {?>
<h1>Select a page to edit</h1>
<?php }?>
<br>
<?php if(isset($selected_page)) { ?>
<a class="ms-3" href="edit_page.php?page=<?php echo urlencode($selected_page['id']); ?>">Edit Page</a>
<?php } ?>
<?php if(isset($selected_subject['menu_name'])) { ?>
<a class="ms-3" href="edit_subject.php?sub=<?php echo urlencode($selected_subject['id']); ?>">Edit Subject</a>
<?php } ?>
</div>
<?php include('includes/footer.php'); ?>