67 lines
2.7 KiB
PHP
67 lines
2.7 KiB
PHP
<?php
|
|
ini_set('display_errors', 'on');
|
|
error_reporting(-1);
|
|
|
|
define('FII_ROOT', __DIR__);
|
|
define('FII_SRC_DIR', FII_ROOT . '/src');
|
|
define('FII_TPL_DIR', FII_ROOT . '/tpl');
|
|
define('FII_PRV_DIR', FII_ROOT . '/private');
|
|
define('FII_DOC_DIR', FII_ROOT . '/docs');
|
|
define('FII_PUB_DIR', FII_ROOT . '/public');
|
|
|
|
define('FII_ASS_AV', FII_PUB_DIR . '/assets/img/avatars');
|
|
define('FII_ASS_BG', FII_PUB_DIR . '/assets/img/backgrounds');
|
|
|
|
ob_start();
|
|
|
|
// Registration Code Checking
|
|
$regCheck = true;
|
|
|
|
// Global Vars
|
|
$fwSettings = array();
|
|
$fwSettings['dateFormat'] = 'D Y-m-d H:i:s T';
|
|
$fwSettings['mailSubjectPfx'] = '[Flashii] ';
|
|
$fwSettings['premiumRanks'] = array(2, 3, 4, 6, 7);
|
|
$fwSettings['staffRanks'] = array(2, 3, 4, 6);
|
|
$fwSettings['sitemodRanks'] = array(2, 3);
|
|
$fwSettings['develRanks'] = array(3, 4);
|
|
|
|
|
|
// "Gender list", just dropping this here so I don't have to add it later
|
|
$gaytumblrshit = ["Undisclosed", "Male", "Female", "Chinese", "Agender", "Aliagender", "Androgyne", "Androgynous", "Bigender", "Binary Sex", "Cisgender", "Demigirl", "Demiguy", "Genderfluid", "Genderflux", "Genderplasma", "Gendergas", "Gendersolid", "Gender Sublimation", "Genderpunk", "Genderqueer", "Intergender", "Intersex", "Neutrois", "Non-binary", "Oppression", "Pangender", "Transgender", "Transition", "Transmisogyny", "Transphobic", "TransPS2", "Loli cat girl", "Grown up female years old", "All of the Listed Options", "Other", "Cisgendered Autistic Cuntbag", "Fairchild Republic iPhone A5 Thunderbolt Connector II", "Shut Up", "Brid"];
|
|
|
|
|
|
if(session_status() != PHP_SESSION_ACTIVE) {
|
|
session_start();
|
|
$_SESSION['php_sid'] = session_id();
|
|
}
|
|
|
|
|
|
// Include Libraries
|
|
require_once FII_SRC_DIR . '/connection.php'; // Initial Database Connection
|
|
require_once FII_SRC_DIR . '/switch.php'; // design switcher
|
|
require_once FII_SRC_DIR . '/recaptcha.php'; // reCAPTCHA Library
|
|
require_once FII_SRC_DIR . '/parsedown.php'; // Markdown parser
|
|
require_once FII_SRC_DIR . '/flashii.php'; // Flashii Functions
|
|
require_once FII_SRC_DIR . '/design.php'; // Elements that are globally used
|
|
|
|
|
|
// reCAPTCHA Settings
|
|
$RECAPTCHAprivatekey = "6LeNp-8SAAAAALo2oO8dWhVuj55I_0TVpM6vzTYG"; // Private Key
|
|
$RECAPTCHApublickey = "6LeNp-8SAAAAACVfUTKoFxNrpCEsP0YhNIqjsJ26"; // Public Key
|
|
|
|
|
|
// Shadow banning
|
|
if(in_array($_SERVER['REMOTE_ADDR'], json_decode(file_get_contents(FII_PRV_DIR . '/shadowbans.json'), true))) {
|
|
print file_get_contents(FII_TPL_DIR . '/internal_error.fii');
|
|
exit;
|
|
}
|
|
|
|
// Start Flashii
|
|
$flashii = new flashii();
|
|
|
|
// Global Lockdown
|
|
if(is_file(FII_ROOT . '/.glockdown') && !$flashii->loggedIn()) {
|
|
print file_get_contents(FII_TPL_DIR . '/global_lockdown.fii');
|
|
exit;
|
|
}
|