<? session_start();?>
<?php include("anti_sql2.php") ?>
<?php include("conn.php") ?>

<? 


$read_db_id=$_GET["id"];
//------------------------------将EXAMINFO.----------
$read_database_name=$_SESSION["database_name"];

?>

<?php  
 
   $codeobj=new com("datacode.dbcode"); 
  
?>

<? 

//------------------------------将EXAMINFO.----------

$sql="select  *  from  ".$read_database_name;
$sql=$sql."   where  id=".$read_db_id;
$rs=$conn->execute($sql);

if (!$rs->EOF)
{

  $read_an=$rs->fields["正确答案"];
  if ($read_an!='')
  {
	$db_answer=$codeobj->uncodetxt_data($read_an);
	$db_answer=iconv("gb2312","utf-8",$db_answer); 
  } 

} 


$cc="";
//------------------将中文--编码----成220335--------------------------
$cc=$db_answer;

if (trim($db_answer)!='')
{
  echo  "1".$cc;
}
  else
{

  echo  "0";
} 


$rs->close;
$conn->close;
$objcode=null;

?>
