2017-11-24 00:09:36 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								<?php
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//This is config file, please be careful
							 
						 
					
						
							
								
									
										
										
										
											2018-01-13 03:00:13 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								session_start();
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 00:09:36 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								//You can change these:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								define("NAME", '##name##'); //Website name
							 
						 
					
						
							
								
									
										
										
										
											2018-03-10 00:32:06 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								define("TITLE", "##title##");
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 00:09:36 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								define("WEB_URL", "##url##"); //Used for links 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								define("MAILER_NAME", "##mailer##"); //Mailer name
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								define("MAILER_ADDRESS", "##mailer_email##"); //Mailer address
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								define("INSTALL_OVERRIDE", false);
							 
						 
					
						
							
								
									
										
										
										
											2017-12-31 02:26:04 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								define("DEFAULT_LANGUAGE", "en_GB");
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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;
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											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/");
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								bind_textdomain_codeset("server-status", "utf-8"); 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								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();
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$mysqli->set_charset("utf8");
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								//This should later be translatable, maybe find a better solution?
							 
						 
					
						
							
								
									
										
										
										
											2017-12-31 00:41:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$statuses = array(_("Major outage"), _("Minor outage"), _("Planned maintenance"), _("Operational") );
							 
						 
					
						
							
								
									
										
										
										
											2017-11-24 00:09:36 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								$classes = array("danger", "warning", "primary", "success" );
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$icons = array("fa fa-times", "fa fa-exclamation", "fa fa-info", "fa fa-check" );
							 
						 
					
						
							
								
									
										
										
										
											2017-12-31 00:41:58 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$some = array(_("Some systems are experiencing major outages"), _("Some systems are experiencing minor outages"), _("Some systems are under maintenance"));
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								$all = array(_("Our systems are experiencing major outages."), _("Our systems are experiencing minor outages"), _("Our systems are under maintenance"), _("All systems operational"));
							 
						 
					
						
							
								
									
										
										
										
											2018-01-12 22:38:19 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								$permissions = array(_("Super admin"), _("Admin"), _("Editor"));