<?

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

  echo '<HTML><BODY bgcolor=#EFEFF8><LINK HREF="style.css" REL="stylesheet" TYPE="text/css">

';
  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'];
  if ($_COOKIE['root'])
  {
    $LOGGED = 'Administrator';
  }
  else
  {
    if ($_COOKIE['editor'])
    {
      $LOGGED = 'Editor';
    }
    else
    {
      $LOGGED = 'Writer';
    }
  }

  if (!($result = mysql_query ('select * from users')))
  {
    exit ('Invalid query');
    ;
  }

  while ($row = mysql_fetch_array ($result))
  {
    if ($_COOKIE['autorized'] == md5 (md5 ($row['username'] . $row['password'])))
    {
      $granted = $row['username'];
      continue;
    }
  }

  echo '


<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=5 BGCOLOR="#505090">
<TR>
	<TD>
	<FONT COLOR="#FFFFFF">
		';
  echo $admin_Logged_User;
  echo ' <B>';
  echo $granted;
  echo '</B> (';
  echo $LOGGED;
  echo ') - 
		IP: ';
  echo $_SERVER['REMOTE_ADDR'];
  echo '	</FONT>
	</TD>
	<!-- <TD align="right"><FONT COLOR="white" STYLE="font-size: 12px;">Powered by <A HREF="http://www.newsphp.com" TARGET="_blank" STYLE="color: white; font-size: 12px; text-decoration: underline;">NewsPHP.com</A></FONT></TD> -->
</TR>
</TABLE>

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