| 
									
										
										
										
											2017-11-24 00:09:36 +01:00
										 |  |  | <?php | 
					
						
							| 
									
										
										
										
											2020-08-14 14:58:05 +03:00
										 |  |  | /**************************************************************************************/ | 
					
						
							|  |  |  | //                      SERVER STATUS CONFIG FILE TEMPLATE | 
					
						
							|  |  |  | //                THIS FILE IS FOR CREATING YOUR CONFIG MANUALLY | 
					
						
							|  |  |  | //                     !!!!!!!IMPORTANT NOTE!!!!!!!!! | 
					
						
							| 
									
										
										
										
											2020-08-14 15:11:42 +03:00
										 |  |  | // You will need to create your htaccess or web.config file yourself if you use this template | 
					
						
							| 
									
										
										
										
											2020-08-14 14:58:05 +03:00
										 |  |  | //           Please head to http(s)://yourdomain.com/create-server-config.php | 
					
						
							|  |  |  | //		        Wait until script finishes. | 
					
						
							|  |  |  | //               Then delete it from your document root. | 
					
						
							| 
									
										
										
										
											2020-08-14 15:11:42 +03:00
										 |  |  | // If you don't want to allow php to access your root directory or if you have permission | 
					
						
							|  |  |  | //                issues please follow the steps below. | 
					
						
							|  |  |  | // -------------------------- | 
					
						
							|  |  |  | // FOR IIS: | 
					
						
							|  |  |  | // Rename IISWebConfig to web.config | 
					
						
							|  |  |  | // FOR Apache and Nginx | 
					
						
							|  |  |  | // Rename ApacheHtaccess to .htaccess | 
					
						
							|  |  |  | // -------------------------- | 
					
						
							| 
									
										
										
										
											2020-08-14 14:58:05 +03:00
										 |  |  | //   Contributors: | 
					
						
							| 
									
										
										
										
											2020-08-14 15:11:42 +03:00
										 |  |  | //   Vojtěch Sajdl - Yigit Kerem Oktay - Thomas Nilsen - jhuesser | 
					
						
							| 
									
										
										
										
											2020-08-14 14:58:05 +03:00
										 |  |  | /**************************************************************************************/ | 
					
						
							| 
									
										
										
										
											2018-01-13 03:00:13 +01:00
										 |  |  | session_start(); | 
					
						
							| 
									
										
										
										
											2020-08-14 14:58:05 +03:00
										 |  |  | //Start editing here | 
					
						
							| 
									
										
										
										
											2020-08-16 23:34:13 +03:00
										 |  |  | //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 | 
					
						
							| 
									
										
										
										
											2018-08-02 11:48:10 +02: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 14:15:20 +01:00
										 |  |  | define("POLICY_URL","##policy_url##"); | 
					
						
							| 
									
										
										
										
											2018-11-24 22:19:06 +01:00
										 |  |  | define('SUBSCRIBE_EMAIL', true); | 
					
						
							|  |  |  | define('SUBSCRIBE_TELEGRAM', false); | 
					
						
							| 
									
										
										
										
											2020-08-15 21:09:57 +02:00
										 |  |  | define("TG_BOT_API_TOKEN", "##tg_bot_token##"); //Telegram Bot Token | 
					
						
							| 
									
										
										
										
											2018-06-07 10:33:59 +02:00
										 |  |  | define("TG_BOT_USERNAME", "##tg_bot_username##"); //Telegram Bot username | 
					
						
							| 
									
										
										
										
											2017-11-24 00:09:36 +01:00
										 |  |  | define("INSTALL_OVERRIDE", false); | 
					
						
							| 
									
										
										
										
											2017-12-31 02:26:04 +01:00
										 |  |  | define("DEFAULT_LANGUAGE", "en_GB"); | 
					
						
							| 
									
										
										
										
											2018-11-24 22:19:06 +01:00
										 |  |  | 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 | 
					
						
							| 
									
										
										
										
											2020-08-15 21:09:57 +02:00
										 |  |  | define("PHP_MAILER_SECURE", ""); // Set to TLS or SSL or leave blank for plaintext | 
					
						
							| 
									
										
										
										
											2018-11-24 22:19:06 +01:00
										 |  |  | define("PHP_MAILER_USER", "##phpmailer_user##");  // SMTP Authentication user | 
					
						
							|  |  |  | define("PHP_MAILER_PASS", "##phpmailer_pass##");  // SMTP authenticatin password | 
					
						
							| 
									
										
										
										
											2020-08-14 19:52:18 +03:00
										 |  |  | define("CUSTOM_LOGO_URL",""); // This will use the default logo if left empty | 
					
						
							| 
									
										
										
										
											2020-08-14 20:02:42 +03:00
										 |  |  | define("COPYRIGHT_TEXT",""); // Leave this empty if you don't want your copyright displayed | 
					
						
							| 
									
										
										
										
											2020-08-15 21:09:57 +02:00
										 |  |  | define("CRON_SERVER_IP",""); // IP Address that will be used to call cron task. Leave empty if not used! | 
					
						
							| 
									
										
										
										
											2020-08-14 20:02:42 +03:00
										 |  |  | // Without COPYRIGHT_TEXT Set | 
					
						
							|  |  |  | // 2020 Server Status Project Contributors | 
					
						
							|  |  |  | // With COPYRIGHT_TEXT Set | 
					
						
							|  |  |  | // 2020 Server Status Project Contributors and COPYRIGHT_TEXT | 
					
						
							| 
									
										
										
										
											2020-08-14 14:58:05 +03:00
										 |  |  | //Stop editing | 
					
						
							| 
									
										
										
										
											2018-01-07 20:39:10 +01:00
										 |  |  | require("classes/locale-negotiator.php"); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-07 20:43:04 +01:00
										 |  |  | $negotiator = new LocaleNegotiator(DEFAULT_LANGUAGE); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-01-07 20:39:10 +01:00
										 |  |  | if (!isset($_SESSION['locale'])||isset($_GET['lang'])) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	$override = ((isset($_GET['lang']))?$_GET['lang']:null); | 
					
						
							|  |  |  | 	$best_match = $negotiator->negotiate($override); | 
					
						
							|  |  |  | 	$_SESSION['locale'] = $best_match; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-23 17:03:08 +02:00
										 |  |  | putenv('LANGUAGE='.$_SESSION['locale'].'.UTF-8'); | 
					
						
							| 
									
										
										
										
											2018-01-12 21:35:31 +01:00
										 |  |  | setlocale(LC_ALL, $_SESSION['locale'].".UTF-8"); | 
					
						
							|  |  |  | setlocale(LC_MESSAGES, $_SESSION['locale'].".UTF-8"); | 
					
						
							|  |  |  | bindtextdomain("server-status", __DIR__ . "/locale/"); | 
					
						
							| 
									
										
										
										
											2020-08-15 21:09:57 +02:00
										 |  |  | bind_textdomain_codeset("server-status", "utf-8"); | 
					
						
							| 
									
										
										
										
											2018-01-12 21:35:31 +01:00
										 |  |  | textdomain("server-status"); | 
					
						
							| 
									
										
										
										
											2017-12-31 02:26:04 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-24 00:09:36 +01:00
										 |  |  | //Database connection | 
					
						
							|  |  |  | $mysqli = new mysqli("##server##","##user##","##password##","##database##"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if ($mysqli->connect_errno) { | 
					
						
							| 
									
										
										
										
											2018-01-07 20:39:10 +01:00
										 |  |  |     printf(_("Connection failed: %s\n"), $mysqli->connect_error); | 
					
						
							| 
									
										
										
										
											2017-11-24 00:09:36 +01:00
										 |  |  |     exit(); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-14 14:58:05 +03:00
										 |  |  | $mysqli->set_charset("utf8"); |