<?php

// Folders we do not index
$folderListIgnore = array ('.','..','safe','menu','var','phpMyAdmin','ktree');

// List installed applications
$folderList = '';
$directories = array_diff(scandir("."), $folderListIgnore);	
foreach($directories as $entry) {
	if(is_dir($entry)) {
      $folderList .= '<h2><a href="'.$entry.'">'.$entry.'</a></h2>';
    }	
}
if (!isset($folderList))
	$folderList = 'No Installed Applications Found';
	
$pageContents = <<< EOPAGE
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>DynPro India Private Limited</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex">
<link rel="stylesheet" type="text/css" href="menu/style.css" media="screen" />
</head>
<body>
  <title>DynPro India Private Limited Management Information System</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <link rel="stylesheet" type="text/css" href="menu/style.css" media="screen" />
  <title>DynPro India Private Limited MIS</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <link rel="stylesheet" type="text/css" href="menu/style.css" media="screen" />

  <div id="wrap">
    <div id="header">
      <h1><a href="#">DynPro India Private Limited</a></h1>
      <h2>Management Information System</h2>
    </div>
    <div id="content">
      <div class="innercontent">
		$folderList
      </div>
      <div style="clear: both; "> </div>
    </div>
    <div id="bottom"> </div>
  </div>
  <div id="footer">
&copy; Copyright by <a href="#">DynPro India Private Limited</a>
</div></body>
</html>
EOPAGE;

echo $pageContents;
?>
