mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 05:14:10 -07:00
Move content of .js.html files to .html
This commit is contained in:
parent
61e556ae11
commit
1fa3c4b3fb
43 changed files with 550 additions and 507 deletions
|
@ -95,6 +95,10 @@ function check_return_code($return_var,$output) {
|
|||
}
|
||||
}
|
||||
|
||||
function insert_scripts() {
|
||||
@include_once(dirname(__DIR__) . '/templates/scripts.html');
|
||||
}
|
||||
|
||||
function render_page($user, $TAB, $page) {
|
||||
$__template_dir = dirname(__DIR__) . '/templates/';
|
||||
|
||||
|
@ -115,18 +119,14 @@ function render_page($user, $TAB, $page) {
|
|||
|
||||
// Body
|
||||
if (($_SESSION['user'] !== 'admin') && (@include($__template_dir . "user/$page.html"))) {
|
||||
// User page exists
|
||||
// Use user page
|
||||
$__template_base = $__template_dir . "user/$page";
|
||||
// User page loaded
|
||||
} else {
|
||||
// Not admin or user page doesn't exist
|
||||
// Use admin page
|
||||
$__template_base = $__template_dir . "admin/$page";
|
||||
include($__template_base . '.html');
|
||||
// Load admin page
|
||||
@include($__template_dir . "admin/$page.html");
|
||||
}
|
||||
|
||||
// Footer
|
||||
$JS_FILE = $__template_base . '.js.html';
|
||||
include($__template_dir . 'footer.html');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue