MTGRandom/functions.php
2026-07-29 19:51:07 -04:00

22 lines
547 B
PHP

<?php
function require_login() {
if ( !$_SESSION['validated'] ) {
header("Location: login.php");
}
}
//
// This function outputs the HTML footer along with adding script tags
// for any script files passed to the function. These files are assumed
// to be in the js/ folder.
//
function includeHTMLFooter(...$scripts) {
require 'htmlfooter.php';
foreach ( $scripts as $script ) {
echo "\n<script type='text/javascript' src='js/", trim($script), "'></script>\n";
}
echo "</body>\n";
echo "</html>\n";
}