<?

  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'];
  if (!($result = mysql_query ('' . 'SELECT * FROM poll WHERE id=\'' . $_GET['id'] . '\'')))
  {
    exit ('Query failed4');
    ;
  }

  $row = mysql_fetch_array ($result);
  echo '

<HTML><BODY STYLE="color: Navy;"><LINK HREF="../style.css" REL="stylesheet" TYPE="text/css"><TABLE WIDTH="600" BORDER=0 CELLSPACING=0 CELLPADDING=1><TR><TD style="background-color:#505090;"><TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=5 BGCOLOR="#EFEFF8">

<TR><TD VALIGN=top BGCOLOR="#BFBFDF" STYLE="border-bottom: 1px solid #505090;"><FONT COLOR="navy"><B>';
  echo $admin_Edit_poll;
  echo '</B></FONT> <FONT COLOR="red">';
  echo $row['question'];
  echo '</FONT></TD></TR><TR><TD VALIGN=top>

<FORM ACTION="index.php" METHOD="post">

';
  echo $admin_question;
  echo ': <textarea cols="60" rows="3" name="question">';
  echo $row['question'];
  echo '</textarea><BR><BR>

';
  $cat = split ('
', $row['answer']);
  for ($i = 0; $i < sizeof ($cat); ++$i)
  {
    echo $admin_answer;
    echo ' # ';
    echo $i + 1;
    echo ': <INPUT TYPE=text NAME="answer';
    echo $i;
    echo '" value="';
    echo $cat[$i];
    echo '" size=40><BR>';
  }

  echo '<INPUT TYPE=hidden NAME="id" VALUE="';
  echo $row['id'];
  echo '">
<INPUT TYPE=hidden NAME="ans_count" VALUE="';
  echo sizeof ($cat);
  echo '">
<BR><INPUT TYPE=submit NAME="modify" VALUE="';
  echo $admin_Modify;
  echo '">
<INPUT TYPE=button VALUE="';
  echo $admin_Go_back;
  echo '" onClick="window.location=\'index.php\'">
</FORM>
</TD></TR></TABLE></TD></TR></TABLE></BODY></HTML>';
?>
