<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"/>
<style>
  td { padding:2px 5px 2px 5px;}
</style>
<script language=javascript src="../JS/CheckQuestion.js.php"></script>
<script language=javascript src="../JS/HighLight.js.php"></script>
<link rel="stylesheet" type="text/css" href="../CSS/Calendar.css">
<script type="text/javascript" src="../Calendar/Calendar.js.php"></script>
<script type="text/javascript" src="../Calendar/Calendar.lang.js.php"></script>
<script type="text/javascript" src="../Calendar/Calendar.init.js.php"></script>
<script language=javascript>
function Check_Form_Validator()
{
	if ( document.Check_Form.isCheckIP.value != "0" )
	{
		if (!CheckNotNull(Check_Form.maxIpTime,"防重复提交的限制间隔")) {return false;}
		if (!CheckNumber(Check_Form.maxIpTime,"防重复提交的限制间隔",5,50000000)) {return false;}
	}
	if (!CheckNotNull(Check_Form.beginTime, "调查问卷开始时间")) {return false;}
	if (!CheckDate(Check_Form.beginTime, "调查问卷开始时间")) {return false;}	
	if (!CheckNotNull(Check_Form.endTime, "调查问卷结束时间")) {return false;}
	if (!CheckDate(Check_Form.endTime, "调查问卷结束时间")) {return false;}
	if ( document.Check_Form.beginTime.value >= document.Check_Form.endTime.value )
	{
		alert('开始时间止不应在结束时间后');
		document.Check_Form.endTime.focus();
		return false;
    }
	if (!CheckNumber(Check_Form.maxResponseNum,"问卷收到对应的回收份数结束",20,50000)) {return false;}
}
function checkIpMode()
{ 
	if (document.Check_Form.isCheckIP.value != "0" )
	{
		document.getElementById("IpTime").style.display = "";
    }
	else
	{
		document.getElementById("IpTime").style.display = "none";
	}
}
function Init()
{
	checkIpMode();
}
</script>
<meta content="mshtml 6.00.3790.0" name=generator></head>
<body oncontextmenu="return false" onload="javascript:Init();" style="margin-top:0px">
   <form action="" style="margin:0px;" method="post" name="Check_Form" onsubmit="return Check_Form_Validator()" >
    <table class=datatable style="line-height: 150%;border-collapse:collapse;" cellspacing=0 cellpadding=0 bordercolor=#b5cfd9 border=1 width=100%>
     <div class=position>位置：&nbsp; 我的问卷 &raquo; 新增调查问卷 &raquo; 设置调查问卷属性</div>
      <tr><td bgcolor="#f5f5f5" colspan=2><b>设置问卷属性 &raquo; {surveyTitle}</b></td></tr>
      <tr><td align=right colspan=2><SPAN style="PADDING-RIGHT: 16px">注：以下带“<SPAN  class=red>*</SPAN>”的为必填项</SPAN></td></tr>
      <tr height=25 bgcolor="#e9e9e9"><td colspan=2><span class=red>&nbsp;调查问卷有效性要素</span>&nbsp;<img src="../Images/info.gif" border=0></td></tr>
	  <tr><td align=left><SPAN  class=red>*</SPAN> 问卷开始时间：</td>
		   <td align=left><input class="text" name="beginTime" size='12' maxlength='10' id='beginTime' value='{beginTime}'> 00:00:00 <img src="../Images/calendar.gif" alt="开始时间"  id="date_start_trigger" align="absmiddle"></td>
	   </tr>
	  <tr><td align=left><SPAN class=red>*</SPAN> 问卷结束时间：</td>
		   <td align=left><input class="text" name="endTime" size='12' maxlength='10' id='endTime' value='{endTime}'> 00:00:00 <img src="../Images/calendar.gif" alt="结束时间"  id="date_end_trigger" align="absmiddle"> </td>
	   </tr>
	   <script type="text/javascript">
		  Calendar.setup({
		  inputField : "beginTime",
		  ifFormat : "%Y-%m-%d", 
		  range:[2007,2080],
		  showsTime : false, 
		  weekNumbers: false,
		  button : "date_start_trigger", 
		  singleClick : true,
		  step : 1
		 });
		  Calendar.setup({
		  inputField : "endTime",
		  ifFormat : "%Y-%m-%d", 
		  range:[2007,2080],
		  showsTime : false, 
		  weekNumbers: false,
		  button : "date_end_trigger", 
		  singleClick : true,
		  step : 1
		 });
	  </script>
	   <tr><td height="25">&nbsp;&nbsp;&nbsp;问卷收到对应的回收份数结束：</td>
		   <td><input name="maxResponseNum" type="text" id="maxResponseNum" value="{maxResponseNum}" size="6"> 份 (为空表示不采用此结束条件)</td>
	  </tr>
      <tr height=25 bgcolor="#e9e9e9"><td colspan=2><b>&nbsp;设置调查问卷防重复提交措施</b>&nbsp;<img src="../Images/info.gif" border=0></td></tr>
	  <tr><td height="25"><SPAN class=red>*</SPAN> 问卷防重复提交设置：</td>
		  <td><select name="isCheckIP" id="isCheckIP" onChange="checkIpMode();">
					<option value="0" {isCheckIP0}>不采用提交问卷防重复限制</option>
					<option value="1" {isCheckIP1}>使用来源IP地址检测</option>
					<option value="2" {isCheckIP2}>使用客户端Cookie技术</option>
				</select>
		  </td>
	   </tr>
	   <tr id="IpTime"><td height="25"><SPAN  class=red>*</SPAN> 防重复提交的限制间隔：</td>
		   <td><input name="maxIpTime" type="text" id="maxIpTime" value="{maxIpTime}" size="6"> 分钟</td>
	  </tr>
      <tr height=25 bgcolor="#e9e9e9"><td colspan=2><b>&nbsp;设置调查问卷类型</b>&nbsp;<img src="../Images/info.gif" border=0></td></tr>
      <tr>
		  <td height="25" width="28%"><SPAN class=red>*</SPAN> 设置问卷类型：</td>
	  	  <td>
		   <span>
			  <SELECT name="isPublic" id="isPublic">
			   <OPTION value="1" {option_1}>公开 （所有教师或学生可访问与回复问卷）</OPTION>
			   <OPTION value="0" {option_0}>私有 （符合条件的教师与学生可访问与回复问卷）</OPTION>
			  </SELECT>
		   </span>
		  </td>
	  </tr>
   </table>
   <table width=100%>
      <tr><td width=27%></td>
	      <td height="23" align="left">
 		  <input name="surveyID" type="hidden" value="{surveyID}"> 
 		  <input name="surveyTitle" type="hidden" value="{surveyTitle}"> 
 		  <input name="Action" type="hidden" id="Action" value="{Action}"> 
		  <input name="surveyInfo" id="surveyInfo" type="hidden">
	      <input type=submit class=inputsubmit value="下一步>>">&nbsp;<input class=inputsubmit type="button" name="close" value="忽略" onClick="javascript:parent.referIframeSrc('DesignSurvey.php?surveyID={surveyID}&surveyTitle={surveyTitle}');"></div>
           </td>
       </tr>
    </table>       
    </form>       
 <script type="text/javascript">initInputHighlightScript();</script> 
</body></html>
