<?php 
session_start(); //开着身份验证，以
include("../sql/conn.php"); /////写
header("Content-type: text/html; charset=utf-8"); 
$llym = $_SERVER["HTTP_REFERER"];
?>





<?php
$result = mysql_query("SELECT * FROM ".$b_qz."_zt " );
while($row = mysql_fetch_array($result))
{

	if($row['ks']=='on'){}else{
	echo "<meta http-equiv=refresh content=0.1;url=../ks_cksj.php?adm=".$_SESSION['id']."  >";
	exit;
	}

}
?>





<?php
if($_GET['tj']==tj)
{
if($_POST['a']=='on'){$a = 'A';}else{$a = '';}
if($_POST['b']=='on'){$b = 'B';}else{$b = '';}
if($_POST['c']=='on'){$c = 'C';}else{$c = '';}
if($_POST['d']=='on'){$d = 'D';}else{$d = '';}
$da=$a.$b.$c.$d;

mysql_query("UPDATE ".$b_qz."_dt SET d='".$da."' where id='".$_GET['id']."' " );/// DESC 

$result = mysql_query("SELECT * FROM ".$b_qz."_dt where (d is null or d='') and adm='".$_SESSION['id']."' ORDER BY id LIMIT 0,1" );//
while($row = mysql_fetch_array($result))
{
$tz = $row['id'];
$t_ans = $row['z'];
}

if($tz=='')
{
echo "<script>alert('全部完成！');</script>";
echo "<meta http-equiv=refresh content=0.1;url=../ks_ks.php >";
exit;
}


if($_SESSION['wdms']=='ok')
{
echo "<meta http-equiv=refresh content=0.1;url=../ks_ks2.php?d=S".$t_ans."F&id=".$tz." >";
}else{
echo "<meta http-equiv=refresh content=0.1;url=../ks_ks2.php?id=".$tz." >";
}

exit;

}
?>


<?php include("../sql/close.php"); /////写?>



