<?php
require($netsFileConfig['sysCoreRoot'].'Cache/DbDescription/cmstopicsdiscuss.php');
require($netsFileConfig['sysCoreRoot'].'Cache/DbDescription/cmstopicsdiscusscont.php');
require($netsFileConfig['sysCoreRoot'].'Inc/m_Cms/Other/cmstopics.php');
require($netsFileConfig['sysCoreRoot'].'Inc/m_Cms/Other/cmstopicsdiscuss.php');

class PaDefault extends CustomPage {
	public function PaDefault(){
		$this->CustomPage();
	}
	public function OnBInitial(){
		$this->sMetaTitle='专题详细内容';
		$this->getUser('1,2,3,4,5,');
		$this->sTable=array(
			array('sttTableName'=>'cmstopics','sttColumnHead'=>'ctot'),
			array('sttTableName'=>'cmstopicscont','sttColumnHead'=>'ctoct'),);
		$this->sApp=new cmstopics($this->sConnString);
		
		$this->sTemplatePath='Cms/topicsDetail_Normal.php';
		
		if ($this->sActionType=='DPositive') {
			$this->OnPositive();
		}else if ($this->sActionType=='DNegative') {
			$this->OnNegative();
		}else if ($this->sActionType=='DBest') {
			$this->OnBest();
			$this->OnList();
		}else if ($this->sActionType=='DPositive_Discuss') {
			$this->OnPositive_Discuss();
		}else if ($this->sActionType=='DNegative_Discuss') {
			$this->OnNegative_Discuss();

		}

		
	}
	public function OnPositive(){
		$tmpAR0=$this->AnalyerRequest('ID',0,0);
		$this->sMainID=$tmpAR0[0];
		//-- ------ #Update ------ --
		$tmpCount=0;
		$tmpINT=$this->sApp->OnPositive($this->sMainID,$tmpCount);
		if ($tmpINT!=0) {
			$this->sMessage=$this->sApp->sysLastError;
			$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
			return 1;
		}
		
		$this->sMessage='您已成功投票。'.$this->sysSPLIT1.$tmpCount;
		$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
		return 0;
	}
	public function OnNegative(){
		$tmpAR0=$this->AnalyerRequest('ID',0,0);
		$this->sMainID=$tmpAR0[0];
		//-- ------ #Update ------ --
		$tmpCount=0;
		$tmpINT=$this->sApp->OnPositive($this->sMainID,$tmpCount);
		if ($tmpINT!=0) {
			$this->sMessage=$this->sApp->sysLastError;
			$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
			return 1;
		}
		
		$this->sMessage='您已成功投票。'.$this->sysSPLIT1.$tmpCount;
		$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
		return 0;
	}
	public function OnBest(){
		$tmpAR0=$this->AnalyerRequest('ID',0,0);
		$this->sMainID=$tmpAR0[0];
		$tmpAR0=$this->AnalyerRequest('DBest',0,0);
		$tmpDID=$tmpAR0[0];
		//-- ------ #Update ------ --
		$tmpCount=0;
		$tmpINT=$this->sApp->OnBest($this->sMainID,$tmpDID);
		if ($tmpINT!=0) {
			$this->sMessage=$this->sApp->sysLastError;
			$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
			return 1;
		}
		
		$this->sMessage='您已成设置最佳回复。';
		$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
		return 0;
	}
	public function OnPositive_Discuss(){
		$tmpAR0=$this->AnalyerRequest('ID',0,0);
		$this->sMainID=$tmpAR0[0];
		$tmpAR0=$this->AnalyerRequest('DPositive_Discuss',0,0);
		$tmpDID=$tmpAR0[0];
		//-- ------ #Update ------ --
		$tmpCount=0;
		$tmpINT=$this->sApp->OnPositive_Discuss($this->sMainID,$tmpDID,$tmpCount);
		if ($tmpINT!=0) {
			$this->sMessage=$this->sApp->sysLastError;
			$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
			return 1;
		}
		
		$this->sMessage='您已成功投票。'.$this->sysSPLIT1.$tmpCount;
		$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
		return 0;
	}
	public function OnNegative_Discuss(){
		$tmpAR0=$this->AnalyerRequest('ID',0,0);
		$this->sMainID=$tmpAR0[0];
		$tmpAR0=$this->AnalyerRequest('DNegative_Discuss',0,0);
		$tmpDID=$tmpAR0[0];
		//-- ------ #Update ------ --
		$tmpCount=0;
		$tmpINT=$this->sApp->OnNegative_Discuss($this->sMainID,$tmpDID,$tmpCount);
		if ($tmpINT!=0) {
			$this->sMessage=$this->sApp->sysLastError;
			$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
			return 1;
		}
		
		$this->sMessage='您已成功投票。'.$this->sysSPLIT1.$tmpCount;
		$this->sJscript=$this->Message('ERROR','',$this->sMessage,'');
		return 0;
	}
	public function OnAdd(){
		$tmpApp=new cmstopicsdiscuss($this->sConnString);
		$tmpTable=array(
			array('sttTableName'=>$this->sysTableHead.'cmstopicsdiscuss','sttColumnHead'=>'ctodt'),
			array('sttTableName'=>$this->sysTableHead.'cmstopicsdiscusscont','sttColumnHead'=>'ctodct'),);
		
		$tmpDbDescriptions=array();
		foreach ($tmpTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		$tmpApp=new cmstopicsdiscuss($this->sConnString);
		
		$tmpMainid=$this->AnalyerRequest('mainID',0,1);
		$this->sMainID=$tmpMainid[0];
		$tmpMainUserid=$this->AnalyerRequest('mainUserid',0,1);
		$this->sMainUserid=$tmpMainid[0];
		$tmpMainTableid=$this->AnalyerRequest('mainTableid',0,1);
		$this->sMainTableid=$tmpMainid[0];
		//-- ------ #Submit limit check ------ --
		$tmpINT=$this->submitLimitRead($this->sysPage,-1,-1,-1);
		if($tmpINT!=0){
			$this->sJscript=$this->Message('SUCCESS','','对不起，您登陆次数过多，请'.$this->sysFileConfig['SubmitLimitFreeze'].'秒后再尝试登陆。','');
			//return 1;
		}
		//-- ------ #CCode ------ --
		$tmpSTR='CCode';
		$tmpAR0=$this->AnalyerRequest($tmpSTR.'Txt','',1);
		$tmpCCode=$tmpAR0[0];
		$tmpSTR=$tmpSTR.'Txt_IFrame';
		if(!array_key_exists($tmpSTR,$_SESSION)){
			$this->submitLimitWrite($this->sysPage,-1,-1,-1);
			$this->sJscript=$this->Message('ERROR','提交失败','验证码错误','');
			return 1;
		}
		if($_SESSION[$tmpSTR]=='' || $_SESSION[$tmpSTR]!=$tmpCCode){
			$this->submitLimitWrite($this->sysPage,-1,-1,-1);
			$this->sJscript=$this->Message('ERROR','提交失败','验证码错误','');
			return 1;
		}
		//-- ------ #Add ------ --
		$tmpApp->TransStart();
		//#Get numCode
		$tmpSTR=$tmpTable[0]['sttColumnHead'].'NumCode';
		$tmpDbDescriptions[0]['TableDescription']['SearchColumn']=$tmpSTR;
		$tmpDbDescriptions[0]['Columns'][$tmpSTR]['Value']='N'.$this->sysSPLIT11.date('YmdHis');
		$tmpApp->numCode($tmpDbDescriptions[0]);
		//#Set value
		$tmpDbDescription0=$tmpDbDescriptions;
		$Coun0=0;
		foreach ($tmpDbDescription0 as $tableCell){
			foreach ($tableCell['Columns'] as $Column){
				if($Column['stcotName']!=$tmpTable[$Coun0]['sttColumnHead'].'ID' &&
					$Column['stcotName']!=$tmpTable[$Coun0]['sttColumnHead'].'NumCode' &&
					$Column['stcotName']!=$tmpTable[$Coun0]['sttColumnHead'].'CreateBy' &&
					$Column['stcotName']!=$tmpTable[$Coun0]['sttColumnHead'].'CreateTime' &&
					$Column['stcotName']!=$tmpTable[$Coun0]['sttColumnHead'].'IndexID'){
					$tmpAR0=$this->AnalyerRequest($Column['stcotName'].'Txt',$Column['stcoctDefaultValue'],1);
					$tmpDbDescriptions[$Coun0]['Columns'][$Column['stcotName']]['Value']=$tmpAR0[0];
				}
			}
			$Coun0++;
		}
		//-- #Set conventional --
		if(isset($tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'CreateBy']['Value'])){
			$tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'CreateBy']['Value']=$tmpMainUserid[0];
		}
		if(isset($tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'CreateTime'])){
			$tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'CreateTime']['Value']=date($this->sysTimeFormat);
		}
		//DB name,Condition,User index,User column name
		$tmpFlag=0;
		foreach ($this->AnonymousUserData as $Row0){
			if (count($tmpDbDescriptions)>1) {
				if(isset($tmpDbDescriptions[1]['Columns'][$tmpTable[1]['sttColumnHead'].$Row0[0]])){
					$tmpFlag=1;
				}
			}
			if ($this->sUserInfo[0]['Columns']['uitID']['Value']==0 && $tmpFlag==1) {
				$tmpDbDescriptions[1]['Columns'][$tmpTable[1]['sttColumnHead'].$Row0[0]]['Value']=$Row0[4];
			}else if ($tmpFlag==1) {
				$tmpDbDescriptions[1]['Columns'][$tmpTable[1]['sttColumnHead'].$Row0[0]]['Value']=$this->sUserInfo[$Row0[2]]['Columns'][$Row0[3]]['Value'];
			}
		}
		//Spical value array
		foreach ($this->sSpicalValue as $Cell){
			if(isset($tmpDbDescription[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
				$tmpDbDescription[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
			}
		}
		//-- #Set spical --
		$tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'Name']['Value']=$this->sCode->SubString($tmpDbDescriptions[1]['Columns'][$tmpTable[1]['sttColumnHead'].'Content']['Value'],0,60);
		$tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'Parid']['Value']=$this->sMainID;
		$tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'Checked']['Value']=2;
		if ($tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'CreateBy']['Value']==0) {
			$tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'CreateBy']['Value']=2;
		}
		$tmpDbDescriptions[0]['Columns'][$tmpTable[0]['sttColumnHead'].'CreateTime']['Value']=date($this->sysTimeFormat);
		
		//#Add
		$tmpDbDescriptions[1]['Columns'][$tmpTable[1]['sttColumnHead'].'Content']['Value']=$this->sCode->FilterINPUT($tmpDbDescriptions[1]['Columns'][$tmpTable[1]['sttColumnHead'].'Content']['Value'],3);
		$tmpINT=$tmpApp->Check($tmpDbDescriptions,array(),array());
		if($tmpINT!=0){
			$tmpApp->TransRollback();
			$this->sJscript=$this->Message('ERROR','',$tmpApp->sysLastError,'');
			return 1;
		}
		$Coun0=0;
		while (count($tmpDbDescriptions)>$Coun0){
			if($Coun0==0){
				$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$tmpTable[$Coun0]['sttColumnHead'].'NumCode,'.$tmpTable[$Coun0]['sttColumnHead'].'ID';
			}else {
				$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$tmpTable[$Coun0]['sttColumnHead'].'IndexID';
			}
			$Coun0++;
		}
		$tmpINT=$tmpApp->add($tmpDbDescriptions);
		if($tmpINT!=0){
			$tmpApp->TransRollback();
			$this->sJscript=$this->Message('ERROR','',$tmpApp->sysLastError,'');
			return 1;
		}
		
		$this->submitLimitWrite($this->sysPage,-1,-1,-1);
		$tmpApp->TransCommit();
		$this->sJscript=$this->Message('SUCCESS','','回复成功',$this->sysPage.'?ID='.$this->sMainID);
		/*
		$this->sJscript=$this->Message_Frame('A,0',
			$this->sysFileConfig['sysCoreRoot'].$this->sysFileConfig['PathManaFrameMessage'],
			$this->sCode->URL_MakeParameter('添加成功',0),
			$this->sCode->URL_MakeParameter($this->sApp->sysLastError,0),
			$this->sCode->URL_MakeParameter($this->sysFileConfig['sysCoreRoot'].'Mana/m_cms/doc/doc.php',0));
		*/
		return 0;
	}
	public function OnList(){
		$tmpAR0=$this->AnalyerRequest('ID',1,0);
		$this->sMainID=$tmpAR0[0];
		//-- ------ #Initial ------ --
		//$tmpINT=$this->sApp->initialObject($this->sMainID);
		//-- ------ #This ------ --
		$tmpSQL=' SELECT A.ctotID,A.ctotName,A.ctotParid,A.ctotCreateBy,A.ctotCreateTime,
			B.ctoctContent,B.ctoctSourceR00,B.ctoctSourceR01,B.ctoctPageAble,B.ctoctTemplateid_Detail,
			B.ctoctCount_Views,B.ctoctCount_Discuss,
			B.ctoctCode_Positive,B.ctoctCode_Negative,
			B.ctoctPublisher_Name,B.ctoctPublisher_Email,B.ctoctPublisher_Source
			
			FROM {Nets.TableHead}cmstopics AS A 
			INNER JOIN {Nets.TableHead}cmstopicscont AS B ON B.ctoctIndexID=A.ctotID
			WHERE 1=1 AND A.ctotRecycle=0 AND A.ctotChecked>1 AND A.ctotID={Nets.ID} ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ID}',$this->sMainID,$tmpSTR);
		$this->sDetailData=$this->sDb->Search($tmpSTR);
		if(count($this->sDetailData)!=1){
			//Error
			//#Other
			$tmpSQL=' SELECT A.ctotID,A.ctotName,A.ctotParid,A.ctotCreateTime
				FROM {Nets.TableHead}cmstopics AS A 
				WHERE 1=1 AND A.ctotRecycle=0 AND A.ctotChecked>1
				ORDER BY A.ctotOrderBy DESC,A.ctotID DESC LIMIT 0,8 ';
			$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
			$this->sOtherData=$this->sDb->Search($tmpSTR);
			return 1;
		}
		$this->sMainID=$this->sDetailData[0]['ctotID'];
		$this->sMetaTitle=$this->sDetailData[0]['ctotName'];
		$this->sParid=$this->sDetailData[0]['ctotParid'];
		
		if($this->sDetailData[0]['ctoctPageAble']==1){
			$tmpCListSTR0='DCList0';
			$tmpCListAR0=$this->AnalyerRequest($tmpCListSTR0,'1,0',0);
			$this->sCPButton=new netsConPButton();
			$this->sCPButton->sPage=$this->sysPage;
			$this->sCPButton->sExtendParameter='&ID='.$this->sMainID;
			$this->sCPButton->setPage($tmpCListAR0,$this->sDetailData[0]['ctoctContent']);
			$this->sDetailData[0]['ctoctContent']=$this->sCPButton->getContent();
		}else {
			$this->sDetailData[0]['ctoctContent']=str_replace($this->sysSPLIT12,'',$this->sDetailData[0]['ctoctContent']);
		}
		//-- ------ #Group ------ --
		$tmpSQL=' SELECT A.ctogtID,A.ctogtName,
			B.ctogctTemplateid_Detail,B.ctogctContent
			FROM {Nets.TableHead}cmstopicsgroup AS A 
			INNER JOIN {Nets.TableHead}cmstopicsgroupcont AS B ON B.ctogctIndexID=A.ctogtID
			WHERE 1=1 AND A.ctogtRecycle=0 AND A.ctogtChecked>1 AND A.ctogtID={Nets.ID} ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ID}',$this->sDetailData[0]['ctotParid'],$tmpSTR);
		$this->sData_Group=$this->sDb->Search($tmpSTR);
		if(count($this->sData_Group)==0){
			//#Non group
			//#Other
			$this->sData_Group[0]=array(
				'ctogctTemplateid_Detail'=>0
				);
		}
		//-- ------ #Template ------ --
		//#List
		$tmpSQL=' SELECT A.stemtID,A.stemtName,B.stemctPath 
			FROM {Nets.TableHead}netssystemplate AS A
			INNER JOIN {Nets.TableHead}netssystemplatecont AS B ON B.stemctIndexID=A.stemtID
			WHERE 1=1 AND A.stemtRecycle=0 AND A.stemtChecked>1 AND A.stemtID={Nets.ID} ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ID}',$this->sData_Group[0]['ctogctTemplateid_Detail'],$tmpSTR);
		$tmpData0=$this->sDb->Search($tmpSTR);
		if(count($tmpData0)!=0){
			$this->sTemplatePath=$tmpData0[0]['stemctPath'];
		}
		//#Detail
		$tmpSQL=' SELECT A.stemtID,A.stemtName,B.stemctPath 
			FROM {Nets.TableHead}netssystemplate AS A
			INNER JOIN {Nets.TableHead}netssystemplatecont AS B ON B.stemctIndexID=A.stemtID
			WHERE 1=1 AND A.stemtRecycle=0 AND A.stemtChecked>1 AND A.stemtID={Nets.ID} ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ID}',$this->sDetailData[0]['ctoctTemplateid_Detail'],$tmpSTR);
		$tmpData0=$this->sDb->Search($tmpSTR);
		if(count($tmpData0)!=0){
			$this->sTemplatePath=$tmpData0[0]['stemctPath'];
		}
		//-- ------ #Navigation ------ --
		$this->sNavigation=$this->sDb->getParent($this->sDetailData[0]['ctotParid'],$this->sysTableHead.'cmstopicsgroup','ctogt');
		//-- ------ #Other ------ --
		//Next
		$tmpSQL=' SELECT A.ctotID,A.ctotName,A.ctotCreateTime
			FROM {Nets.TableHead}cmstopics AS A 
			WHERE 1=1 AND A.ctotRecycle=0 AND A.ctotChecked>1 AND ctotID>{Nets.ID} AND A.ctotParid={Nets.Parid}
			ORDER BY A.ctotOrderBy DESC,A.ctotID DESC LIMIT 0,1 ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ID}',$this->sDetailData[0]['ctotID'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.Parid}',$this->sDetailData[0]['ctotParid'],$tmpSTR);
		$this->sNextData=$this->sDb->Search($tmpSTR);
		//Previous
		$tmpSQL=' SELECT A.ctotID,A.ctotName,A.ctotCreateTime
			FROM {Nets.TableHead}cmstopics AS A 
			WHERE 1=1 AND A.ctotRecycle=0 AND A.ctotChecked>1 AND ctotID<{Nets.ID} AND A.ctotParid={Nets.Parid}
			ORDER BY A.ctotOrderBy DESC,A.ctotID DESC LIMIT 0,1 ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ID}',$this->sDetailData[0]['ctotID'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.Parid}',$this->sDetailData[0]['ctotParid'],$tmpSTR);
		$this->sPreviousData=$this->sDb->Search($tmpSTR);
		//Other
		$tmpSQL=' SELECT A.ctotID,A.ctotName,A.ctotCreateTime
			FROM {Nets.TableHead}cmstopics AS A 
			WHERE 1=1 AND A.ctotRecycle=0 AND A.ctotChecked>1 AND A.ctotParid={Nets.Parid}
			ORDER BY A.ctotOrderBy DESC,A.ctotID DESC LIMIT 0,8 ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSTR);
		$tmpSTR=str_replace('{Nets.Parid}',$this->sDetailData[0]['ctotParid'],$tmpSTR);
		$this->sOtherData=$this->sDb->Search($tmpSTR);
		//-- ------ #Discuss ------ --
		$tmpListSTR0='DList0';
		$tmpListAR0=$this->getQueryString($tmpListSTR0);
		$tmpSortSTR0='DSort0';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'ctodtID,2',0);
		//Data
		$tmpSQL=' SELECT A.ctodtID,A.ctodtCreateTime,A.ctodtCreateBy,A.ctodtCreateTime,
			B.ctodctContent,B.ctodctPublisher_Source,B.ctodctPublisher_Name,
			B.ctodctCode_BePositive,B.ctodctCode_BeNegative

			FROM {Nets.TableHead}cmstopicsdiscuss AS A
			INNER JOIN {Nets.TableHead}cmstopicsdiscusscont AS B ON B.ctodctIndexID=A.ctodtID
			WHERE 1=1 AND A.ctodtRecycle=0 AND A.ctodtChecked>1 AND A.ctodtParid={Nets.ID} ';
		$tmpSQL.=' ORDER BY A.ctodtOrderBy DESC,A.ctodtID DESC ';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ID}',$this->sMainID,$tmpSTR);
		$this->sDiscussData=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sRecordCount=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPButton->resetTemlate('../../../Config/m_default/File/pageButton3.htm');
		$this->sPButton->sPage=$this->sysPage;
		$this->sPButton->sExtendParameter='&ID='.$this->sMainID;
		$this->sPButton->setPage($this->sDb->sysPageInfo);
		//-- ------ #Discuss form ------ --
		$this->sUiDescription_0=array();
		$tmpSTR=$this->sUiDescriptionPath.'Plus/cms/topics_discuss.php';
		if(file_exists($tmpSTR)){
			require($tmpSTR);
			$this->sUiDescription_0=$sysUiDescriptions['topics_discuss'];
			$sysUiDescriptions=array();
		}
		
	}
	public function DefUiPanel(&$pColumn,$pFlag){
		if($pColumn['stcotName']=='ctodctContent' && $pFlag=='Normal'){
			$pColumn['ControlStyle']='width:520px;height:40px;';
			$pColumn['Parameter_JS_Onfocus']="tmpMCommon.OnDiscussInput(this.name,0); CCodeTxt_ShowCACode(0);";
		}
	}
	
	public function DefUiJscript($pFlag){
?>
function jsDCheck(pPara){
	var tmpControl="";
	var tmpError="";
	var tmpChecker=new netsChecker();
	var tmpActionWithOut=document.getElementById("ActionWithOut");
	var Coun0=0;
	//-- ------ #ActionWithOut ------ --
	if(tmpActionWithOut==undefined){
		return true;
	}
	if(tmpActionWithOut.value=="1"){
		return true;
	}else if(tmpActionWithOut.value=="2"){
		return false;
	}
	//-- ------ #Check ------ --
	//#coprctContent
	tmpCheckCont=document.getElementById("ctodctContentTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<3){
		Coun0++;
		tmpError+=Coun0+".内容不能小于3个字符。"+sysSPLIT8;
	}
	//#coprtCCode
	tmpCheckCont=document.getElementById("CCodeTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length!=5){
		Coun0++;
		tmpError+=Coun0+".验证码必须为5位数字。"+sysSPLIT8;
	}
	//-- ------ #Result ------ --
	if(tmpError!=""){
		tmpSTR="<span class=\"FStrong\">对不起，您提交的内容存在以下错误:</span>"+sysSPLIT8+tmpError;
		showMessage("系统消息 - <?php echo ($this->sysFileConfig['bussinessMetaTitle']); ?>",tmpSTR,"","0");
		return false;
	}else{
		return true;
	}
}
<?php
	}
	
}

?>