📄 mng_class_give_express.php
字号:
<?php session_start(); if(!$_SESSION['teacher']) {echo '<SCRIPT LANGUAGE="JavaScript">location.replace(\'mng.php\');</script>';exit;}?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>EasyTeacher信息技术课堂教学助手(ItAssis)-学生课堂表现评价</title>
<link href="et.css" rel="stylesheet" type="text/css">
<style type="text/css">body,td,th {font-size: 14px;}</style>
</head>
<body>
<?php
include "conn.inc.php";
include "config.inc.php";
include "ItAssisFC/FLib.php";
$db=Connect_db($CFG_DB_ADDRESS,$CFG_DB_PORT,$CFG_DB_NAME,$CFG_DB_OWNER,$CFG_DB_PWD);
if(!isset($_GET['submit'])){
$stu_id=$_GET['sid'];
$crs_id=$_GET['cid'];
$sql="select * from express_dic order by ename";
$result=mysql_query($sql,$db) or die($sql."<br>".mysql_error());
if(mysql_num_rows($result)<=0) {echo "<h3 align=center>没有加减分因素!请在<strong>参数设置的中</strong><a href=\"mng_system_config.php#课堂表现\">课堂表现</a>的添加加减分因素.</h3>";exit;}
?>
<form name="form1" method="get" action="">
<div align="center">您将给“<?php echo $stu_id;?>”作出课堂表现评价</div>
<table border="2" align="center" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#DEE3EF">
<tr>
<td width="52%"><p><strong>课堂表现</strong></p></td>
<td width="25%"><strong>分值</strong></td>
<td width="23%"><strong>操作</strong></td>
</tr>
<?php
while($array=mysql_fetch_array($result))
echo "
<tr>
<td>{$array['ename']}</td>
<td>{$array['evalue']}</td>
<td><input type=radio name=exp_id value={$array['expid']}></td>
<input name=selected_exp[{$array['expid']}] type=hidden value={$array['evalue']}>
</tr>";
?>
</table>
<p align="center">
<input name="stu_id" type="hidden" value="<?php echo $stu_id; ?>">
<input name="crs_id" type="hidden" value="<?php echo $crs_id; ?>">
<input type="submit" name="submit" value="确定">
</p>
</form>
<?php
}else{
if(!isset($_GET['exp_id'])) Return_error_and_exit("未做出任何评价。");
$stu_id=$_GET['stu_id'];
$exp_id=$_GET['exp_id'];
$crs_id=$_GET['crs_id'];
$evalue=$_GET['selected_exp'][$exp_id];
$sql="insert into express(stu_id,exp_id,crs_id)";
$sql.=" values(\"$stu_id\",$exp_id,$crs_id)";
mysql_query($sql,$db) or die($sql."<br>".mysql_error());
$sql ="update stu set score=score+$evalue where sid=\"$stu_id\"";
mysql_query($sql,$db) or die("$sql<br>" . mysql_error());
echo "<div align=center>你已对 $stu_id 经做出评价!<p><span class=red>撤销评价</span>请在教学区[分析]<span class=red>表现</span>中。</div>";
Auto_close_page(3);
}
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -