<?php
error_reporting(E_ALL);


// Adds X-Frame-Options to HTTP header, so that page can only be shown in an iframe of the same site.
header('X-Frame-Options: SAMEORIGIN'); // FF 3.6.9+ Chrome 4.1+ IE 8+ Safari 4+ Opera 10.5+
/*
// Adds the Content-Security-Policy to the HTTP header.
// JavaScript will be restricted to the same domain as the page itself.
header("Content-Security-Policy: default-src 'self'; script-src 'self';"); // FF 23+ Chrome 25+ Safari 7+ Opera 19+
header("X-Content-Security-Policy: default-src 'self'; script-src 'self';"); // IE 10+

// Adds the HTTP Strict Transport Security (HSTS) (remember it for 1 year)
$isHttps = !empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off';
if ($isHttps)
{
  header('Strict-Transport-Security: max-age=31536000'); // FF 4 Chrome 4.0.211 Opera 12
}*/



/*
define("servername" ,"localhost");
define("username" , "qsolutionsug_buganda_databank");
define("password" , "buganda_databank");
define("dbname" , "qsolutionsug_buganda_databank");

*/

define("servername" ,"localhost");
define("username" , "upstreamlogistic_pos_spotwash");
define("password" , ',y@9-d$twcIi');
define("dbname" , "upstreamlogistic_pos_spotwash");



// Create connection
$conn = new mysqli(servername, username, password, dbname);
// Check connection
if ($conn->connect_error) {
    die("Connection failed: " );
} 
//include_once("security.php");



//classes

if (is_file('config/Security.php')){
    require_once('classes/UserLogs.php');
	require_once('classes/GetClientIP.php');
	require_once('classes/GetBrowser.php');
	require_once('config/Security.php');


}else{
	 require_once('classes/UserLogs.php');
	require_once('classes/GetClientIP.php');
	require_once('classes/GetBrowser.php');
	require_once('config/Security.php');

}





		//Get UUID_SHORT();
		function getUuidShort($conn){
						$result = $conn->query("SELECT UUID_SHORT() LIMIT 1;");
						$res = $result->fetch_array();
						return $res[0];
		}


?>