<html><head>
<meta http-equiv=content-language content=zh-cn>
<meta http-equiv=content-type content="text/html; charset=gb2312">
<LINK href="../CSS/Base.css" rel=stylesheet>
<link href="../CSS/Common.css" rel="stylesheet" type="text/css"/>
<LINK href="../CSS/Tab.css" rel=stylesheet>
<style>
  td { padding:2px 5px 2px 5px;}
  table { margin-bottom:4px;}
</style>
<script language=javascript src="../JS/CheckQuestion.js.php"></script>
<script language=javascript src="../Chart/Swfobject.js.php"></script>
<script>
function Check_Form_Validator()
{
   if (!CheckNotNull(document.getElementById("indicatorsID"), "选定进行数据图形展示的评教指标")) {return false;}
   if (!CheckNotNull(document.Check_Form.chartWidth, "选定展示的图形大小 - 宽")) {return false;}
   if (!CheckNumber(document.Check_Form.chartWidth, "选定展示的图形大小 - 宽",50,2000)) {return false;}
   if (!CheckNotNull(document.Check_Form.chartHeight, "选定展示的图形大小 - 高")) {return false;}
   if (!CheckNumber(document.Check_Form.chartHeight, "选定展示的图形大小 - 高",50,2000)) {return false;}
}
function ajax_Submit(url,postStr) {
	var ajax=false; 
	try { ajax = new ActiveXObject("Msxml2.XMLHTTP"); }
	catch (e) { try { ajax = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { ajax = false; } }
	if (!ajax && typeof XMLHttpRequest!='undefined') ajax = new XMLHttpRequest(); 

	ajax.open("POST", url, true); 
	ajax.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
	ajax.send(postStr);
	ajax.onreadystatechange = function(){
		if (ajax.readyState == 4)
		{
			if(ajax.status == 200)
			{
				var theRtnText = ajax.responseText;
				document.getElementById("dataTable").style.display = '';
				document.getElementById("dataCopyAction").style.display = '';
				var reg = /<script[^>]*>((.|\n)+)<\/script>/i;
				var theString = theRtnText.replace(reg,""); //获取不包含脚本的其他内容
				document.getElementById("flashcontent").innerHTML = theString;
				var match = theRtnText.match(reg);
				var myScript = "";
				if( match != null ) //有脚本返回
				{
					myScript = match[1];
					eval(myScript);//执行脚本
				}				
			}
			else
			{
				alert('网络传输问题');
			}
		}	
	} 
}
function DataSubmit()
{
    if( Check_Form_Validator() != false )
	{
		var departmentID = document.getElementById('t_departmentID').value;
		var gradeID = document.getElementById('t_gradeID').value;
		var classID = document.getElementById('t_classID').value;
		var groupID = document.getElementById('t_groupID').value;
		var teacherID = document.getElementById('t_teacherID').value;
		var coursesID = document.getElementById('t_coursesID').value;
		var isElective = document.getElementById('t_isElective').value;
		var indicatorsID = document.getElementById('indicatorsID').value;
		var chartType = getRadioCheckBoxValue(document.Check_Form.chartType);
		var chartWidth = document.getElementById('chartWidth').value;
		var chartHeight = document.getElementById('chartHeight').value;
		var ParamString = "Action=DataChartSubmit";
		ParamString += "&departmentID="+departmentID;
		ParamString += "&gradeID="+gradeID;
		ParamString += "&classID="+classID;
		ParamString += "&groupID="+groupID;
		ParamString += "&teacherID="+teacherID;
		ParamString += "&coursesID="+coursesID;
		ParamString += "&isElective="+isElective;
		ParamString += "&assessID={assessID}";
		ParamString += "&surveyType={surveyType}";
		ParamString += "&indicatorsID="+indicatorsID;
		ParamString += "&chartType="+chartType;
		ParamString += "&chartWidth="+chartWidth;
		ParamString += "&chartHeight="+chartHeight;
		document.getElementById("dataTable").style.display = '';
		document.getElementById("flashcontent").innerHTML = "<div id=\"preloading\" style=\"position:absolute;top:0;left:0;z-index:1;background-color:#f0f0f0;left:0;top:0;width:160px;overflow:hidden;white-space:nowrap;color:black;position:fixed;top:0;left:0;font-weight:bold;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;-khtml-border-bottom-right-radius:5px;border-bottom-right-radius:5px;\">&nbsp;<img src=\"..\/Images\/wait.gif\" width=\"16px\" height=\"16px\">&nbsp;正在加载数据图形&nbsp;<\/div>";
		ajax_Submit('DataChart.php?{thisURLString}',ParamString);
	}
}
function $(_sId){
	return document.getElementById(_sId);
}
function ResetInit()
{
	document.getElementById("dataTable").style.display = 'none';
	document.getElementById("dataCopyAction").style.display = 'none';
	document.getElementById("flashcontent").innerHTML = '' ;
}
function ChangeChartType() {
	var theChartTypeValue = getRadioCheckBoxValue(document.Check_Form.chartType);
	ChangeChartSize(theChartTypeValue);
}
function ChangeChartSize(chartType)
{
	switch(chartType)
	{
	    case '1':
			document.getElementById("chartWidth").value = 600;
			document.getElementById("chartHeight").value = 420;
		break;
		case '2':
			document.getElementById("chartWidth").value = 660;
			document.getElementById("chartHeight").value = 420;
		break;
		case '3':
			document.getElementById("chartWidth").value = 540;
			document.getElementById("chartHeight").value = 600;
		break;
		case '4':
			document.getElementById("chartWidth").value = 660;
			document.getElementById("chartHeight").value = 420;
		break;
		case '5':
			document.getElementById("chartWidth").value = 760;
			document.getElementById("chartHeight").value = 500;
		break;
		case '6':
			document.getElementById("chartWidth").value = 600;
			document.getElementById("chartHeight").value = 760;
		break;
		case '7':
			document.getElementById("chartWidth").value = 650;
			document.getElementById("chartHeight").value = 500;
		break;
		case '8':
			document.getElementById("chartWidth").value = document.body.clientWidth -200;
			document.getElementById("chartHeight").value = 420;
		break;
		case '9':
			document.getElementById("chartWidth").value = 600;
			document.getElementById("chartHeight").value = document.body.clientWidth -200;
		break;
		default:
			document.getElementById("chartWidth").value = 600;
			document.getElementById("chartHeight").value = 420;
		break;
	}
}
</script>
<META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD>
<body oncontextmenu="return false" style="margin-top:0px" onload="javascript:ChangeChartType();">

<div id="tabs1"> 
    <ul> 
        <li><a href="ShowMain.php"><span>我的问卷</span></a></li> 
        <li><a href="{countURL}"><span>频数频率分析</span></a></li> 
        <li><a href="{commitURL}"><span>参评率报告</span></a></li>
        <li><a href="{listURL}"><span>问卷回复详细</span></a></li>
        <li id="current"><a href="{dataChartURL}"><span>数据图形展示</span></a></li>
        <li><a href="{indexsURL}"><span>指标分值分析</span></a></li> 
        <li><a href="{rankURL}"><span>教师评教排名</span></a></li>
    </ul> 
</div> 

<div style="line-height:10px">&nbsp;</div>
<div class="wrap q_clear" id=wrap>
<div>
<div>
<div class=q_clear id=myheadertext><h1><span class=red>[{assessTitle}]</span>评教问卷数据图形展示</h1>&nbsp;<br/></div>
<div id=myname></div>

<table style="border-top: #b5cfd9 1px solid;border-bottom: #b5cfd9 1px solid;" width=100% id="dataTableW" cellspacing=0 cellpadding=0>
   <form name="Check_Form" method="post" action="" onsubmit="return Check_Form_Validator();">
   <tr><td height=8></td></tr>
   <tr><td>
	  <b>选择分析数据的范围：</b>
		<select name="t_departmentID" id="t_departmentID">
			<option value=''>请选择评教学生所在学部...</option>
			{departmentList}
		</select>
		<select name="t_gradeID" id="t_gradeID">
			<option value=''>请选择评教学生所在年级...</option>
			{gradeList}
		</select>
		<select name="t_classID" id="t_classID">
			<option value=''>请选择评教学生所在班级...</option>
			{classList}
		</select><br/>
		</td></tr>
		<tr><td height=8></td></tr>
		
		<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="t_groupID" id="t_groupID">
			<option value=''>请选择被评教师所在教研分组...</option>
			{groupList}
		</select>
		<select name="t_teacherID" id="t_teacherID">
			<option value=''>请选择被评教师...</option>
			{teacherList}
		</select><br/>
		</td></tr>
		<tr><td height=8></td></tr>
		
		<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="t_coursesID" id="t_coursesID">
			<option value=''>请选择被评教师担任课程...</option>
			{coursesList}
		</select>
		<select name="t_isElective" id="t_isElective">
			<option value='all'>请选择被评教师担任课程类型...</option>
			<option value='0'>必修课</option>
			<option value='1'>选修课</option>
		</select>
	</td></tr>
	<tr><td height=8></td></tr>
    <tr><td><b>选定展示的图形类型：</b><input type=radio name="chartType" value=1 id="chartType" onclick="javascript:ChangeChartType();" checked>柱状图&nbsp;&nbsp;
	  <input type=radio name="chartType" value=3 id="chartType" onclick="javascript:ChangeChartType();">条状图&nbsp;&nbsp;
	  <input type=radio name="chartType" value=8 id="chartType" onclick="javascript:ChangeChartType();">簇状柱形图&nbsp;&nbsp;
	  <input type=radio name="chartType" value=9 id="chartType" onclick="javascript:ChangeChartType();">簇状条形图&nbsp;&nbsp;
	  <input type=radio name="chartType" value=5 id="chartType" onclick="javascript:ChangeChartType();">柱状堆积图&nbsp;&nbsp;
	  <input type=radio name="chartType" value=6 id="chartType" onclick="javascript:ChangeChartType();">条状堆积图&nbsp;&nbsp;<br/>
	  <span style="margin-left:130px">
	  <input type=radio name="chartType" value=2 id="chartType" onclick="javascript:ChangeChartType();">饼状图&nbsp;&nbsp;
	  <input type=radio name="chartType" value=4 id="chartType" onclick="javascript:ChangeChartType();">甜圈图&nbsp;&nbsp;
	  <input type=radio name="chartType" value=7 id="chartType" onclick="javascript:ChangeChartType();">雷达图</span></td></tr><tr><td height=8>
	</td></tr><tr><td><b>选定展示的图形大小：</b>宽：<input type=text name="chartWidth" id="chartWidth" size=8 value=600>px&nbsp;&nbsp;&nbsp;高：<input type=text name="chartHeight" id="chartHeight" size=8 value=420>px</tr><tr><td height=8>
	</td></tr><tr><td><b>选定展示的评价指标：</b><span id="questionOnHTML"><select name="indicatorsID" id="indicatorsID">
		   <option value="">请选择...</option>
		   {indicatorsList}
		 </select></span></td></tr><tr><td height=10>
	</td></tr>
    <tr><td>
         <input class=inputsubmit name="submit" type="button" id="submit" value="开始展示" onclick="javascript:DataSubmit();" > 
         <input class=inputsubmit name="reset" type="reset" id="reset" value="&nbsp;&nbsp;重置&nbsp;&nbsp;" onclick="javascript:ResetInit();" >
      </td>
    </tr>
	<tr><td height=8></td></tr>
  </form>
 </table>

 <table id="dataCopyAction" width=100% style="LINE-HEIGHT: 150%;border-collapse:collapse;display:none;" cellSpacing=0 cellPadding=0 borderColor=#b5cfd9 border=0>
  <tr><td align=right><b style="color:#4800ff">对应图形的鼠标右键菜单中“以图片格式导出”功能，可将数据图形导出为JPEG文件</b><img src="../Images/list_menu_arrow.gif" border=0>&nbsp;&nbsp;</td></tr></table>

  <table id="dataTable" style="LINE-HEIGHT: 150%;border-collapse:collapse;display:none;" cellSpacing=0 cellPadding=0 width="100%" borderColor=#b5cfd9 border=1>
   <tr><td id="dataInner" align=center style="padding-top:5px;padding-bottom:5px"><div id="flashcontent"><strong>您的Flash播放器版本太低，无法展示数据图形</strong></div></td></tr>
 </table>
 <br/>
 <span class=red>*</span> 功能“以图片格式导出”可能需要更改IE安全设置方能顺利下载<br/>
 <span class=red>*</span> IE菜单“工具”->“Internet选项“->“安全”->“自定义级别”->启用“文件下载的自动提示”

</div></div></div>
</body></html>
