<?php
class Normal_CheckboxAR_DataColumns extends netsControl {
	public function Normal_CheckboxAR_DataColumns(){
		$this->netsControl();
	}
	public function Control($pColumn){
		$tmpControl=$pColumn['stcotName'].'Txt'.$pColumn['NameExtend'];
		$tmpIntroduct='';
		if(strlen($pColumn['stcoctUiIntroduct'])>0 && $pColumn['stcoctUiIntroduct']!='&nbsp;'){
			$tmpIntroduct='<div id="'.$tmpControl.'_Messagebox" class="ControlIntroduct">'.$pColumn['stcoctUiIntroduct'].'</div>';
		}else{
			$tmpIntroduct='<div id="'.$tmpControl.'_Messagebox" class="DHidden">'.$pColumn['stcoctUiIntroduct'].'</div>';
		}
		$tmpAR0=explode($this->sysSPLIT5,$pColumn['Value']);
		$tmpTextAR=explode($this->sysSPLIT2,$tmpAR0[0]);
		$tmpColumnAR=explode($this->sysSPLIT2,$tmpAR0[1]);
?>
<!-- #<?php echo ($tmpControl); ?> -->
<?php if ($pColumn['stcoctSingleLine']==0) { ?><tr id="<?php echo($tmpControl); ?>_RowBox" class="<?php echo ($pColumn['LineStyle']); ?>"><?php } ?>
<td id="<?php echo ($tmpControl); ?>_Label" class="PanelTitle"><?php echo ($pColumn['stcoctUiName']); ?>：</td>
<td id="<?php echo ($tmpControl); ?>PanelBox" class="PanelBox <?php if ($pColumn['stcoctSingleLine']==1) { ?>PanelMultiColumn<?php } ?>" <?php if ($pColumn['stcoctSingleLine']==0 && $pColumn['stcoctColspan']>1) { ?>colspan="<?php echo($pColumn['stcoctColspan']); ?>"<?php } ?>>
<!--S.<?php echo ($tmpControl); ?>-->
<!-- #Control -->
<textarea id="<?php echo($tmpControl); ?>" name="<?php echo($tmpControl); ?>" type="text" class="SControl1 ControlText"
onclick="tmpControl.onControlLight(this,'ControlText');<?php echo($pColumn['Parameter_JS_Onclick']); ?>"
onblur="tmpControl.onControlBlur(this,'ControlText');<?php echo($pColumn['Parameter_JS_Onblur']); ?>"
onfocus="tmpControl.chooseCall('<?php echo ($pColumn['Parameter']); ?>',this);<?php echo($pColumn['Parameter_JS_Onfocus']); ?>"
onchange="<?php echo($pColumn['Parameter_JS_Onchange']); ?>"
onmouseover="<?php echo($pColumn['Parameter_JS_Onmouseover']); ?>"
onmouseout="<?php echo($pColumn['Parameter_JS_Onmouseout']); ?>"
style="<?php echo ($pColumn['ControlStyle']); ?>"><?php echo($pColumn['Value']); ?></textarea>
<div class="CheckboxAR_DataColumns_Columnsbox_1">
<a id="<?php echo ($tmpControl); ?>_ShowButton" href="#Here" class="Link1" onclick="tmp<?php echo($tmpControl); ?>.showBox('');">+ 查看选项并通过选项来选取</a>
</div>
<!-- #Box -->
<table id="<?php echo ($tmpControl); ?>_Box" class="DHidden" cellpadding="0" cellspacing="0">
<?php
		$tmpAR0=explode($this->sysSPLIT1,$pColumn['Value']);
		$Coun0=0;
		foreach ($pColumn['Option'] as $Option){
?><tr>
<?php
$tmpChecked='';
$tmpStyle='';
if(in_array($Option['Value'],$tmpTextAR)){
	$tmpChecked=' checked="checked" ';
	$tmpStyle='_Light';
}
?>
<td class=""><?php echo ($Option['Text']); ?> - <span class="FBlack1"><?php echo ($Option['Value']); ?></span></td>
<td class="ChooseCell_A<?php echo($tmpStyle); ?>"><input id="<?php echo($tmpControl); ?><?php echo($Coun0); ?>_A" name="<?php echo($tmpControl); ?><?php echo($Coun0); ?>" type="radio" class="ChooseCell_C<?php echo($tmpStyle); ?> SControl1"
onclick="tmpControl.onControlLight(this,'ChooseCell_C<?php echo($tmpStyle); ?>'); tmp<?php echo($tmpControl); ?>.selectColumns('');" 
onblur="tmpControl.onControlBlur(this,'ChooseCell_C<?php echo($tmpStyle); ?>');"
value="<?php echo ($Option['Value']); ?>" <?php if(in_array($Option['Value'],$tmpTextAR)){ echo (' checked="checked" '); } ?> /></td>
<td class="ChooseCell_B<?php echo($tmpStyle); ?>" style="padding:2px 4px 2px 4px;"><label for="<?php echo($tmpControl); ?><?php echo($Coun0); ?>_A">文本方式</label></td><td>&nbsp;</td>
<?php
$tmpChecked='';
$tmpStyle='';
if(in_array($Option['Value'],$tmpColumnAR)){
	$tmpChecked=' checked="checked" ';
	$tmpStyle='_Light';
}
?>
<td class="ChooseCell_A<?php echo($tmpStyle); ?>"><input id="<?php echo($tmpControl); ?><?php echo($Coun0); ?>_B" name="<?php echo($tmpControl); ?><?php echo($Coun0); ?>" type="radio" class="ChooseCell_C<?php echo($tmpStyle); ?> SControl1"
onclick="tmpControl.onControlLight(this,'ChooseCell_C<?php echo($tmpStyle); ?>'); tmp<?php echo($tmpControl); ?>.selectColumns('');" 
onblur="tmpControl.onControlBlur(this,'ChooseCell_C<?php echo($tmpStyle); ?>');"
value="<?php echo ($Option['Value']); ?>" <?php echo($tmpChecked); ?> /></td>
<td class="ChooseCell_B<?php echo($tmpStyle); ?>" style="padding:2px 4px 2px 4px;"><label for="<?php echo($tmpControl); ?><?php echo($Coun0); ?>_B">单项方式</label></td><td>&nbsp;</td>
<?php
$tmpChecked='';
$tmpStyle='';
if(!in_array($Option['Value'],$tmpTextAR) && !in_array($Option['Value'],$tmpColumnAR)){
	$tmpChecked=' checked="checked" ';
	$tmpStyle='_Light';
}
?>
<td class="ChooseCell_A<?php echo($tmpStyle); ?>"><input id="<?php echo($tmpControl); ?><?php echo($Coun0); ?>_C" name="<?php echo($tmpControl); ?><?php echo($Coun0); ?>" type="radio" class="ChooseCell_C<?php echo($tmpStyle); ?> SControl1"
onclick="tmpControl.onControlLight(this,'ChooseCell_C<?php echo($tmpStyle); ?>'); tmp<?php echo($tmpControl); ?>.selectColumns('');" 
onblur="tmpControl.onControlBlur(this,'ChooseCell_C<?php echo($tmpStyle); ?>');"
value="<?php echo ($Option['Value']); ?>" <?php echo($tmpChecked); ?> /></td>
<td class="ChooseCell_B<?php echo($tmpStyle); ?>" style="padding:2px 4px 2px 4px;"><label for="<?php echo($tmpControl); ?><?php echo($Coun0); ?>_C">不操作</label></td><td>&nbsp;</td>

</tr>
<?php $Coun0++; } ?>
</table>

<script type="text/javascript">
var tmp<?php echo($tmpControl); ?>=new CheckboxAR_DataColumns();
tmp<?php echo($tmpControl); ?>.sName="<?php echo($tmpControl); ?>";

</script>

<?php echo ($tmpIntroduct); ?>
<!--sendRequest--><!--E.<?php echo ($tmpControl); ?>--></td>
<td id="<?php echo ($tmpControl); ?>_ImgIntroduct" class="PanelImgIntroduct">
<?php if(strlen($pColumn['stcoctUiImgIntroduct'])>0 && $pColumn['stcoctUiImgIntroduct']!='&nbsp;'){ ?>
<a href="#Here"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_4.jpg" title="<?php echo($pColumn['stcoctUiImgIntroduct']); ?>" /></a>
<?php }else{ ?>&nbsp;<?php } ?></td><?php if ($pColumn['stcoctSingleLine']==0) { ?></tr><?php } ?>
<?php
	}
}
?>