<?php

// THIS IS FOR LOCAL VERSION

//define('DB_SERVER', 'exotic-intl.com');
//define('DB_USERNAME', 'exotic_excursion');
//define('DB_PASSWORD', '5MGtMfPk*sN~');
//define('DB_DATABASE', 'exotic_excursion');
//$db = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
//
//
//define('DB_SERVER_Access', 'exotic-intl.com');
//define('DB_USERNAME_Access', 'exotic_android');
//define('DB_PASSWORD_Access', 'QZIcl^tQ9ctg');
//define('DB_DATABASE_Access', 'exotic_android');
//$dbonline = mysqli_connect(DB_SERVER_Access, DB_USERNAME_Access, DB_PASSWORD_Access, DB_DATABASE_Access);




// THIS IS FOR ONLINE VERSION

define('DB_SERVER', 'exotic-intl.com');
define('DB_USERNAME', 'exotic_ce');
define('DB_PASSWORD', 'Imation@123');
define('DB_DATABASE', 'exotic_excursion_ce');
$db = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_DATABASE);


// define('DB_SERVER_Access', 'localhost');
// define('DB_USERNAME_Access', 'exotic_android');
// define('DB_PASSWORD_Access', 'imation@123');
// define('DB_DATABASE_Access', 'exotic_android');
// $dbonline = mysqli_connect(DB_SERVER_Access, DB_USERNAME_Access, DB_PASSWORD_Access, DB_DATABASE_Access);

function setUserSignOut()
{
    $idletime = 600000; //after 600 seconds the user gets logged out
    if (time() - $_SESSION['timestamp'] > $idletime) {
        session_start();
        session_unset();
        header("Location: sign-in.php");
    } else {
        $_SESSION['timestamp'] = time();
    }
}
