<?php

session_start();

include_once("bsw/utils.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Entity Matcher - Home</title>
<meta http-equiv="Content-Type" content="text/html; Charset=UTF-8"  /> 
<link rel="stylesheet" href="js/jquery-ui/development-bundle/themes/base/jquery.ui.all.css">
<link rel="stylesheet" href="css/jquery.ui.autocomplete.css">
<link href="style.css" rel="stylesheet" type="text/css" />

<style>
td {
	border-right: 0px solid #C1DAD7;
	border-bottom: 0px solid #C1DAD7;
	background: #fff;
	padding: 6px 6px 6px 12px;
	color: #4f6b72;
}
</style>
</head>

<body>
<div class="main">
 	<div class="top-banner">
	 	<a href="home.php"><img style="padding:5px 5px 5px 5px; border:0px 0px 0px 0px;" src="images/contentm-logo-ffffff.png"/></a> 	 
	 	<p style="padding:0 10px 10px 10px; float:right;"><b>version 1</b></p>
	 	<p style="padding:0 10px 10px 10px; float:right;">Hi, <?php echo "Guest" ?></p>	 
 	</div>
  	<div class="header">
    
    	<div class="header_block">
     
      		<!--  <div class="clr"></div>-->
      		
      			<?php
      				include('general-toolbar.php'); 
      			?>      		
      				<!--  <div class="clr"></div>-->
    	</div>
    	<div class="clr"></div>     	
  	</div>
  	<br><br>
  	<div class="content">
        	<div class="article"> 
				<?php
					$actionsElement = getUserActions("admin");
					if (!is_null($actionsElement)){
			    		echo "<table align=\"center\">";
        		
						for($i = 0 ; $i < $actionsElement->length ; $i++){
							if ($i % 4 == 0){
								echo "<tr>";	
							}
    						$element = $actionsElement->item($i);
    						$iconPath = $element->getAttribute("icon");
    						$iconOffPath = $element->getAttribute("iconOff");
    						$title = $element->getAttribute("title");
    						$url = $element->getAttribute("url");
    						$tooltip = $element->getAttribute("tooltip");
    						echo "<td align=\"center\"><p><b>$title</b></p><p><a href=\"$url\"><img title=\"$tooltip\" onmouseover=\"this.src='images/$iconOffPath';\"
        									onmouseout=\"this.src='images/$iconPath';\" src=\"images/$iconPath\"/></a></p></td>";
							if ($i == $actionsElement->length - 1 || $i % 4 == 3){
								echo "</tr>";
							}
						}
						echo "</table>";
					}
        		?>
        	</div>
  	</div>  
</div>

</body>

</html>