mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-12-17 15:59:07 -05:00
Add handling of email subscriptions
- Translation issue fixes #64 - Adds handler for email subscription requests
This commit is contained in:
parent
528cb77952
commit
3eccbf529e
40
index.php
40
index.php
@ -1,17 +1,35 @@
|
||||
<?php
|
||||
require_once("template.php");
|
||||
require_once("libs/parsedown/Parsedown.php");
|
||||
|
||||
if (!file_exists("config.php"))
|
||||
{
|
||||
if (!file_exists("config.php")) {
|
||||
require_once("install.php");
|
||||
} elseif(isset($_GET['do'])){ // we can add other actions with $_GET['do'] later.
|
||||
if($_GET['do'] == "subscriptions"){
|
||||
require_once("subscriptions.php");
|
||||
|
||||
} elseif(isset($_GET['do'])) { // we can add other actions with $_GET['do'] later.
|
||||
// Fix for translation via _(). We need config.php first...
|
||||
require_once("config.php");
|
||||
require_once("template.php");
|
||||
|
||||
|
||||
switch ($_GET['do']) {
|
||||
case 'subscriptions':
|
||||
require_once("subscriptions.php");
|
||||
break;
|
||||
|
||||
case 'email_subscription':
|
||||
case 'manage':
|
||||
case 'unsubscribe';
|
||||
require_once("email_subscriptions.php");
|
||||
break;
|
||||
|
||||
default:
|
||||
// TODO : How to handle url invalid/unknown [do] commands
|
||||
header('Location: index.php');
|
||||
break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
|
||||
require_once("config.php");
|
||||
require_once("template.php");
|
||||
require_once("classes/constellation.php");
|
||||
|
||||
$offset = 0;
|
||||
@ -27,7 +45,11 @@ if (isset($_GET['ajax']))
|
||||
|
||||
if (isset($_GET['subscriber_logout'])){
|
||||
setcookie('tg_user', '');
|
||||
setcookie('referer', '', time() - 3600);
|
||||
setcookie('referer', '', time() - 3600);
|
||||
$_SESSION['subscriber_valid'] = false;
|
||||
unset($_SESSION['subscriber_userid']);
|
||||
unset($_SESSION['subscriber_typeid']);
|
||||
unset($_SESSION['subscriber_id']);
|
||||
header('Location: index.php');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user