<?php

		require_once("initialize.php");
		require_once("FeatureManager.php");
		
		if (@$_REQUEST['logout'] == "true")
		{
			print "<meta http-equiv='REFRESH' content='.1;url=..'>";
			exit();
		}
			
?>


<?php include('top.php'); ?>


						<center>

							<!-- colored border table -->
							<table class="borderTable" border="0" cellspacing="0" cellpadding="0" width="60%">
								<tr>
									<td>

										<!-- Management Functions Table -->
										<table cellspacing="1" cellpadding="4" border="0" width="100%">
											<tr class="tableTitleCell">
												<td align="center" colspan="3">
													<font class="tableHeaderFont">Management Functions</font>
												</td>
											</tr>

											<?php
												$featureManager = new FeatureManager($GLOBALS['databaseConnection'], $GLOBALS['securityManager']);
												$featureArray = $featureManager->getFeatures($userInfo['securityLevel'], 1);

												$index = 0;
												$rowCount = 0;
												foreach ($featureArray as $feature)
												{
													if ($index % 3 == 0)
													{
														$rowCount++;
														if ($index != 0)
															print "</tr>";

														if ($rowCount % 2 != 0)
															$bgColor = "#FFFFFF";
														else
															$bgColor = "#EEEEEE";

														print "<tr bgcolor='$bgColor'>";
													}

													print "<td align='center' width='33%'><a href='$feature[url]' class='normalFont'>$feature[displayName]</a></td>";
													$index++;
												}

												while ($index++ % 3 != 0)
													print "<td width='33%'></td>";
												print "</tr>";


											?>
										</table>
									</td>
								</tr>
							</table>

						</center>
						
						<br><br><br>
<?php include('bottom.php'); ?>
