<html>
<head>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
<link href="../CSS/Base.css" rel="stylesheet" type="text/css"/>
<link href="../CSS/Common.css" rel="stylesheet" type="text/css"/>
<LINK href="../CSS/Window.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="../JS/Common.js.php"></script>
<script type="text/javascript" src="../JS/Window.js.php"></script>
<link href="../CSS/SurveyList.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../JS/Browser.js.php"></script>
<script>
function refreshParent() {
   //self.location.replace(self.location.href);
   self.location.href = '{surveyLogicURL}';
}
var ajax_request = false;
function HttpRequest(questionID,isLogicAnd)
{
    var url = "../System/AjaxShowQtnLogic.php?Action=SetQtnLogicRel&surveyID={surveyID}&questionID=" + questionID + "&isLogicAnd=" + isLogicAnd +"&randid="+Math.random();
	if(window.ActiveXObject){
		try{
			ajax_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try{
				ajax_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}
	else if(window.XMLHttpRequest){
		ajax_request = new XMLHttpRequest();
		if (ajax_request.overrideMimeType){
			ajax_request.overrideMimeType('text/xml');
		}
	}
	
	if (!ajax_request){
		alert("Cannot create an XMLHTTP instance");
		return false;
	}
	ajax_request.onreadystatechange = function() {
	  if( ajax_request.readyState == 4 && ajax_request.status == 200) {
			AjaxRequest(questionID,isLogicAnd);
	   }	
	};
	ajax_request.open('GET', url, true);
	ajax_request.send(null);
}

var http_request = false;
function AjaxRequest(questionID,isLogicAnd)
{
	var theLogicObj = eval("document.getElementById('conList_"+questionID+"')");
	theLogicObj.innerHTML = "<div id=\"preloading\" style=\"background-color:#f0f0f0;width:160px;overflow:hidden;white-space:nowrap;color:black;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>";
    var url = "../System/AjaxShowQtnLogic.php?surveyID={surveyID}&questionID=" + questionID + "&isLogicAnd=" + isLogicAnd + "&randid="+Math.random();
	if(window.ActiveXObject){
		try{
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try{
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}
	else if(window.XMLHttpRequest){
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType){
			http_request.overrideMimeType('text/xml');
		}
	}
	
	if (!http_request){
		alert("Cannot create an XMLHTTP instance");
		return false;
	}
	http_request.onreadystatechange = function() {
	  if( http_request.readyState == 4 && http_request.status == 200) {
			theLogicObj.innerHTML = http_request.responseText;
	   }	
	};
	http_request.open('GET', url, true);
	http_request.send(null);
}
function qtnAssRequest(questionID,qtnID,questionType,isLogicAnd)
{
    var url = "../System/AjaxShowQtnAssociate.php?Action=SetQtnLogicRel&surveyID={surveyID}&questionID="+questionID+"&qtnID="+qtnID+"&questionType="+questionType+"&isLogicAnd=" + isLogicAnd +"&randid="+Math.random();
	if(window.ActiveXObject){
		try{
			ajax_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try{
				ajax_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}
	else if(window.XMLHttpRequest){
		ajax_request = new XMLHttpRequest();
		if (ajax_request.overrideMimeType){
			ajax_request.overrideMimeType('text/xml');
		}
	}
	
	if (!ajax_request){
		alert("Cannot create an XMLHTTP instance");
		return false;
	}
	ajax_request.onreadystatechange = function() {
	  if( ajax_request.readyState == 4 && ajax_request.status == 200) {
			qtnAssAjaxRequest(questionID,isLogicAnd,qtnID);
	   }	
	};
	ajax_request.open('GET', url, true);
	ajax_request.send(null);
}

var http_request = false;
function qtnAssAjaxRequest(questionID,isLogicAnd,qtnID)
{
	var theLogicObj = eval("document.getElementById('qasList_"+questionID+"_"+qtnID+"')");
	theLogicObj.innerHTML = "<div id=\"preloading\" style=\"background-color:#f0f0f0;width:160px;overflow:hidden;white-space:nowrap;color:black;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>";
    var url = "../System/AjaxShowQtnAssociate.php?surveyID={surveyID}&ajaxType=2&questionID="+questionID+"&qtnID="+qtnID+"&isLogicAnd="+isLogicAnd+"&randid="+Math.random();
	if(window.ActiveXObject){
		try{
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try{
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}
	else if(window.XMLHttpRequest){
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType){
			http_request.overrideMimeType('text/xml');
		}
	}
	
	if (!http_request){
		alert("Cannot create an XMLHTTP instance");
		return false;
	}
	http_request.onreadystatechange = function() {
	  if( http_request.readyState == 4 && http_request.status == 200) {
			theLogicObj.innerHTML = http_request.responseText;
	   }	
	};
	http_request.open('GET', url, true);
	http_request.send(null);
}
function optAssRequest(questionID,optionID,questionType,isLogicAnd)
{
    var url = "../System/AjaxShowOptAssociate.php?Action=SetQtnLogicRel&surveyID={surveyID}&questionID="+questionID+"&optionID="+optionID+"&questionType="+questionType+"&isLogicAnd=" + isLogicAnd +"&randid="+Math.random();
	if(window.ActiveXObject){
		try{
			ajax_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try{
				ajax_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}
	else if(window.XMLHttpRequest){
		ajax_request = new XMLHttpRequest();
		if (ajax_request.overrideMimeType){
			ajax_request.overrideMimeType('text/xml');
		}
	}
	
	if (!ajax_request){
		alert("Cannot create an XMLHTTP instance");
		return false;
	}
	ajax_request.onreadystatechange = function() {
	  if( ajax_request.readyState == 4 && ajax_request.status == 200) {
			optAssAjaxRequest(questionID,isLogicAnd,optionID);
	   }	
	};
	ajax_request.open('GET', url, true);
	ajax_request.send(null);
}

var http_request = false;
function optAssAjaxRequest(questionID,isLogicAnd,optionID)
{
	var theLogicObj = eval("document.getElementById('oasList_"+questionID+"_"+optionID+"')");
	theLogicObj.innerHTML = "<div id=\"preloading\" style=\"background-color:#f0f0f0;width:160px;overflow:hidden;white-space:nowrap;color:black;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>";
    var url = "../System/AjaxShowOptAssociate.php?surveyID={surveyID}&ajaxType=2&questionID="+questionID+"&optionID="+optionID+"&isLogicAnd="+isLogicAnd+"&randid="+Math.random();
	if(window.ActiveXObject){
		try{
			http_request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try{
				http_request = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {}
		}
	}
	else if(window.XMLHttpRequest){
		http_request = new XMLHttpRequest();
		if (http_request.overrideMimeType){
			http_request.overrideMimeType('text/xml');
		}
	}
	
	if (!http_request){
		alert("Cannot create an XMLHTTP instance");
		return false;
	}
	http_request.onreadystatechange = function() {
	  if( http_request.readyState == 4 && http_request.status == 200) {
			theLogicObj.innerHTML = http_request.responseText;
	   }	
	};
	http_request.open('GET', url, true);
	http_request.send(null);
}
</script>
<body oncontextmenu="return false" style="background-color:#244d8f;">

<div style="line-height:10px">&nbsp;</div>
<div id="menu">
  <span style="float:left;padding-left:26px;"><div class="navmenu">我的问卷 &raquo; {surveyTitle}</div></span>
  <span style="float:right">
  <ul><li><a href="ShowMain.php">我的问卷</a>
      <li><a href="{questionListURL}">调查问题</a></li>
	  <li class="current"><a href="{logicURL}">逻辑关系</a></li>
	  <li><a href="{relationURL}">数值关联</a></li>
	  <li><a href="{quotaURL}">问卷配额</a></li>
	  <li><a href="{weightURL}">选项权重</a></li></ul></span>
</div>
<div class="wrap q_clear" id=wrap>
<div>
<div class=content>
<div class=q_clear id=mysurvey><h1>列出单一问题的逻辑关系依赖详细</h1><!--&nbsp;<input class=inputsubmit name="qtnList" type="button" id="qtnList" value="整体概览" onclick="javascript:window.location.href='{logicURL}';">--><br/></div>
<a name="top" href="javascript:void(0);"></a>
<div id=myname>{questionName}</div>
<div class="datalist">

 <table class=datatable id="datatable" style="border-bottom:0px;" cellspacing=0 cellpadding=0>
   <tr>
     <td colspan=4 align=left bgcolor="#c4d1e0" height=25 valign=center><b>问题的显示依赖</b>&nbsp;&nbsp;<input class=stnsubmit style="vertical-align:middle" name="createNew" type="button" id="createNew" value="新增定义" onclick="javascript:showPopWin('{newQtnLogicURL}', 900, 410, refreshParent, null,'新增单一问题逻辑关系定义')"></td>
   </tr>
   <tr style="display:{isNoHaveLogic}">
     <td colspan=4 align=left bgcolor="#f5fafe" height=25>尚无问题的显示依赖关系</td>
   </tr>
   <tr style="display:{isHaveLogic}">
     <td colspan=4 align=right><b>设定题间运算关系：</b><input type=radio name="isLogicAnd_{questionID}" id="isLogicAnd_{questionID}" value="1" onclick="javascript:HttpRequest({questionID},1);" {isLogicAnd1}><b>与</b>&nbsp;<input type=radio name="isLogicAnd_{questionID}" id="isLogicAnd_{questionID}" value="0" onclick="javascript:HttpRequest({questionID},0);" {isLogicAnd0}><b>或</b>&nbsp;
   </td></tr>
   <tr style="display:{isHaveLogic}">
     <td colspan=4 align=left bgcolor="#f5fafe" height=25 id="conList_{questionID}">{conList}</td>
   </tr>
   <tr class=coltitle style="display:{isHaveLogic}">
      <td width=64% noWrap>&nbsp;<B>依赖于此问题</B>&nbsp;[ <span class=red>{recNum}</span> 组关系 ]</td>
      <td width=7% noWrap align=center>&nbsp;<B>运算关系</B></td>
      <td width=23% noWrap>&nbsp;<B>回复值</B></td>
      <td width=6% noWrap align=center><b>操 作</b> </td>
   </tr>
   <!-- BEGIN LOGIC -->
   <tr onmouseover="this.style.backgroundColor='#deefff'"  onmouseout="this.style.backgroundColor='#ffffff'"> 
      <td>&nbsp;{conName}</td>
      <td align=center>&nbsp;{opertion}</td>
      <td>&nbsp;{optionName}</td>
      <td noWrap align=center>
		   <A href="{deleteURL}" onclick="return window.confirm('您真的想删除该条逻辑关系吗？本操作不可恢复！')">删除</A>
	  </td>
   </tr>
   <!-- END LOGIC -->
</table>

 <table class=datatable id="datatable" style="border-bottom:0px;" cellspacing=0 cellpadding=0 style="display:{isHaveOptAssLogic}">
   <tr>
     <td colspan=4 align=left bgcolor="#c4d1e0" height=25 valign=center><b>选项的隐藏依赖</b>&nbsp;&nbsp;<input class=stnsubmit style="vertical-align:middle" name="createNew0" type="button" id="createNew0" value="新增定义" onclick="javascript:showPopWin('{newOptAssURL}', 900, 490, refreshParent, null,'新增单一问题的选项关联定义')"></td>
   </tr>
   <tr style="display:{isNoHaveOptAssLogic}">
     <td colspan=4 align=left bgcolor="#f5fafe" height=25>尚无选项的隐藏依赖关系</td>
   </tr>
   <!-- BEGIN OPTASSLOGIC -->
   <tr>
     <td colspan=4 align=right><b>设定题间运算关系：</b><input type=radio name="isLogicAnd_{questionID}_{oas_optionID}" id="isLogicAnd_{questionID}_{oas_optionID}" value="1" onclick="javascript:optAssRequest({questionID},{oas_optionID},{oas_questionType},1);" {oas_isLogicAnd1}><b>与</b>&nbsp;<input type=radio name="isLogicAnd_{questionID}_{oas_optionID}" id="isLogicAnd_{questionID}_{oas_optionID}" value="0" onclick="javascript:optAssRequest({questionID},{oas_optionID},{oas_questionType},0);" {oas_isLogicAnd0}><b>或</b>&nbsp;
   </td></tr>
   <tr>
     <td colspan=4 align=left bgcolor="#f5fafe" height=25><span style="background:#deefff;height:30px;padding:5px"><b>{oas_optName}</b></span><br/><span  id="oasList_{questionID}_{oas_optionID}">{oas_conList}</span></td>
   </tr>
   <tr class=coltitle>
      <td width=64% noWrap>&nbsp;<B>依赖于此问题</B>&nbsp;[ <span class=red>{oas_recNum}</span> 组关系 ]</td>
      <td width=7% noWrap align=center>&nbsp;<B>运算关系</B></td>
      <td width=23% noWrap>&nbsp;<B>回复值</B></td>
      <td width=6% noWrap align=center><b>操 作</b> </td>
   </tr>
   <!-- BEGIN OPTLOGIC -->
   <tr onmouseover="this.style.backgroundColor='#deefff'"  onmouseout="this.style.backgroundColor='#ffffff'"> 
      <td>&nbsp;{oas_conName}</td>
      <td align=center>&nbsp;{oas_opertion}</td>
      <td>&nbsp;{oas_optionName}</td>
      <td noWrap align=center>
		   <A href="{oas_deleteURL}" onclick="return window.confirm('您真的想删除该条逻辑关系吗？本操作不可恢复！')">删除</A>
	  </td>
   </tr>
   <!-- END OPTLOGIC -->
   <!-- END OPTASSLOGIC -->
</table>

 <table class=datatable id="datatable" style="border-bottom:0px;" cellspacing=0 cellpadding=0 style="display:{isHaveQtnAssLogic}">
   <tr>
     <td colspan=4 align=left bgcolor="#c4d1e0" height=25 valign=center><b>矩阵行隐藏依赖</b>&nbsp;&nbsp;<input class=stnsubmit style="vertical-align:middle" name="createNew1" type="button" id="createNew1" value="新增定义" onclick="javascript:showPopWin('{newQtnAssURL}', 900, 490, refreshParent, null,'新增单一问题的矩阵行关联定义')"></td>
   </tr>
   <tr style="display:{isNoHaveQtnAssLogic}">
     <td colspan=4 align=left bgcolor="#f5fafe" height=25>尚无矩阵行隐藏依赖关系</td>
   </tr>
   <!-- BEGIN QTNASSLOGIC -->
   <tr>
     <td colspan=4 align=right><b>设定题间运算关系：</b><input type=radio name="isLogicAnd_{questionID}_{qas_qtnID}" id="isLogicAnd_{questionID}_{qas_qtnID}" value="1" onclick="javascript:qtnAssRequest({questionID},{qas_qtnID},{qas_questionType},1);" {qas_isLogicAnd1}><b>与</b>&nbsp;<input type=radio name="isLogicAnd_{questionID}_{qas_qtnID}" id="isLogicAnd_{questionID}_{qas_qtnID}" value="0" onclick="javascript:qtnAssRequest({questionID},{qas_qtnID},{qas_questionType},0);" {qas_isLogicAnd0}><b>或</b>&nbsp;
   </td></tr>
   <tr>
     <td colspan=4 align=left bgcolor="#f5fafe" height=25><span style="background:#deefff;height:30px;padding:5px"><b>{qas_qtnRangeName}</b></span><br/><span  id="qasList_{questionID}_{qas_qtnID}">{qas_conList}</span></td>
   </tr>
   <tr class=coltitle>
      <td width=64% noWrap>&nbsp;<B>依赖于此问题</B>&nbsp;[ <span class=red>{qas_recNum}</span> 组关系 ]</td>
      <td width=7% noWrap align=center>&nbsp;<B>运算关系</B></td>
      <td width=23% noWrap>&nbsp;<B>回复值</B></td>
      <td width=6% noWrap align=center><b>操 作</b> </td>
   </tr>
   <!-- BEGIN QTNLOGIC -->
   <tr onmouseover="this.style.backgroundColor='#deefff'"  onmouseout="this.style.backgroundColor='#ffffff'"> 
      <td>&nbsp;{qas_conName}</td>
      <td align=center>&nbsp;{qas_opertion}</td>
      <td>&nbsp;{qas_optionName}</td>
      <td noWrap align=center>
		   <A href="{qas_deleteURL}" onclick="return window.confirm('您真的想删除该条逻辑关系吗？本操作不可恢复！')">删除</A>
	  </td>
   </tr>
   <!-- END QTNLOGIC -->
   <!-- END QTNASSLOGIC -->
</table>

<table width=100% style="border:0px;margin:0px;padding:0px;"><tr><td align=right style="border:0px;margin:0px;padding:0px;">&nbsp;<a name="footer" href="#top"><img src="../Images/top.gif" align="middle" alt="TOP"></a></td></tr></table>
</div>
</div></div></div>
<script>adjustMenuWarpSize();</script>
</body></html>