<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>在线考试系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
.STYLE4 {color: #FF0000}
.STYLE1 {font-size: 12px}
.nav{
border : 1px solid #333;
display:block;
width:40px;
height:20px;
float:left;
margin-left:10px;
margin-top:1px;
text-align:center;
}
.naw{
border : 1px solid #333;
display:block;
width:20px;
height:20px;
float:left;
margin-left:10px;
margin-top:1px;
text-align:center;
}
</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>
<?php session_start();
include("conn/conn.php");
//echo $_SESSION[online_number];
if($_SESSION[online_number]!=""){
$kt_lbes=$_POST[kt_lbes];
//$sql="select # from exam_user where online_number='$_SESSION[online_number]' and online_pt='1'";
$query=mysql_query("select * from exam_user where online_number='$_SESSION[online_number]' and online_pt='1'");
$result=mysql_num_rows($query);
//echo $sql;
echo $result;
if($result==0)
{
?>
<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").innerHTML = 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=mysql_query("select * from exam_kt where kt_lb='$kt_lbes' and kt_lx='0'");
$x=1;
$fen0=0;
while($myrow0=mysql_fetch_array($query0)){
?>
<tr>
<td width="443" height="20" bgcolor="#FFFFFF" class="STYLE1">
<a name="<?php echo "c".$x?>"></a>
<?php echo $x."、".$myrow0["kt_nr"]?> </td>
<td bgcolor="#FFFFFF" class="STYLE1"><span class="STYLE4"><?php echo $myrow0[kt_fs];?>分</span>
<?php
if($_POST["ck".$x]!="")
{
?>
<div style="text-align:right">标记:
<input type="checkbox" name="<?php echo "ck".$x?>" value="标记" checked="checked">
</div>
<?php
}
else
{
?>
<div style="text-align:right">标记:
<input type="checkbox" name="<?php echo "ck".$x?>" value="标记">
</div>
<?php
}
?>
</td>
</tr>
<?php
$array0=explode("#",$myrow0["kt_daan"]);
if($_POST[Submittj]!=""){
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">
<?php
if($_POST[$myrow0['kt_id']]==$array0[$a])
{
?>
<input type="radio" name="<?php echo $myrow0['kt_id'];?>" value="<?php echo $array0[$a];?>" checked="checked">
<?php echo $array0[$a];?>
<?php
}
else
{
?>
<input type="radio" name="<?php echo $myrow0['kt_id'];?>" value="<?php echo $array0[$a];?>">
<?php echo $array0[$a];?>
<?php
}
}
}
?> </td>
<td bgcolor="#FFFFFF" class="STYLE1">
<?php
if($_POST[Submittj]!="")
{
if($_POST[$myrow0[kt_id]]==true){
if($myrow0["kt_zqdaan"]==substr($str0,0,1)){
echo "您输入的答案 ";
echo "<font color='#FF0000'>".substr($str0,0,1)."</font>";
echo " 正确 分数:";
echo "<font color='#FF0000'>".$myrow0[kt_fs]."</font>";
$fen0+=$myrow0["kt_fs"];
}else{
echo "您输入的答案 ";
echo "<font color='#FF0000'>".substr($str0,0,1)."</font>";
echo " 错误 ";
echo "正确答案: <font color='#FF0000'>".substr($myrow0[kt_zqdaan],0,1)."</font>" ;
}
?></td>
<?php
}
}
$x++;
}
?>
<tr>
<td height="20" bgcolor="#FFFFFF" class="STYLE1"> </td>
<td bgcolor="#FFFFFF" class="STYLE1"> </td>
</tr>
<tr>
<td height="20" colspan="2" bgcolor="#EEEEEE" class="STYLE1"> 多选</td>
</tr>
<?php
$query1=mysql_query("select * from exam_kt where kt_lb='$kt_lbes' and kt_lx='1'");
$y=1;
$fen1=0;
while($myrow1=mysql_fetch_array($query1)){
//$ii=0;
?>
<tr>
<td height="20" bgcolor="#FFFFFF" class="STYLE1"><a name="<?php echo "d".$y?>"></a> <?php echo $y."、".$myrow1['kt_nr']?> </td>
<td bgcolor="#FFFFFF" class="STYLE1"><span class="STYLE4"><?php echo $myrow1['kt_fs'];?>分</span>
<?php
if($_POST["dx".$y]!="")
{
?>
<div style="text-align:right">标记:
<input type="checkbox" name="<?php echo "dx".$y?>" value="标记" checked="checked">
</div>
<?php
}
else
{
?>
<div style="text-align:right">标记:
<input type="checkbox" name="<?php echo "dx".$y?>" value="标记">
</div>
<?php
}
?>
</td>
</tr>
<?php
$array1=explode("#",$myrow1["kt_daan"]);
$str1=explode("#",$myrow1["kt_zqdaan"]);
for($i=0;$i<count($array1);$i++){
if($array1[$i]!=""){
?>
<tr>
<td height="20" bgcolor="#FFFFFF" class="STYLE1">
<?php
if($_POST[$myrow1[kt_id]."-".$i]!="")
{
?>
<input type='checkbox' name='<?php echo $myrow1[kt_id]."-".$i?>' value='<?php echo
没有合适的资源?快使用搜索试试~ 我知道了~
用php开发的网络在线考试系统
共199个文件
gif:88个
php:58个
js:15个
3星 · 超过75%的资源 需积分: 10 62 下载量 168 浏览量
2009-05-29
17:04:28
上传
评论 1
收藏 1.18MB RAR 举报
温馨提示
本系统主要功能分:考生注册、考生登录、考试规则、成绩查询、在线交流答疑、在线考试及后台管理(后台登陆、考生信息管理、考题类别管理、考题添加等)
资源推荐
资源详情
资源评论
收起资源包目录
用php开发的网络在线考试系统 (199个子文件)
fckeditor.asp 6KB
fck_editor.css 7KB
fck_dialog.css 5KB
fck_editorarea.css 2KB
fck_internal.css 1KB
style.css 411B
fck_dialog_common.css 282B
Thumbs.db 44KB
index_top.gif 58KB
bg_dl.gif 37KB
22.gif 13KB
31.gif 13KB
29.gif 10KB
3.gif 8KB
4.gif 8KB
24.gif 8KB
19.gif 7KB
index_line.gif 7KB
39.gif 6KB
16.gif 6KB
18.gif 5KB
36.gif 5KB
fck_strip.gif 5KB
34.gif 5KB
49.gif 5KB
32.gif 4KB
20.gif 4KB
12.gif 4KB
57.gif 4KB
47.gif 4KB
42.gif 4KB
13.gif 4KB
37.gif 4KB
45.gif 3KB
54.gif 3KB
30.gif 3KB
64.gif 3KB
61.gif 3KB
15.gif 3KB
41.gif 3KB
8.gif 3KB
14.gif 3KB
5.gif 2KB
11.gif 2KB
44.gif 2KB
7.gif 2KB
10.gif 2KB
35.gif 2KB
21.gif 2KB
59.gif 2KB
logo_fckeditor.gif 2KB
28.gif 2KB
9.gif 2KB
40.gif 2KB
7.gif 2KB
1.gif 2KB
6.gif 2KB
5.gif 2KB
27.gif 2KB
17.gif 2KB
38.gif 2KB
46.gif 2KB
fck_plugin.gif 2KB
26.gif 2KB
51.gif 2KB
53.gif 2KB
2.gif 2KB
55.gif 2KB
33.gif 2KB
62.gif 2KB
58.gif 2KB
52.gif 2KB
50.gif 2KB
43.gif 1KB
56.gif 1KB
48.gif 1KB
23.gif 1KB
63.gif 1KB
60.gif 1KB
25.gif 1KB
sprites.gif 959B
logo_fredck.gif 920B
fck_flashlogo.gif 599B
sticky.gif 344B
lock.gif 333B
fck_anchor.gif 184B
anchor.gif 184B
toolbar.start.gif 105B
toolbar.separator.gif 58B
toolbar.arrowright.gif 53B
arrow_ltr.gif 49B
arrow_rtl.gif 49B
dialog.sides.gif 48B
toolbar.buttonarrow.gif 46B
toolbar.end.gif 43B
spacer.gif 43B
fckdialog.html 19KB
fck_paste.html 12KB
fckeditor.html 8KB
fck_anchor.html 6KB
共 199 条
- 1
- 2
wei0322
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页