mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2024-11-23 20:58:46 -05:00
59 lines
2.3 KiB
Plaintext
59 lines
2.3 KiB
Plaintext
<?php
|
|
/**************************************************************************************/
|
|
// SERVER STATUS CONFIG FILE TEMPLATE
|
|
// THIS FILE IS FOR CREATING YOUR CONFIG MANUALLY
|
|
// !!!!!!!IMPORTANT NOTE!!!!!!!!!
|
|
// You will need to create your htaccess or web.config file yourself.
|
|
// Please head to http(s)://yourdomain.com/create-server-config.php
|
|
// Wait until script finishes.
|
|
// Then delete it from your document root.
|
|
// We are sorry for this inconvinience and we will be automating this process soon.
|
|
// ------------------------
|
|
// Contributors:
|
|
// Vojtěch Sajdl - Yigit Kerem Oktay - Thomas Nilsen - jhuesser
|
|
/**************************************************************************************/
|
|
|
|
session_start();
|
|
//Start editing here
|
|
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("INSTALL_OVERRIDE", false);
|
|
define("DEFAULT_LANGUAGE", "en_GB");
|
|
//Stop editing
|
|
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;
|
|
}
|
|
|
|
putenv('LANGUAGE='.$_SESSION['locale'].'.UTF-8');
|
|
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");
|