<?php include("session.php"); ?>
<html>
<head>
<title>前景网考企业版</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<?php include("conn.php") ?>

<? 

$read_juan_id=$_GET["juan_id"];

$sql="select  *  from  database_name  where   id=";
$sql=$sql."  (select  database_id  from  fenlei   where   id=".$read_juan_id.")";
$rs=$conn->execute($sql);


if (!$rs->EOF)
{
  $read_database_name=$rs->fields["database_name"];
   
} 

$rs->close;
$conn->close;


?>
 

<? 

$read_stuid=$_GET["stuid"];
$read_stuname=$_GET["stuname"];
$read_stuclass=$_GET["stuclass"];

$read_zongfen=$_GET["zongfen"];
$read_falltime=$_GET["falltime"];
$read_exammode=$_GET["exammode"];
$read_shitihao=$_GET["shitihao"];


//---------整个系统只定义3个SESSION--------------------------------------
// 
//-------------------控制学生端正常登录----------------------------------
$_SESSION['stu_log']=1;
//-----------------------第一个SESSION-----------------------------------

{   
    //随机练习不可重复赋值-------，登录是已经赋值了---------------------------
	//$_SESSION['studentid']=$read_stuid;
}

//----------------------第二个SESSION ---------------------------------
$_SESSION['exam_mode']=$read_exammode;
//-----------------------第三个SESSION ----------------------------------
$_SESSION['database_name']=$read_database_name;
//-----------------------第四个SESSION ----------------------------------
$_SESSION['juan_id']=$read_juan_id;
//----------------------------------------------------------------------

?>

<? 

//--------------------------------------------
$s_exist=0;
$d_exist=0;
$t_exist=0;
$p_exist=0;
$lunshu_exist=0;
$sql="select  *  from    studentanswer    where   stuid='".$read_stuid."'";
$sql=$sql."   and   juan_id=".$read_juan_id;
$rs=$conn->execute($sql);

if (!$rs->EOF)
{

  $get_s=$rs->fields["rom_s"];
  $get_d=$rs->fields["rom_d"];
  $get_t=$rs->fields["rom_t"];
  $get_p=$rs->fields["rom_p"];
  $get_lunshu=$rs->fields["rom_lunshu"];
  
  if ($get_s!='' || $get_s!="")
  {
    $s_exist=1;
  } 

  if ($get_d!='' || $get_d!="")
  {
    $d_exist=1;
  } 

  if ($get_t!='' || $get_t!="")
  {
    $t_exist=1;
  } 

  if ($get_p!='' || $get_p!="")
  {
    $p_exist=1;
  } 

  if ($get_lunshu!='' || $get_lunshu!="")
  {
    $lunshu_exist=1;
  } 
} 

$rs->close;
$conn->close;

?>



 
 
 

<script language="javascript" src="script/disable_keyf5.js"></script>

<frameset rows="*" cols="230,*" framespacing="0" frameborder="NO" border="0">
  <frame src="newleft.php?stuid=<? echo $read_stuid;?>&stuname=<? echo urlencode($read_stuname);?>&stuclass=<? echo urlencode($read_stuclass);?>&juan_id=<? echo $read_juan_id;?>&zongfen=<? echo $read_zongfen;?>&falltime=<? echo $read_falltime;?>&exammode=<? echo $read_exammode;?>&shitihao=<? echo $read_shitihao;?>" name="myleft" scrolling="NO" noresize marginwidth="2">
<?php if ($s_exist==1) {?>  
   <frame src="a0middle_s.php?page=1" name="mainframe"  scrolling="auto">
<?php } ?>
<?php if ($d_exist==1) {?>  
   <frame src="a0middle_d.php?page=1" name="mainframe"  scrolling="auto">
<?php } ?>
<?php if ($t_exist==1) {?>  
   <frame src="a0middle_tiankong.php?page=1" name="mainframe"  scrolling="auto">
<?php } ?>
<?php if ($p_exist==1) {?>  
   <frame src="a0middle_panduan.php?page=1" name="mainframe"  scrolling="auto">
<?php } ?>
<?php if ($lunshu_exist==1) {?>  
   <frame src="a0middle_lunshu.php?page=1" name="mainframe"  scrolling="auto">
<?php } ?>
   
</frameset>

<noframes><body>
</body></noframes>
</html>

