<?

  include_once '../config.inc.php';
  if (!include 'autorization.php')
  {
    echo 'Access denied!';
    exit ();
  }

  if (!($result_proper = mysql_query ('select * from properties')))
  {
    exit ('<b>Error:</b>' . mysql_error ());
    ;
  }

  $proper = mysql_fetch_array ($result_proper);
  include 'lang/' . $proper['admin_language'];
  echo '
<HTML><body bgcolor="#EFEFF8">
';
  echo '<s';
  echo 'tyle type="text/css">
a:link {font-family:Tahoma; font-size:11; color:black; text-decoration: none;}
a:visited {font-family:Tahoma; font-size:11; color:black; text-decoration: none;}
a:hover {font-family:Tahoma; font-size:11; text-decoration: underline; color: red;}
</style>

<TABLE BORDER="0" CELLPADDING="5" ALIGN="center">

';
  $menu = array ('Properties', 'Articles', 'Categories', 'Manage Users', 'Banner Management', 'Poll Management', 'Newsletter', 'Session Tracking', 'Top Menu', 'Templates', 'Help');
  if ($_COOKIE['root'])
  {
    for ($i = 0; $i < sizeof ($admin__menu); ++$i)
    {
      echo '		<TR onMouseover="this.style.backgroundColor=\'#BFBFDF\'" onMouseOut="this.style.backgroundColor=\'#EFEFF8\'">
			<TD><A HREF="topmenu.php?menu=';
      echo $menu[$i];
      echo '" TARGET="topmenu" onClick="parent.parent.frames[3].location = \'inc/';
      echo $menu[$i];
      echo '.html\';"><IMG SRC="images/';
      echo $menu[$i];
      echo '.gif" BORDER="0"></A></TD>
			<TD><A HREF="topmenu.php?menu=';
      echo $menu[$i];
      echo '" TARGET="topmenu" onClick="parent.parent.frames[2].location = \'inc/';
      echo $menu[$i];
      echo '.html\';">';
      echo $admin__menu[$i];
      echo '</A></TD>
		<TR>
	';
    }
  }
  else
  {
    if ($_COOKIE['editor'])
    {
      echo '	<TR onMouseover="this.style.backgroundColor=\'#EFEFF8\'" onMouseOut="this.style.backgroundColor=\'#DCDCED\'">
		<TD><A HREF="topmenu.php?menu=Articles" TARGET="topmenu" onClick="parent.parent.frames[2].location = \'inc/Articles.html\';"><IMG SRC="images/Articles.gif" BORDER=0></A></TD><TD><A HREF="topmenu.php?menu=Articles" TARGET="topmenu" STYLE="font-size:11;">';
      echo $admin__menu[1];
      echo '</A></TD>
	</TR>
	<TR onMouseover="this.style.backgroundColor=\'#EFEFF8\'" onMouseOut="this.style.backgroundColor=\'#DCDCED\'">
		<TD><A HREF="topmenu.php?menu=Manage Users" TARGET="topmenu" onClick="parent.parent.frames[2].location = \'inc/User Management.html\';"><IMG SRC="images/Manage Users.gif" BORDER=0></A></TD><TD><A HREF="topmenu.php?menu=Manage Users" TARGET="topmenu" STYLE="font-size:11;">';
      echo $admin__menu[2];
      echo '</A></TD>
	</TR>
';
    }
    else
    {
      echo '	<TR onMouseover="this.style.backgroundColor=\'#EFEFF8\'" onMouseOut="this.style.backgroundColor=\'#DCDCED\'">
		<TD><A HREF="topmenu.php?menu=Articles" TARGET="topmenu" onClick="parent.parent.frames[2].location = \'inc/Articles.html\';"><IMG SRC="images/Articles.gif" BORDER=0></A></TD><TD><A HREF="topmenu.php?menu=Articles" TARGET="topmenu" STYLE="font-size:11;">';
      echo $admin__menu[1];
      echo '</A></TD>
	</TR>
';
    }
  }

  echo '
<TR>
<td colspan="2">
	<A HREF="index.php?logout=yes" TARGET="_top">
	<IMG SRC="images/Logout.gif" BORDER=0>
	</A>
</td>
</TR>
</TABLE>

</BODY></HTML>';
?>
