<?php session_start();

error_reporting(1);



/*$servername = "localhost";

$username	= "azaheer";

$password	= "9x716bPIXaym";

$db		= "azaheer_inventory";*/

$servername = "localhost";

$username	= "equivale";

$password	= "Perfumes&Cosmetica:2015";

$db		= "equivale_sintra";


$con = mysql_connect($servername,$username,$password);



if(!$con)

  {

  die('Could not connect: ' . mysql_error());

  }

mysql_select_db($db,$con);

 



// Section for Session Time out 

//	 set timeout period in seconds 

	$inactive = 3600;	// 1 hour  (1 min = 60 sec)

	

	// check to see if $_SESSION['timeout'] is set

	if(isset($_SESSION['timeout']) ) {

		$session_life = time() - $_SESSION['timeout'];

		if($session_life > $inactive)

			{ 

				/*session_destroy();

				//unset($_SESSION['admin_id']);

				$_SESSION['re_login'] = 'yes';

				echo("<script>");	

				echo("window.location=login.php");

				echo("</script>");	

				exit();*/

			//	redirect("login.php");

				 

			}

	}

	$_SESSION['timeout'] = time();	  

?>