mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-26 22:28:39 -05:00
fix php8 error on undefined const
This commit is contained in:
parent
9ef3938e10
commit
7601038f6b
3
404.php
3
404.php
@ -1,4 +1,7 @@
|
||||
<?php
|
||||
define("NAME", "");
|
||||
define("TITLE", "");
|
||||
define("WEB_URL", "");
|
||||
require_once("template.php");
|
||||
if (!file_exists("config.php"))
|
||||
{
|
||||
|
15
index.php
15
index.php
@ -40,14 +40,13 @@ define("TITLE", $db->getSetting($mysqli,"title"));
|
||||
define("WEB_URL", $db->getSetting($mysqli,"url"));
|
||||
define("MAILER_NAME", $db->getSetting($mysqli,"mailer"));
|
||||
define("MAILER_ADDRESS", $db->getSetting($mysqli,"mailer_email"));
|
||||
|
||||
define("SUBSCRIBE_EMAIL", $db->getBooleanSetting($mysqli,"subscribe_email"));
|
||||
define("SUBSCRIBE_TELEGRAM", $db->getBooleanSetting($mysqli,"subscribe_telegram"));
|
||||
define("TG_BOT_USERNAME", $db->getSetting($mysqli,"tg_bot_username"));
|
||||
define("TG_BOT_API_TOKEN", $db->getSetting($mysqli,"tg_bot_api_token"));
|
||||
define("GOOGLE_RECAPTCHA", $db->getBooleanSetting($mysqli,"google_recaptcha"));
|
||||
define("GOOGLE_RECAPTCHA_SITEKEY", $db->getSetting($mysqli,"google_recaptcha_sitekey"));
|
||||
define("GOOGLE_RECAPTCHA_SECRET", $db->getSetting($mysqli,"google_recaptcha_secret"));
|
||||
define("SUBSCRIBE_EMAIL", $db->getBooleanSetting($mysqli,"subscribe_email") ?: "");
|
||||
define("SUBSCRIBE_TELEGRAM", $db->getBooleanSetting($mysqli,"subscribe_telegram") ?: "");
|
||||
define("TG_BOT_USERNAME", $db->getSetting($mysqli,"tg_bot_username") ?: "");
|
||||
define("TG_BOT_API_TOKEN", $db->getSetting($mysqli,"tg_bot_api_token") ?: "");
|
||||
define("GOOGLE_RECAPTCHA", $db->getBooleanSetting($mysqli,"google_recaptcha") ?: "");
|
||||
define("GOOGLE_RECAPTCHA_SITEKEY", $db->getSetting($mysqli,"google_recaptcha_sitekey") ?: "");
|
||||
define("GOOGLE_RECAPTCHA_SECRET", $db->getSetting($mysqli,"google_recaptcha_secret") ?: "");
|
||||
$offset = 0;
|
||||
|
||||
if (isset($_GET['ajax']))
|
||||
|
@ -26,7 +26,8 @@ class Template{
|
||||
if ( 'admin' == $str_url ) {
|
||||
$strSubsMenu = '';
|
||||
} else {
|
||||
if (SUBSCRIBE_EMAIL || SUBSCRIBE_TELEGRAM ) {
|
||||
$strSubsMenu = '';
|
||||
if (defined('SUBSCRIBE_EMAIL') || defined('SUBSCRIBE_TELEGRAM') ) {
|
||||
// Subscriber menu is to be shown...
|
||||
$strSubsMenu = '<ul class="nav navbar-nav mr-auto">';
|
||||
// If subscriber is not logged on, display subscriber menus
|
||||
@ -56,7 +57,7 @@ class Template{
|
||||
<html lang="en">
|
||||
<head>
|
||||
<?php
|
||||
if(!admin){
|
||||
if(defined('admin') && !admin){
|
||||
$headfile = fopen("head.txt", "r") or die("Unable to open head.txt!");
|
||||
$head_additionalcode = fread($versionfile,filesize("head.txt"));
|
||||
fclose($headfile);
|
||||
@ -237,7 +238,7 @@ class Template{
|
||||
<?php }?>
|
||||
<script src="<?php echo WEB_URL;?>/js/vendor/bootstrap.min.js"></script>
|
||||
<script src="<?php echo WEB_URL;?>/js/main.js"></script>
|
||||
<?php if ( GOOGLE_RECAPTCHA ) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php }?>
|
||||
<?php if ( defined('GOOGLE_RECAPTCHA') ) { ?><script src='https://www.google.com/recaptcha/api.js'></script><?php }?>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
|
Loading…
Reference in New Issue
Block a user