mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-23 20:58:46 -05:00
cd6ce3c8d8
In preparation for adding subscription notification a number of new configuration options has been added. These are as follows: - SUBSCRIBE_EMAIL : True/False to allow email subscription - SUBSCRIBE_TELEGRAM : True/False to allow Telegram subscription - GOOGLE_RECAPTCHA : True/False to enable reCapthca for e-mail signup form - GOOGLE_RECAPTCHA_SITEKEY : Google reCaptcha sitekey - GOOGLE_RECAPTCHA_SECRET : Google reCaptcha secret - PHP_MAILER : True/False to allow the use of PHPMailer() library for emails. - PHP_MAILER_PATH: Path to where PHPMailer() class is located on the system - PHP_MAILER_SMTP : True/False if SMTP is to be used with PHPmailer(). Default will be mail(). - PHP_MAILER_HOST : SMTP Host to use if PHP_MAILER_SMTP is enabled. - PHP_MAILER_PORT : SMTP Port - PHP_MAILER_SECURE : tls/ssl option for PHPMailer() - PHP_MAILER_USER : Username for SMTP - PHP_MAILER_PASS : Password for SMTP
59 lines
2.4 KiB
Plaintext
59 lines
2.4 KiB
Plaintext
<?php
|
|
//This is config file, please be careful
|
|
session_start();
|
|
//You can change these:
|
|
define("NAME", '##name##'); //Website name
|
|
define("TITLE", "##title##");
|
|
define("WEB_URL", "##url##"); //Used for links
|
|
define("MAILER_NAME", "##mailer##"); //Mailer name
|
|
define("MAILER_ADDRESS", "##mailer_email##"); //Mailer address
|
|
define("POLICY_NAME", "##policy_name##"); //name for contact in policy
|
|
define("ADDRESS", "##address##");
|
|
define("POLICY_MAIL", "##policy_mail##"); //contact email in policy
|
|
define("POLICY_PHONE", "##policy_phone##");
|
|
define("WHO_WE_ARE","##who_we_are##");
|
|
define("POLICY_URL","##policy_url##");
|
|
define('SUBSCRIBE_EMAIL', true);
|
|
define('SUBSCRIBE_TELEGRAM', false);
|
|
define("TG_BOT_API_TOKEN", "##tg_bot_token##"); //Telegram Bot Token
|
|
define("TG_BOT_USERNAME", "##tg_bot_username##"); //Telegram Bot username
|
|
define("INSTALL_OVERRIDE", false);
|
|
define("DEFAULT_LANGUAGE", "en_GB");
|
|
define("GOOGLE_RECAPTCHA", false);
|
|
define("GOOGLE_RECAPTCHA_SITEKEY", "##google_site_key##");
|
|
define("GOOGLE_RECAPTCHA_SECRET", "##google_secret##");
|
|
define("PHP_MAILER", false); // Enable if we are to use extenral PHPMailer() library
|
|
define("PHP_MAILER_PATH", "##phpmailer_path##"); // Path to src folder of PHPMailer() library - without ending /
|
|
define("PHP_MAILER_SMTP", false); // Set to true if we are to use SMTP
|
|
define("PHP_MAILER_HOST", "##phpmailer_host##"); // SMTP host
|
|
define("PHP_MAILER_PORT", "##phpmailer_port##"); // SMTP Port
|
|
define("PHP_MAILER_SECURE", ""); // Set to TLS or SSL or leave blank for plaintext
|
|
define("PHP_MAILER_USER", "##phpmailer_user##"); // SMTP Authentication user
|
|
define("PHP_MAILER_PASS", "##phpmailer_pass##"); // SMTP authenticatin password
|
|
|
|
require("classes/locale-negotiator.php");
|
|
|
|
$negotiator = new LocaleNegotiator(DEFAULT_LANGUAGE);
|
|
|
|
if (!isset($_SESSION['locale'])||isset($_GET['lang']))
|
|
{
|
|
$override = ((isset($_GET['lang']))?$_GET['lang']:null);
|
|
$best_match = $negotiator->negotiate($override);
|
|
$_SESSION['locale'] = $best_match;
|
|
}
|
|
|
|
setlocale(LC_ALL, $_SESSION['locale'].".UTF-8");
|
|
setlocale(LC_MESSAGES, $_SESSION['locale'].".UTF-8");
|
|
bindtextdomain("server-status", __DIR__ . "/locale/");
|
|
bind_textdomain_codeset("server-status", "utf-8");
|
|
textdomain("server-status");
|
|
|
|
//Database connection
|
|
$mysqli = new mysqli("##server##","##user##","##password##","##database##");
|
|
|
|
if ($mysqli->connect_errno) {
|
|
printf(_("Connection failed: %s\n"), $mysqli->connect_error);
|
|
exit();
|
|
}
|
|
|
|
$mysqli->set_charset("utf8"); |