<?php 
session_start();

if($_SESSION['dbName']==""){
	header("location:../index.php");
}
include("config.inc.php");

//echo $_SESSION['dbName'];exit;

$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass']) or die("Could not connect to DB");
mysql_select_db($_SESSION['dbName'],$connection) or die("Could not find DB");



$querylog="select * from ".$_SESSION['dbLabel'].".login where user_account='".$_SESSION['useraccount']."'";
$resultlog=mysql_query($querylog) or die(mysql_error());
while($rows=mysql_fetch_array($resultlog)){
	extract($rows);
}

$query="select * from module";
$result=mysql_query($query,$connection) or die(mysql_error());
while($row=mysql_fetch_array($result)){
  extract($row);
  $_SESSION['module']=$Module_Delivery;
}
 

 
//mysql_close($connection);
print <<<HERE
<html >
<head>

 

<meta http-equiv="Content-Type" content="text/html; charset=windows-1256" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<link rel="stylesheet" type="text/css" media="all" href="css-v2/style.css">
<script type="text/javascript" src="js/grid/jquery-1.9.1.js"></script>
HERE;

echo"<title>Datacom Web</title>


<body>";
echo"<table cellpadding='0' cellspacing='0' border='0'  align='center' class='layout-width'>";
include_once("header.php");
echo" <tr><td  valign='top'>";



include_once("menubar.php");
include_once("sidemenu.php");
echo"  </td></tr>";



if(isset($_GET['warning_to_change']) && $_GET['warning_to_change'] > 0)
{
   echo "<script>
         alert('You have to change your password!!');
		 </script>";
		 
}
 
 echo"<tr><td><table align='center' border='0'><tr height=50px><td>&nbsp;</td></tr><tr><td><img src='img/DataCOMLogo.png'  width=940 height=480></img>
 ";

echo"	  </td></tr>
	 </table></td></tr>
	</table>";
 echo" 
</body>
</html>";

?>