【php开源代码栏目提醒】:网学会员--在 php开源代码编辑为广大网友搜集整理了:ksks.php绩等信息,祝愿广大网友取得需要的信息,参考学习。
<?php session_start();include("conn/conn.php");
if($_SESSION[online_number]!=""){
$kt_lbes=$_POST[kt_lbes];
$kt_small_lb=$_POST[kt_small_lb];
$query=mssql_query("select * from tb_user where online_number='$_SESSION[online_number]' and online_pt='1'");
$result=mssql_num_rows($query);
if($result==0){
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>在线考试
系统</title>
<style type="text/css">
<!--
.STYLE4 {color: #FF0000}
.STYLE1 {font-size: 12px}
-->
</style>
<script language=javascript>
function keydown(){
if(event.keyCode==8){
event.keyCode=0;
event.returnValue=false;
alert("当前设置不允许使用退格键");
}if(event.keyCode==13){
event.keyCode=0;
event.returnValue=false;
alert("当前设置不允许使用回车键");
}if(event.keyCode==116){
event.keyCode=0;
event.returnValue=false;
alert("当前设置不允许使用F5刷新键");
}if((event.altKey)&&((window.event.keyCode==37)||(window.event.keyCode==39))){
event.returnValue=false;
alert("当前设置不允许使用Alt+方向键←或方向键→");
}if((event.ctrlKey)&&(event.keyCode==78)){
event.returnValue=false;
alert("当前设置不允许使用Ctrl+n新建IE窗口");
}if((event.shiftKey)&&(event.keyCode==121)){
event.returnValue=false;
alert("当前设置不允许使用shift+F10");
}
}
</script>
<script language=javascript>
function click() {
event.returnValue=false;
alert("当前设置不允许使用右键!");
}
document.oncontextmenu=click;
</script>
</head>
<body onkeydown="keydown()">
<table width="750" height="30" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#666666">
<tr>
<td width="165" height=23 align=right nowrap bgcolor="#EEEEEE"><span class="STYLE1">考试时间:</span></td>
<td width="42" nowrap bgcolor="#EEEEEE"><span class="STYLE1"><font color="#FF0000">20</font>分钟</span></td>
<td width="58" align="center" nowrap bgcolor="#EEEEEE"><span class="STYLE1">计 时</span></td>
<td width="193" nowrap bgcolor="#EEEEEE"><span class="STYLE1">
<script type="text/javascript" src="js/xmlHttpRequest.js"></script>
<script type="text/javascript">
timer = window.setInterval("ShowTime()",1000);
function ShowTime(){
xmlHttp.open("post","showtime.php", true);
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4){
tet = xmlHttp.responseText;
document.getElementById("show_time").innerHTML = tet;
}
}
xmlHttp.send(null);
}
</script>
</span>
<div class="STYLE1" id="show_time"></div></td>
<td width="77" align="center" nowrap bgcolor="#EEEEEE"><span class="STYLE1">剩余时间:
<script type="text/javascript">
time = window.setInterval("sparetime()",1000);
function sparetime(){
xmlHttp.open("post","sparetime.php", true);
xmlHttp.onreadystatechange = function(){
if(xmlHttp.readyState == 4){
tet = xmlHttp.responseText;
document.getElementById("sparetime").inner
HTML = tet;
if(tet=="00:00"){
form1.submit();
}
}
}
xmlHttp.send(null);
}
</script>
</span>
</td>
<td width="182" nowrap bgcolor="#EEEEEE"><div class="STYLE1" id="sparetime"></div></td>
</tr>
</table>
<form name="form1" method="post" action="index.php?online=开始考试">
<table width="750" height="228" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#666666">
<tr><td height="20" colspan="2" bgcolor="#EEEEEE" class="STYLE1"> 单选</td>
</tr>
<?php
$query0=mssql_query("select * from tb_kt where kt_lb='$kt_lbes' and kt_lx='0' and kt_small_lb='$kt_small_lb'");
$x=1;
$fen0=0;
while($myrow0=mssql_fetch_array($query0)){
?>
<tr>
<td width="443" height="20" bgcolor="#FFFFFF" class="STYLE1"> <?php echo $x.".".$myrow0["kt_nr"]?> </td>
<td bgcolor="#FFFFFF" class="STYLE1"><span class="STYLE4"><?php echo $myrow0[kt_fs];?>分</span></td>
</tr>
<?php
$array0=explode("*",$myrow0["kt_daan"]);
if($_POST[Submit]!=""){
for($a=0;$a<count($array0);$a++){
if($array0[$a]!=""){
if($array0[$a]==$_POST[$myrow0[kt_id]]) {
$str0=$_POST[$myrow0[kt_id]];
}
}
}
}
for($a=0;$a<count($array0);$a++){
if($array0[$a]!=""){
?>
<tr>
<td height="20" bgcolor="#FFFFFF" class="STYLE1">
<input type="radio" name="<?php echo $myrow0[kt_id];?>" value="<?php echo $array0[$a];?>">
<?php echo $array