mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2026-06-01 21:54:48 -04:00
Update to read relevant options from DB
This commit is contained in:
+14
-6
@@ -1,4 +1,4 @@
|
||||
<?php
|
||||
<?php
|
||||
require_once("config.php");
|
||||
require_once("template.php");
|
||||
require_once("classes/constellation.php");
|
||||
@@ -11,6 +11,14 @@ 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("GOOGLE_RECAPTCHA", $db->getSetting($mysqli, "google_recaptcha"));
|
||||
define("GOOGLE_RECAPTCHA_SECRET", $db->getSetting($mysqli, "google_recaptcha_secret"));
|
||||
define("GOOGLE_RECAPTCHA_SITEKEY", $db->getSetting($mysqli, "google_recaptcha_sitekey"));
|
||||
define("TG_BOT_API_TOKEN", $db->getSetting($mysqli, "tg_bot_api_token"));
|
||||
define("TG_BOT_USERNAME", $db->getSetting($mysqli, "tg_bot_username"));
|
||||
|
||||
$subscription = new Subscriptions();
|
||||
$telegram = new Telegram();
|
||||
|
||||
@@ -21,12 +29,12 @@ if ( SUBSCRIBE_TELEGRAM && $_SESSION['subscriber_typeid'] == 2 ) {
|
||||
}
|
||||
|
||||
if( $_SESSION['subscriber_valid'] ){
|
||||
|
||||
|
||||
$typeID = $_SESSION['subscriber_typeid'];
|
||||
$subscriberID = $_SESSION['subscriber_id'];
|
||||
$subscriberID = $_SESSION['subscriber_id'];
|
||||
$userID = $_SESSION['subscriber_userid'];
|
||||
$token = $_SESSION['subscriber_token'];
|
||||
|
||||
|
||||
if(isset($_GET['add'])){
|
||||
$subscription->add($subscriberID, $_GET['add']);
|
||||
}
|
||||
@@ -38,11 +46,11 @@ if( $_SESSION['subscriber_valid'] ){
|
||||
$subscription->render_subscribed_services($typeID, $subscriberID, $userID, $token);
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
$header = _("Your session has expired or you tried something we don't suppprt");
|
||||
$message = _('If your session expired, retry your link or in case of Telegram use the login button in the top menu.');
|
||||
$constellation->render_warning($header, $message);
|
||||
|
||||
|
||||
header('Location: index.php');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user