blob: 927bd2d47c9fb91fafb27b12a948ba300dade22c (
plain)
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
|
<?php ob_start(); ?><!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Classroom - <?=$title?></title>
<?php // header includes
////////////////////////////////////////////////////////////////////////
Render::view('components/header_includes', ////////////////////////////
['administration' => true]
);
?>
</head>
<body>
<div class="classroom admin-container">
<?php
// sometimes an ID (int) is needed
// ex. editing a page or a lesson we need page-ID or lesson-ID
// --- -- -- - - -
if (!isset($id)) $id=0;
// render menu
////////////////////////////////////////////////////////////////////
Render::view('admin/admin-menu',[ ////////////////////////////
'action' => $action,
'id' => $id
]);
// render main content
////////////////////////////////////////////////////////////////////
Render::view("admin/{$action}",[ 'id' => $id ]); ////////////////
?>
</div>
<!-- js admin script -->
<script>var entity_id = <?= $id ?>;</script>
<script src="/assets/js/admin/<?= $action ?>.js"></script>
</body>
</html><?php ob_flush(); ?>
|