Bug fix for not allowing access to admin because of a file not found error 'head.txt'
This commit is contained in:
parent
8007097d2f
commit
1408d0ad91
|
@ -0,0 +1,4 @@
|
||||||
|
config.php
|
||||||
|
.idea/
|
||||||
|
.vscode/
|
||||||
|
.code/
|
11
template.php
11
template.php
|
@ -58,9 +58,13 @@ class Template{
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<?php
|
<?php
|
||||||
|
if(!admin){
|
||||||
$headfile = fopen("head.txt", "r") or die("Unable to open head.txt!");
|
$headfile = fopen("head.txt", "r") or die("Unable to open head.txt!");
|
||||||
$head_additionalcode = fread($versionfile,filesize("head.txt"));
|
$head_additionalcode = fread($versionfile,filesize("head.txt"));
|
||||||
fclose($headfile); ?>
|
fclose($headfile);
|
||||||
|
echo $head_additionalcode;
|
||||||
|
}
|
||||||
|
?>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><?php echo $page_name." - ".NAME ?></title>
|
<title><?php echo $page_name." - ".NAME ?></title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
@ -174,6 +178,9 @@ class Template{
|
||||||
/**
|
/**
|
||||||
* Renders a toggle switch
|
* Renders a toggle switch
|
||||||
* Created by Yigit Kerem Oktay
|
* Created by Yigit Kerem Oktay
|
||||||
|
* @param String $toggletext will decide what the description text next to the toggle will be
|
||||||
|
* @param String $input_name will decide what the HTML Name attribute of the toggle will be
|
||||||
|
* @param Boolean $checked will decide if the toggle will initially be on or off
|
||||||
*/
|
*/
|
||||||
public static function render_toggle($toggletext,$input_name,$checked){
|
public static function render_toggle($toggletext,$input_name,$checked){
|
||||||
?>
|
?>
|
||||||
|
@ -199,7 +206,7 @@ class Template{
|
||||||
<div id="footerwrap">
|
<div id="footerwrap">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row centered">
|
<div class="row centered">
|
||||||
<div class="col-md-4 text-left"><a href="https://github.com/Pryx/server-status/graphs/contributors" target="_blank">Copyright © <?php echo date("Y");?> Server Status Project Contributors </a><?php if(strlen(COPYRIGHT_TEXT)>1){ echo " and ".COPYRIGHT_TEXT; } ?></div>
|
<div class="col-md-4 text-left"><a href="https://github.com/server-status-project/server-status/graphs/contributors" target="_blank">Copyright © <?php echo date("Y");?> Server Status Project Contributors </a><?php if(strlen(COPYRIGHT_TEXT)>1){ echo " and ".COPYRIGHT_TEXT; } ?></div>
|
||||||
<div class="col-md-4 text-center">
|
<div class="col-md-4 text-center">
|
||||||
<div class="btn-group dropup">
|
<div class="btn-group dropup">
|
||||||
<button type="button" class="btn btn-primary"><?php echo '<img src="'.WEB_URL.'/locale/'.$_SESSION['locale'].'/flag.png" alt="'.$lang_names[$_SESSION['locale']].'">'.$lang_names[$_SESSION['locale']];?></button>
|
<button type="button" class="btn btn-primary"><?php echo '<img src="'.WEB_URL.'/locale/'.$_SESSION['locale'].'/flag.png" alt="'.$lang_names[$_SESSION['locale']].'">'.$lang_names[$_SESSION['locale']];?></button>
|
||||||
|
|
Loading…
Reference in New Issue