File: //home/surajaut/public_html/admin/welcome.php
<?php
session_start();
// set time-out period (in seconds)
$inactive = 600;
// check to see if $_SESSION["timeout"] is set
if (isset($_SESSION["timeout"])) {
// calculate the session's "time to live"
$sessionTTL = time() - $_SESSION["timeout"];
if ($sessionTTL > $inactive) {
session_destroy();
header("Location: logout.php");
}
}
$_SESSION["timeout"] = time();
if($_SESSION['username'] == '') { header('location:index.php'); }
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Suraj Automobiles</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="keywords" content="Your keywords">
<meta name="author" content="Your name">
<link rel="stylesheet" type="text/css" media="screen" href="../styles.css">
<!--<link href='http://fonts.googleapis.com/css?family=Ruthie' rel='stylesheet' type='text/css'>-->
<script src="../js/jquery-1.7.2.min.js"></script>
<script src="../js/menu.js"></script>
</head>
<body>
<!--==============================header=================================-->
<div class="content_my">
<div class="grid_12">
<div align="center">
<h1 class="extra-wrap"><a href="#"><img src="../images/suraj-auto.png"></a></h1>
</div>
<div class="clear"></div>
<nav>
<ul class="sf-menu">
<li style="width:150px;" class="current"><a href="welcome.php">Home</a></li>
<li style="width:200px;"><a href="#">Manage Images</a>
<ul>
<li><a href="add_images.php">Add Images</a></li>
<li><a href="view_images.php">View Images</a></li>
<li><a href="page_wise.php">View Page Wise</a></li>
</ul>
</li>
<li style="width:200px;"><a href="page_contents.php">Edit Page Contents</a></li>
<li style="width:180px;"><a href="change_password.php">Change Password</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
<div class="clear"></div>
</nav>
<!--==============================footer=================================-->
<footer class="wrapper top-8">
<div class="content_my">
<div class="grid_12 border-2"></div>
<div class="clear"></div>
<div class="grid_6" style="height:300px;">
<h3>Welcome to Admin Panel. </h3>
<p class="top-1">Here you can add images page wise , edit image names, delete old images and add new one.<br/><br/> </p>
</div>
<div class="grid_12 border-2"></div>
<div class="clear"></div>
<div class="grid_6"><p class="top-1">Suraj Automobiles © 2013 : <a class="color-2" href="#">Privacy Policy</a><br />
<!-- Do not remove -->Design by <a class="color-2" href="http://www.visualcreations.in">Visual Creations</a><!-- end --></p>
</div>
</div>
</footer>
</div>
</div>
</body>
</html>