2017-11-23 18:09:36 -05:00
|
|
|
<?php
|
|
|
|
//This is config file, please be careful
|
2018-01-12 21:00:13 -05:00
|
|
|
session_start();
|
2017-11-23 18:09:36 -05:00
|
|
|
//You can change these:
|
|
|
|
define("NAME", '##name##'); //Website name
|
2018-03-09 18:32:06 -05:00
|
|
|
define("TITLE", "##title##");
|
2017-11-23 18:09:36 -05:00
|
|
|
define("WEB_URL", "##url##"); //Used for links
|
|
|
|
define("MAILER_NAME", "##mailer##"); //Mailer name
|
|
|
|
define("MAILER_ADDRESS", "##mailer_email##"); //Mailer address
|
2018-08-02 05:48:10 -04:00
|
|
|
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##");
|
2018-11-08 08:15:20 -05:00
|
|
|
define("POLICY_URL","##policy_url##");
|
2018-06-07 04:33:59 -04:00
|
|
|
define("TG_BOT_API_TOKEN", "##tg_bot_token##"); //Telegram Bot Token
|
|
|
|
define("TG_BOT_USERNAME", "##tg_bot_username##"); //Telegram Bot username
|
2017-11-23 18:09:36 -05:00
|
|
|
define("INSTALL_OVERRIDE", false);
|
2017-12-30 20:26:04 -05:00
|
|
|
define("DEFAULT_LANGUAGE", "en_GB");
|
|
|
|
|
2018-01-07 14:39:10 -05:00
|
|
|
require("classes/locale-negotiator.php");
|
|
|
|
|
2018-01-07 14:43:04 -05:00
|
|
|
$negotiator = new LocaleNegotiator(DEFAULT_LANGUAGE);
|
|
|
|
|
2018-01-07 14:39:10 -05:00
|
|
|
if (!isset($_SESSION['locale'])||isset($_GET['lang']))
|
|
|
|
{
|
|
|
|
$override = ((isset($_GET['lang']))?$_GET['lang']:null);
|
|
|
|
$best_match = $negotiator->negotiate($override);
|
|
|
|
$_SESSION['locale'] = $best_match;
|
|
|
|
}
|
|
|
|
|
2018-01-12 15:35:31 -05:00
|
|
|
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");
|
2017-12-30 20:26:04 -05:00
|
|
|
|
2017-11-23 18:09:36 -05:00
|
|
|
//Database connection
|
|
|
|
$mysqli = new mysqli("##server##","##user##","##password##","##database##");
|
|
|
|
|
|
|
|
if ($mysqli->connect_errno) {
|
2018-01-07 14:39:10 -05:00
|
|
|
printf(_("Connection failed: %s\n"), $mysqli->connect_error);
|
2017-11-23 18:09:36 -05:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2018-08-10 16:57:27 -04:00
|
|
|
$mysqli->set_charset("utf8");
|