<?
  echo '<br><div align="center">
<FORM ACTION="';
  echo $php_self;
  echo '" METHOD="post" name="LOG_IN">


';
  if ($_GET['cat_id'] != '')
  {
    $SQL = '' . 'SELECT * FROM categories WHERE instr(\'' . $_GET['cat_id'] . '\',name)';
    if (!($result = mysql_query ($SQL)))
    {
      exit ('<b>Error:</b>' . mysql_error ());
      ;
    }

    $row = mysql_fetch_array ($result);
  }

  if (($_GET['id'] != '' AND !$_GET['words']))
  {
    $SQL2 = '' . 'SELECT * FROM articles WHERE id=' . $_GET['id'];
    if (!($result2 = mysql_query ($SQL2)))
    {
      exit ('<b>Error:</b>' . mysql_error ());
      ;
    }

    $row2 = mysql_fetch_array ($result2);
    $SQL = '' . 'SELECT * FROM categories WHERE instr(\'' . $row2['category'] . '\',name)';
    if (!($result = mysql_query ($SQL)))
    {
      exit ('<b>Error:</b>' . mysql_error ());
      ;
    }

    $row = mysql_fetch_array ($result);
  }

  echo '
<input type="hidden" name="cat_id" value="';
  echo $_GET['cat_id'];
  echo '">
<input type="hidden" name="id" value="';
  echo $_GET['id'];
  echo '">
<input type="hidden" name="visitor_allow" value="';
  echo $row['id'];
  echo '">

<table width="250" border="0" cellspacing="0" cellpadding="5" style="border: 1px solid Navy;">
<TR><td align="center"><font color="#800000"><b>Members login</b></font></td><TD ALIGN=right><img src="inc/images/login.gif" border="0"></TD></TR>
<TR><TD ALIGN=right colspan=2 BGCOLOR="#DCDCED">


<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=3 ALIGN=center>
<TR>
	<TD ALIGN=right><FONT STYLE="color: Navy; font-f';
  echo 'amily: Tahoma; font-size: 12px;">Username:</FONT></TD>
	<TD> <INPUT TYPE=text NAME="username" STYLE="font-family: Tahoma; font-size: 11px; color: Navy;"></TD>
</TR>
<TR>
	<TD ALIGN=right><FONT STYLE="color: Navy; font-family: Tahoma; font-size: 12px;">Password:</FONT></TD>
	<TD><INPUT TYPE=password NAME="password" STYLE="font-family: Tahoma; font-size: 11px; color: Navy;"></TD>
</TR>
<TR>
	<TD ALIGN=right>';
  echo '</TD>
	<TD>
		<INPUT TYPE=submit NAME="login" VALUE="Login" STYLE="width: 70px;">
	</TD>
	
</TR>
</TABLE>

</TD></TR></TABLE>
</FORM>
</div>';
?>
