<?php
class ComPage extends netsPage {
	public $sTopMessage='';
	public $sTopMessageStyle='';
	public $sBackMessage='';
	
	public $sNetsAdv_A='&nbsp;';
	public $sNetsAdv_B='&nbsp;';
	public $sNetsAdv_C='&nbsp;';

	public $sTreeData=array();
	public $sPButton;
	public $sPAjaxButton;
	public $sControl;
	public $sSortButton=array();
	public $sCode;
	public $sNavigation=array();//$this->sNavigation[]=array('Text'=>'','Link'=>'');
	public $AnonymousUserData=array();
	public $sMenuid=0;
	public $sMenustate=0;
	public $sApp_Menu=array();
	public $sPlace_Root='';
	
	public $sSpicalValue=array(); #Define spical value user by Add or Modify : tableIndex,columnName,value
	public $sSortParameter=''; #Define sort menu parameter
	public $sSortSearch=array();
	public $sSortData=array();
	public $sSortPage='';
	public $sOptionSQL='';
	public $sInterface_URL='';
	public $sTimecallbackDefined=0;
	
	public $sPrevid=0;
	public $sNextid=0;
	public $sPrevNextRecordParameters='0';
	
	public $sPresentationURL='';
	//-- #Interface --
	public $sPID=0;
	public $sPPXD='';
	//-- #Normalized --
	public $sRecordCount=0;
	public $sZoneid=0;
	public $sZoneMustbe=1;
	public $sZoneCache=array();

	
	public function ComPage(){
		$this->netsPage();
	}
	public function OnInitial(){
		$tmpCode=new netsCode();
		$this->sTopMessageStyle=$this->sysHidden;
		//-- ------ #Get db config ------ --
		$this->sDb=new netsDb($this->sConnString);
		$this->sDbCore=new netsDb($this->sConnStringCore);
		$this->sApp_User=new netsuserinfo($this->sConnStringCore);
		$this->sApp_Menu=new netssysmenu($this->sConnString);
		//-- ------ #Create PButton instanct ------ --
		$this->sPButton=new netsPButton();
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sControls=new ComControls();
		$this->sControls->sysFileConfig=$this->sysFileConfig;
		$this->sControl=new netsControl();
		$this->sControl->sysFileConfig=$this->sysFileConfig;
		$this->sCode=new netsCode();
		//-- ------ ### ------ --
		$this->getNetsAdv();

		parent::OnInitial();
	}
	public function OnLoadPreData(){
		//-- ------ #Get commen option ------ --
		$this->sOptionSQL=' SELECT A.sotID,A.sotName,A.sotValue,A.sotParid,A.sotIntroduct,A.sotSourceR00
			FROM '.$this->sysTableHead.'netssysoption AS A
			WHERE 1=1 AND A.sotRecycle=0 AND A.sotChecked>1 AND A.sotParid={Nets.Parid}
			ORDER BY A.sotOrderBy DESC,A.sotID DESC ';
		$this->sTableSQL=' SELECT A.sttID,A.sttName,A.sttFunctionid FROM '.$this->sysTableHead.'netssystable AS A
			WHERE 1=1 AND A.sttRecycle=0 AND A.sttChecked>1 AND A.sttType=3 AND A.sttFunctionid={Nets.Parid}
			ORDER BY A.sttOrderBy DESC,A.sttID DESC ';
		$this->sTemplateSQL=' SELECT A.stemtID,A.stemtName
			FROM '.$this->sysTableHead.'netssystemplate AS A
			WHERE 1=1 AND A.stemtRecycle=0 AND A.stemtChecked>1 AND A.stemtFunctionid={Nets.Parid}
			ORDER BY A.stemtOrderBy DESC,A.stemtID DESC ';
		$this->sZoneSQL=' SELECT A.sztID,A.sztName
			FROM '.$this->sysTableHead.'netssyszone AS A
			WHERE 1=1 AND A.sztRecycle=0 AND A.sztChecked>1 AND A.sztParid={Nets.Parid}
			ORDER BY A.sztOrderBy DESC,A.sztID DESC ';
		$this->sUsergradeSQL=' SELECT A.ugratID,A.ugratName
			FROM '.$this->sysTableHead.'netsusergrade AS A
			WHERE 1=1 AND A.ugratRecycle=0 AND A.ugratChecked>1 AND A.ugratParid={Nets.Parid}
			ORDER BY A.ugratOrderBy DESC,A.ugratID DESC ';
		$this->sChannelSQL=' SELECT A.cctID,A.cctName
			FROM '.$this->sysTableHead.'cmschannel AS A
			WHERE 1=1 AND A.cctRecycle=0 AND A.cctChecked>1 AND A.cctParid={Nets.Parid}
			ORDER BY A.cctOrderBy DESC,A.cctID DESC ';
		
		//Checked
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=$this->sOptionSQL;
		$tmpAR0['InitialString']=13;
		$tmpAR0['Parid']='sotID';
		$tmpAR0['Text']='sotName';
		$tmpAR0['Value']='sotValue';
		$tmpAR0['Source']='sotSourceR00';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$tmpCacheFlag='nets/options_Checked';
		$this->sControl->getOptions($tmpAR0,$tmpCacheFlag,$this->sControl->sDpReturnTemplate,$this->sChecked1);
		$this->sChecked2=$this->sChecked1;
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有审核状态]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sChecked2,$tmpAR0);
		//Boolean
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=$this->sOptionSQL;
		$tmpAR0['InitialString']=14;
		$tmpAR0['Parid']='sotID';
		$tmpAR0['Text']='sotName';
		$tmpAR0['Value']='sotValue';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$tmpCacheFlag='nets/options_Boolean';
		$this->sControl->getOptions($tmpAR0,$tmpCacheFlag,$this->sControl->sDpReturnTemplate,$this->sBoolean1);
		$this->sBoolean2=$this->sBoolean1;
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sBoolean2,$tmpAR0);
		//Enable
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=$this->sOptionSQL;
		$tmpAR0['InitialString']=15;
		$tmpAR0['Parid']='sotID';
		$tmpAR0['Text']='sotName';
		$tmpAR0['Value']='sotValue';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$tmpCacheFlag='nets/options_Enable';
		$this->sControl->getOptions($tmpAR0,$tmpCacheFlag,$this->sControl->sDpReturnTemplate,$this->sEnable1);
		$this->sEnable2=$this->sEnable1;
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sEnable2,$tmpAR0);
		//RequireType
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=$this->sOptionSQL;
		$tmpAR0['InitialString']=83;
		$tmpAR0['Parid']='sotID';
		$tmpAR0['Text']='sotName';
		$tmpAR0['Value']='sotValue';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$tmpCacheFlag='nets/options_RequireType';
		$this->sControl->getOptions($tmpAR0,$tmpCacheFlag,$this->sControl->sDpReturnTemplate,$this->sRequireType1);
		$this->sRequireType2=$this->sRequireType1;
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有类型]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sRequireType2,$tmpAR0);
		//Usergrade
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=$this->sUsergradeSQL;
		$tmpAR0['InitialString']=2;
		$tmpAR0['Parid']='ugratID';
		$tmpAR0['Text']='ugratName';
		$tmpAR0['Value']='ugratID';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$tmpCacheFlag='nets/usergrade_all';
		$this->sControl->getOptions($tmpAR0,$tmpCacheFlag,$this->sControl->sDpReturnTemplate,$this->sUsergrade1);
		$this->sUsergrade2=$this->sUsergrade1;
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有用户类型]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sUsergrade2,$tmpAR0);
		//Usergroup
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=' SELECT
			A.ugtID,A.ugtName
			FROM '.$this->sysTableHead.'netsusergroup AS A
			WHERE 1=1 AND A.ugtRecycle=0 AND A.ugtChecked>1
			ORDER BY A.ugtOrderBy DESC,A.ugtID DESC ';
		$tmpAR0['InitialString']=0;
		$tmpAR0['Parid']='ugtID';
		$tmpAR0['Text']='ugtName';
		$tmpAR0['Value']='ugtID';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$tmpCacheFlag='nets/usergroup_all';
		$this->sControl->getOptions($tmpAR0,$tmpCacheFlag,$this->sControl->sDpReturnTemplate,$this->sUsergroup1);
		$this->sUsergroup2=$this->sUsergroup1;
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sUsergroup2,$tmpAR0);
		//Channel
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=$this->sChannelSQL;
		$tmpAR0['InitialString']=2;
		$tmpAR0['Parid']='cctID';
		$tmpAR0['Text']='cctName';
		$tmpAR0['Value']='cctID';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$tmpCacheFlag='cms/Channel_Normal';
		$this->sControl->getOptions($tmpAR0,$tmpCacheFlag,$this->sControl->sDpReturnTemplate,$this->sChannel1);
		$this->sChannel2=$this->sChannel1;
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有频道]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sChannel2,$tmpAR0);
		
		//-- ------ #AnonymousUser ------ --
		$this->AnonymousUserData=array(
			array('Publisher_Name','',0,'uitNickname',$this->sysFileConfig['AnonymousUser_Name'],),
			array('Publisher_Email','',0,'uitEmail',$this->sysFileConfig['AnonymousUser_Email'],),
			array('Publisher_Source','',1,'uictSourceR00',$this->sysFileConfig['AnonymousUser_Source'],),
			array('Publisher_Mobile','',1,'uictCo_Mobile',$this->sysFileConfig['AnonymousUser_Mobile'],),
			array('Publisher_Tele','',1,'uictCo_Tele',$this->sysFileConfig['AnonymousUser_Tele'],),
			array('Publisher_Software','',1,'uictCo_Software',$this->sysFileConfig['AnonymousUser_Software'],),
			array('Publisher_Homepage','',1,'uictCo_Website',$this->sysFileConfig['AnonymousUser_Website'],),
			);
		//-- ------ #Menu ------ --
		//-- #MENU --
		$tmpSTR=str_replace($this->sysSiteHome,'../../../',$this->sysPage);
		$tmpData0=$this->sApp_Menu->getMenuid(0,$tmpSTR,'Mana');
		if(count($tmpData0)>0){
			$this->sMenuid=$tmpData0[0]['smetID'];
		}
		//-- #MENUSTATE --
		$tmpAR0=$this->AnalyerRequest($this->sysCookieHead.'Systemmenustate',0,2);
		$this->sMenustate=$tmpAR0[0];
		
		return 0;
	}
	public function OnAdd(){
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		$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];
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_add',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有新增加权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Add ------ --
		$this->sApp->TransStart();
		//#Get numCode
		$tmpSTR=$this->sTable[0]['sttColumnHead'].'NumCode';
		$tmpDbDescriptions[0]['TableDescription']['SearchColumn']=$tmpSTR;
		$tmpDbDescriptions[0]['Columns'][$tmpSTR]['Value']='N_'.date('YmdHis');
		$this->sApp->numCode($tmpDbDescriptions[0]);
		//#Set value
		$tmpDbDescription0=$tmpDbDescriptions;
		$Coun0=0;
		foreach ($tmpDbDescription0 as $tableCell){
			foreach ($tableCell['Columns'] as $Column){
				if($Column['stcotName']!=$this->sTable[$Coun0]['sttColumnHead'].'ID' &&
					$Column['stcotName']!=$this->sTable[$Coun0]['sttColumnHead'].'NumCode' &&
					$Column['stcotName']!=$this->sTable[$Coun0]['sttColumnHead'].'CreateBy' &&
					$Column['stcotName']!=$this->sTable[$Coun0]['sttColumnHead'].'CreateTime' &&
					$Column['stcotName']!=$this->sTable[$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'][$this->sTable[0]['sttColumnHead'].'Checked']['Value'])){
			$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'Checked']['Value']=$this->sysFileConfig['sysDefaultChecked'];
		}
		if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value'])){
			$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value']=$tmpMainUserid[0];
		}
		if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime'])){
			$tmpDbDescriptions[0]['Columns'][$this->sTable[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'][$this->sTable[1]['sttColumnHead'].$Row0[0]])){
					if ($tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']==$Row0[1]) {
						$tmpFlag=1;
					}
				}
			}
			if ($this->sUserInfo[0]['Columns']['uitID']['Value']==0 && $tmpFlag==1) {
				$tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']=$Row0[4];
			}else if ($tmpFlag==1 && isset($tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]])) {
				$tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']=$this->sUserInfo[$Row0[2]]['Columns'][$Row0[3]]['Value'];
			}
		}
		
		//Spical value array
		foreach ($this->sSpicalValue as $Cell){
			if(isset($tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
				$tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
			}
		}
		//-- #Set spical --
		
		//#Add
		$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
		if($tmpINT!=0){
			$this->sApp->TransRollback();
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			return 1;
		}
		$Coun0=0;
		while (count($tmpDbDescriptions)>$Coun0){
			if($Coun0==0){
				$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'NumCode,'.$this->sTable[$Coun0]['sttColumnHead'].'ID';
			}else {
				$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'IndexID';
			}
			$Coun0++;
		}
		$tmpINT=$this->sApp->add($tmpDbDescriptions);
		if($tmpINT!=0){
			$this->sApp->TransRollback();
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			return 1;
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('SUCCESS','','添加成功',$this->sysPage.'?ActionType=Normal&Normal='.$tmpMainid[0].','.$tmpMainTableid[0].'');
		/*
		$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 OnModify(){
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		$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];
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有修改权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Is add ------ --
		if($this->sMainID==0){
			$this->OnAdd();
			return 1;
		}
		//-- ------ #Modify ------ --
		$this->sApp->TransStart();
		//#Get one
		$Coun0=0;
		while(count($tmpDbDescriptions)>$Coun0){
			if($Coun0==0){
				$tmpDbDescriptions[$Coun0]['Columns'][$this->sTable[$Coun0]['sttColumnHead'].'ID']['Value']=$this->sMainID;
			}else {
				$tmpDbDescriptions[$Coun0]['Columns'][$this->sTable[$Coun0]['sttColumnHead'].'IndexID']['Value']=$this->sMainID;
			}
			$Coun0++;
		}
		$this->sApp->getOne($tmpDbDescriptions);
		//#Set value
		$tmpDbDescription0=$tmpDbDescriptions;
		$Coun0=0;
		foreach ($tmpDbDescription0 as $tableCell){
			foreach ($tableCell['Columns'] as $Column){
				if($Column['stcotName']!=$this->sTable[$Coun0]['sttColumnHead'].'ID' &&
					$Column['stcotName']!=$this->sTable[$Coun0]['sttColumnHead'].'NumCode' &&
					$Column['stcotName']!=$this->sTable[$Coun0]['sttColumnHead'].'IndexID'){
					$tmpAR0=$this->AnalyerRequest($Column['stcotName'].'Txt',$Column['stcoctDefaultValue'],1);
					foreach ($this->sUiDescription_Normal as $tmpColumns){
						if($tmpColumns['stcotName']==$Column['stcotName']){
							$tmpDbDescriptions[$Coun0]['Columns'][$Column['stcotName']]['Value']=$tmpAR0[0];
						}
					}
				}
			}
			$Coun0++;
		}
		//-- #Set conventional --
		if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime'])){
			$tmpDbDescriptions[0]['Columns'][$this->sTable[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'][$this->sTable[1]['sttColumnHead'].$Row0[0]])){
					if ($tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']==$Row0[1]) {
						$tmpFlag=1;
					}
				}
			}
			if ($this->sUserInfo[0]['Columns']['uitID']['Value']==0 && $tmpFlag==1) {
				$tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']=$Row0[4];
			}else if ($tmpFlag==1 && isset($tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]])) {
				$tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']=$this->sUserInfo[$Row0[2]]['Columns'][$Row0[3]]['Value'];
			}
		}
		//Spical value array
		foreach ($this->sSpicalValue as $Cell){
			if(isset($tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
				$tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
			}
		}
		//-- #Set spical --

		//#Modify
		$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
		if($tmpINT!=0){
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			return 1;
		}
		$tmpINT=$this->sApp->modify($tmpDbDescriptions);
		if($tmpINT!=0){
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			return 1;
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('SUCCESS','','修改成功',$this->sysPage.'?ActionType=Normal&Normal='.$this->sMainID.','.$tmpMainTableid[0].'');
		return 0;
	}
	public function OnModify_MultipleByTxt(){
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有修改权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ ### ------ --
		$tmpAR0=$this->AnalyerRequest('MultipleByTxt_TextTxt','',1);
		$tmpDatas=$tmpAR0[0];

		$tmpAR0=$this->AnalyerRequest('MultipleByTxt_ColumnsConfigTxt','',1);
		$tmpSTR=$tmpAR0[0];
		$tmpColumnsConfig=$tmpSTR.$this->sysSPLIT1;
		$tmpAR0=explode($this->sysSPLIT5,$tmpSTR);
		$tmpTextAR=explode($this->sysSPLIT2,$tmpAR0[0]);
		array_pop($tmpTextAR);
		$tmpColumnAR=explode($this->sysSPLIT2,$tmpAR0[1]);
		array_pop($tmpColumnAR);

		$tmpAR0=$this->AnalyerRequest('MultipleByTxt_RowSplitTxt','',1);
		$tmpRowSplit=$tmpAR0[0];
		if ($tmpRowSplit=='') {
			$tmpRowSplit=$this->sysSPLIT4;
		}
		$tmpColumnsConfig.=str_replace($this->sysSPLIT4,'',$tmpRowSplit).$this->sysSPLIT1;
		
		$tmpAR0=$this->AnalyerRequest('MultipleByTxt_ColumnSplitTxt','',1);
		$tmpColumnSplit=$tmpAR0[0];
		$tmpColumnsConfig.=str_replace($this->sysSPLIT1,'-A-',$tmpColumnSplit);

		$tmpAR0=$this->AnalyerRequest('MultipleByTxt_IDSTxt','',1);
		$tmpIDS=$tmpAR0[0];
		$tmpIDAR=explode($this->sysSPLIT2,$tmpAR0[0]);
		
		$tmpMainUserid=$this->AnalyerRequest('mainUserid',0,1);
		$tmpMainTableid=$this->AnalyerRequest('mainTableid',0,1);
		
		$tmpDbDescriptions_All=array();
		//-- ------ #Modify ------ --
		//-- #ID AND Text --
		$tmpAR0=explode($tmpRowSplit,$tmpDatas);
		$Coun0=0;
		foreach ($tmpAR0 as $Row0){
			if (isset($tmpIDAR[$Coun0])) {
				$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'ID']['Value']=$tmpIDAR[$Coun0];
			}
			$tmpAR1=explode($tmpColumnSplit,$Row0);
			$Coun1=0;
			foreach ($tmpTextAR as $Row1){
				if (isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1])) {
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1]['Value']=$tmpAR1[$Coun1];
					$Coun1++;
				}else if (isset($tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1])) {
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1]['Value']=$tmpAR1[$Coun1];
					$Coun1++;
				}
			}
			$tmpDbDescriptions_All[]=$tmpDbDescriptions;
			$Coun0++;
		}
		//-- #Columns --
		$Coun0=0;
		foreach ($tmpColumnAR as $Row1){
			$Coun1=0;
			while (count($tmpDbDescriptions_All)>$Coun1) {
				if (isset($tmpDbDescriptions_All[$Coun1][0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1])) {
					$tmpAR0=$this->AnalyerRequest($this->sTable[0]['sttColumnHead'].$Row1.'Txt',$tmpDbDescriptions_All[$Coun1][0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1]['Value'],1);
					$tmpDbDescriptions_All[$Coun1][0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1]['Value']=$tmpAR0[0];
				}else if (isset($tmpDbDescriptions_All[$Coun1][1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1])) {
					$tmpAR0=$this->AnalyerRequest($this->sTable[1]['sttColumnHead'].$Row1.'Txt',$tmpDbDescriptions_All[$Coun1][1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1]['Value'],1);
					$tmpDbDescriptions_All[$Coun1][1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1]['Value']=$tmpAR0[0];
				}
				$Coun1++;
			}
			$Coun0++;
		}
		//-- ------ #Modify ------ --
		$this->sApp->TransStart();
		foreach ($tmpDbDescriptions_All as $Row0){
			$tmpDbDescriptions=$Row0;
			if ($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'ID']['Value']==0) {
				//-- #ADD --
				//#Get numCode
				$tmpSTR=$this->sTable[0]['sttColumnHead'].'NumCode';
				$tmpDbDescriptions[0]['TableDescription']['SearchColumn']=$tmpSTR;
				$tmpDbDescriptions[0]['Columns'][$tmpSTR]['Value']='N_'.date('YmdHis');
				$this->sApp->numCode($tmpDbDescriptions[0]);
				//#Set value
				foreach ($tmpTextAR as $Row1){
					$Coun_Table=0;
					foreach ($this->sTable as $Row_Table){
						if (isset($Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1])) {
							$tmpDbDescriptions[$Coun_Table]['Columns'][$Row_Table['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1];
						}
					}
				}
				foreach ($tmpColumnAR as $Row1){
					$Coun_Table=0;
					foreach ($this->sTable as $Row_Table){
						if (isset($Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1])) {
							$tmpDbDescriptions[$Coun_Table]['Columns'][$Row_Table['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1];
						}
					}
				}
				
				
				
				/*
				//#Set value
				foreach ($tmpTextAR as $Row1){
					if (isset($Row0[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1])) {
						$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1];
					}else if (isset($Row0[0]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1])) {
						$tmpDbDescriptions[0]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1];
					}
				}
				foreach ($tmpColumnAR as $Row1){
					if (isset($Row0[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1])) {
						$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$this->sTable[0]['sttColumnHead'].$Row1];
					}else if (isset($Row0[0]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1])) {
						$tmpDbDescriptions[0]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$this->sTable[1]['sttColumnHead'].$Row1];
					}
				}
				
				*/
				
				//#Set spical value
				if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value'])){
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value']=$tmpMainUserid[0];
				}
				if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime'])){
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime']['Value']=date($this->sysTimeFormat);
				}
				foreach ($this->sSpicalValue as $Cell){
					if(isset($tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
						$tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
					}
				}
				
				//#Add
				$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
				if($tmpINT!=0){
					$this->sApp->TransRollback();
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
				$Coun0=0;
				while (count($tmpDbDescriptions)>$Coun0){
					if($Coun0==0){
						$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'NumCode,'.$this->sTable[$Coun0]['sttColumnHead'].'ID';
					}else {
						$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'IndexID';
					}
					$Coun0++;
				}
				$tmpINT=$this->sApp->add($tmpDbDescriptions);
				if($tmpINT!=0){
					$this->sApp->TransRollback();
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
				
			}else {
				//-- #MODIFY --
				//#Get one
				$this->sApp->getOne($tmpDbDescriptions);
				//#Set value
				foreach ($tmpTextAR as $Row1){
					$Coun_Table=0;
					foreach ($this->sTable as $Row_Table){
						if (isset($Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1])) {
							$tmpDbDescriptions[$Coun_Table]['Columns'][$Row_Table['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1];
						}
					}
				}
				foreach ($tmpColumnAR as $Row1){
					$Coun_Table=0;
					foreach ($this->sTable as $Row_Table){
						if (isset($Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1])) {
							$tmpDbDescriptions[$Coun_Table]['Columns'][$Row_Table['sttColumnHead'].$Row1]=$Row0[0]['Columns'][$Row_Table['sttColumnHead'].$Row1];
						}
					}
				}
				//#Set spical value
				if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime'])){
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime']['Value']=date($this->sysTimeFormat);
				}
				foreach ($this->sSpicalValue as $Cell){
					if(isset($tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
						$tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
					}
				}
				//#Modify
				$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
				if($tmpINT!=0){
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
				$tmpINT=$this->sApp->modify($tmpDbDescriptions);
				if($tmpINT!=0){
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
			}
		}
		//-- ------ #Clear ------ --
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('ERROR','',$this->sMetaTitle.'数据保存成功',$this->sysPage.'?ActionType=Normal_MultipleByTxt&Normal_MultipleByTxt='.$tmpIDS.'&Normal_MultipleByTxt_Columns='.$tmpColumnsConfig);
		return 0;
	}
	public function OnModify_MultipleByRow(){
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有修改权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ ### ------ --
		$tmpAR0=$this->AnalyerRequest('MultipleByRow_ColumnsConfigTxt','',1);
		$tmpColumnsConfig=$tmpAR0[0].$this->sysSPLIT1.'---'.$this->sysSPLIT1.'---';
		
		$tmpAR0=$this->AnalyerRequest('Panel_Controls','',1);
		$tmpColumnAR=explode($this->sysSPLIT1,$tmpAR0[0]);
		array_pop($tmpColumnAR);

		$tmpMainUserid=$this->AnalyerRequest('mainUserid',0,1);
		$tmpMainTableid=$this->AnalyerRequest('mainTableid',0,1);
		
		//-- ------ #Modify ------ --
		$tmpIDS='';
		$this->sApp->TransStart();
		$Coun_IDS=0;
		$tmpAR0=$this->AnalyerRequest('IDTxt_'.$Coun_IDS,'',1);
		while ($tmpAR0[0]!='') {
			$tmpDbDescriptions=array();
			foreach ($this->sTable as $tableCell){
				$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
			}
			$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'ID']['Value']=$tmpAR0[0];
			if ($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'ID']['Value']==0) {
				//-- #ADD --
				//#Get numCode
				$tmpSTR=$this->sTable[0]['sttColumnHead'].'NumCode';
				$tmpDbDescriptions[0]['TableDescription']['SearchColumn']=$tmpSTR;
				$tmpDbDescriptions[0]['Columns'][$tmpSTR]['Value']='N_'.date('YmdHis');
				$this->sApp->numCode($tmpDbDescriptions[0]);
				//#Set value
				foreach ($tmpColumnAR as $Row1){
					$Coun_Table=0;
					foreach ($this->sTable as $Row_Table){
						if (isset($tmpDbDescriptions[$Coun_Table]['Columns'][$Row1])) {
							$tmpAR0=$this->AnalyerRequest($Row1.'_'.$Coun_IDS.'Txt',$tmpDbDescriptions[$Coun_Table]['Columns'][$Row1]['stcoctDefaultValue'],1);
							$tmpDbDescriptions[$Coun_Table]['Columns'][$Row1]['Value']=$tmpAR0[0];
						}
					}
				}
				//#Set spical value
				if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value'])){
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value']=$tmpMainUserid[0];
				}
				if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime'])){
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime']['Value']=date($this->sysTimeFormat);
				}
				foreach ($this->sSpicalValue as $Cell){
					if(isset($tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
						$tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
					}
				}
				
				//#Add
				$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
				if($tmpINT!=0){
					$this->sApp->TransRollback();
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
				$Coun0=0;
				while (count($tmpDbDescriptions)>$Coun0){
					if($Coun0==0){
						$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'NumCode,'.$this->sTable[$Coun0]['sttColumnHead'].'ID';
					}else {
						$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'IndexID';
					}
					$Coun0++;
				}
				$tmpINT=$this->sApp->add($tmpDbDescriptions);
				if($tmpINT!=0){
					$this->sApp->TransRollback();
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
				
			}else {
				//-- #MODIFY --
				//#Get one
				$this->sApp->getOne($tmpDbDescriptions);
				//#Set value
				foreach ($tmpColumnAR as $Row1){
					$Coun_Table=0;
					foreach ($this->sTable as $Row_Table){
						if (isset($tmpDbDescriptions[$Coun_Table]['Columns'][$Row1])) {
							$tmpAR0=$this->AnalyerRequest($Row1.'_'.$Coun_IDS.'Txt',$tmpDbDescriptions[$Coun_Table]['Columns'][$Row1]['stcoctDefaultValue'],1);
							$tmpDbDescriptions[$Coun_Table]['Columns'][$Row1]['Value']=$tmpAR0[0];
						}
					}
				}
				//#Set spical value
				if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime'])){
					$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime']['Value']=date($this->sysTimeFormat);
				}
				foreach ($this->sSpicalValue as $Cell){
					if(isset($tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
						$tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
					}
				}
				//#Modify
				$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
				if($tmpINT!=0){
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
				$tmpINT=$this->sApp->modify($tmpDbDescriptions);
				if($tmpINT!=0){
					$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
					return 1;
				}
				$tmpIDS.=$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'ID']['Value'].$this->sysSPLIT2;
			}
			$Coun_IDS++;
			$tmpAR0=$this->AnalyerRequest('IDTxt_'.$Coun_IDS,'',1);
		}
		
		//-- ------ #Clear ------ --
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('ERROR','',$this->sMetaTitle.'数据保存成功',$this->sysPage.'?ActionType=Normal_MultipleByRow&Normal_MultipleByRow='.$tmpIDS.'&Normal_MultipleByRow_Columns='.$tmpColumnsConfig);
		return 0;
	}
	public function OnModify_PageLine(){
		$tmpCode=new netsCode();
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有修改权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ ### ------ --
		$tmpMainid=$this->AnalyerRequest('mainID','0;0',1); #here mainID value is - mainID;Index
		$tmpMainid=explode($this->sysSPLIT2,$tmpMainid[0]);
		$tmpAR0=$this->AnalyerRequest('ListBox','',1);
		$tmpAR0=explode($this->sysSPLIT2,$tmpAR0[0]);
		array_pop($tmpAR0);
		if(count($tmpAR0)==0){ #If non list control should be return 1
			$this->sJscript=$this->Message('SUCCESS','','修改已经保存','');
			return 1;
		}
		//-- ------ #Modify ------ --
		$this->sApp->TransStart();
		//#Get one
		$Coun0=0;
		while(count($tmpDbDescriptions)>$Coun0){
			if($Coun0==0){
				$tmpDbDescriptions[$Coun0]['Columns'][$this->sTable[$Coun0]['sttColumnHead'].'ID']['Value']=$tmpMainid[0];
			}else {
				$tmpDbDescriptions[$Coun0]['Columns'][$this->sTable[$Coun0]['sttColumnHead'].'IndexID']['Value']=$tmpMainid[0];
			}
			$Coun0++;
		}
		$this->sApp->getOne($tmpDbDescriptions);
		//#Set value
		$tmpDbDescriptions0=$tmpDbDescriptions;
		$Coun0=0;
		foreach ($tmpDbDescriptions0 as $tableCell){
			foreach ($tmpAR0 as $Cell){
				if(isset($tableCell['Columns'][$Cell]['stcotName'])){
					$tmpAR0=$this->AnalyerRequest($tableCell['Columns'][$Cell]['stcotName'].'TxtList'.$tmpCode->Int32($tmpMainid[1],0),$tableCell['Columns'][$Cell]['stcoctDefaultValue'],1);
					$tmpDbDescriptions[$Coun0]['Columns'][$Cell]['Value']=$tmpAR0[0];
				}
			}
			$Coun0++;
		}
		//#Modify
		$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
		if($tmpINT!=0){
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			return 1;
		}
		$tmpINT=$this->sApp->modify($tmpDbDescriptions);
		if($tmpINT!=0){
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			return 1;
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('SUCCESS','','修改已保存','');
		return 0;
	}
	public function OnModify_Page(){
		$tmpAR0=$this->AnalyerRequest('ListBox','',1);
		$tmpAR0=explode($this->sysSPLIT2,$tmpAR0[0]);
		array_pop($tmpAR0);
		if(count($tmpAR0)==0){ #If non list control should be return 1
			$this->sJscript=$this->Message('SUCCESS','','修改已经保存','');
			return 1;
		}
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有修改权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Modify ------ --
		$this->sApp->TransStart();
		$tmpError='';
		$Coun0=0;
		while(isset($_POST[$tmpAR0[0].'TxtList'.$Coun0])){
			$tmpDbDescriptions=array();
			foreach ($this->sTable as $tableCell){
				$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
			}
			$tmpMainid=$this->AnalyerRequest($this->sTable[0]['sttColumnHead'].'IDTxtList'.$Coun0,'0',1);
			//#Get one
			$Coun1=0;
			while(count($tmpDbDescriptions)>$Coun1){
				if($Coun1==0){
					$tmpDbDescriptions[$Coun1]['Columns'][$this->sTable[$Coun1]['sttColumnHead'].'ID']['Value']=$tmpMainid[0];
				}else {
					$tmpDbDescriptions[$Coun1]['Columns'][$this->sTable[$Coun1]['sttColumnHead'].'IndexID']['Value']=$tmpMainid[0];
				}
				$Coun1++;
			}
			$this->sApp->getOne($tmpDbDescriptions);
			//#Set value
			$tmpDbDescriptions0=$tmpDbDescriptions;
			$Coun1=0;
			foreach ($tmpDbDescriptions0 as $tableCell){
				foreach ($tmpAR0 as $Cell){
					if(isset($tableCell['Columns'][$Cell]['stcotName'])){
						$tmpAR1=$this->AnalyerRequest($tableCell['Columns'][$Cell]['stcotName'].'TxtList'.$Coun0,$tableCell['Columns'][$Cell]['stcoctDefaultValue'],1);
						$tmpDbDescriptions[$Coun1]['Columns'][$Cell]['Value']=$tmpAR1[0];
					}
				}
				$Coun1++;
			}
			//#Modify
			$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
			if($tmpINT!=0){
				$tmpError.=$this->sApp->sysLastError.$this->sysSPLIT8;
			}
			$tmpINT=$this->sApp->modify($tmpDbDescriptions);
			if($tmpINT!=0){
				$tmpError.=$this->sApp->sysLastError.$this->sysSPLIT8;
			}
			
			$Coun0++;
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		if($tmpError!=''){
			$this->sJscript=$this->Message('SUCCESS','','本页修改过程中存在以下错误：'.$this->sysSPLIT8.$tmpError,'');
		}else {
			$this->sJscript=$this->Message('SUCCESS','','本页修改已保存','');
		}
		return 0;
	}
	public function OnDelete(){
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		$tmpAR0=$this->AnalyerRequest('mainID','0',1);
		$this->sMainID=$tmpAR0[0];
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有删除权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Delete ------ --
		$this->sApp->TransStart();
		$tmpINT=$this->sApp->delete($tmpDbDescriptions,$this->sMainID,$this->sysSPLIT1);
		if($tmpINT!=0){
			$this->sJscript=$this->Message('SUCCESS','','删除失败',$this->sApp->sysLastError);
			return 1;
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('SUCCESS','','删除成功',$this->sysPage);
		return 0;
	}
	public function OnDelete_AT(){
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		$tmpMainid=$this->AnalyerRequest('DDelete_AT',0,0);
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有删除权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Delete ------ --
		$this->sApp->TransStart();
		$tmpINT=$this->sApp->delete($tmpDbDescriptions,$tmpMainid[0],$this->sysSPLIT2);
		if($tmpINT!=0){
			$this->sJscript=$this->Message('SUCCESS','','删除失败',$this->sApp->sysLastError);
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('SUCCESS','','删除成功',$this->sysPage);
		return 0;
	}
	public function OnDelete_Multiple(){
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		$tmpAR0=$this->AnalyerRequest('checkedBox','',0);
		$tmpIDS=$tmpAR0[0];
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有删除权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Delete ------ --
		$this->sApp->TransStart();
		$tmpINT=$this->sApp->delete($tmpDbDescriptions,$tmpIDS,$this->sysSPLIT1);
		if($tmpINT!=0){
			$this->sJscript=$this->Message('SUCCESS','',$this->sApp->sysLastError,'');
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		$this->sJscript=$this->Message('SUCCESS','','删除成功','');
		return 0;
	}
	
	public function OnNormal_MultipleByTxt(){
		$tmpCode=new netsCode();
		
		$tmpAR0=$this->AnalyerRequest('Normal_MultipleByTxt','',0);
		$tmpIDS=$tmpAR0[0];
		$tmpAR0=$this->AnalyerRequest('Normal_MultipleByTxt_Columns','Name;|||Parid;,,-A-',0);
		$tmpColumns=$tmpAR0[0];
		$tmpRowSplit=$tmpAR0[1];
		$tmpColumnSplit=str_replace($this->sysSPLIT15,$this->sysSPLIT1,$tmpAR0[2]);
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有修改权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Normal_MultipleByTxt ------ --
		//-- #Columns --
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']='MultipleByTxt_ColumnsConfig';
		$tmpAR0['stcoctUiName']='数据项';
		$tmpAR0['stcoctUiType']='CheckboxAR_DataColumns';
		$tmpAR0['stcoctUiRecognise']='Normal_MultipleByTxt';
		$tmpAR0['Value']=$tmpColumns;
		foreach ($this->sUiDescription_Normal as $Row0){
			if ($Row0['stcotType']==1) {
				$tmpSTR=$Row0['stcotName'];
				$Coun1=0;
				while (count($this->sTable)>$Coun1){
					$tmpSTR=str_replace($this->sTable[$Coun1]['sttColumnHead'],'',$tmpSTR);
					
					$Coun1++;
				}
				$tmpAR0['Option'][]=array('Text'=>$Row0['stcoctUiName'],'Value'=>$tmpSTR);
			}
		}
		$this->sUiDescription_Normal_MultipleByTxt_Columns[]=$tmpAR0;
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']='MultipleByTxt_RowSplit';
		$tmpAR0['stcoctUiName']='行分割符';
		$tmpAR0['stcoctUiType']='Text';
		$tmpAR0['stcoctUiRecognise']='Normal_MultipleByRow';
		$tmpAR0['Value']=$tmpRowSplit;
		$this->sUiDescription_Normal_MultipleByTxt_Columns[]=$tmpAR0;
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']='MultipleByTxt_ColumnSplit';
		$tmpAR0['stcoctUiName']='项分割符';
		$tmpAR0['stcoctUiType']='Text';
		$tmpAR0['stcoctUiRecognise']='Normal_MultipleByRow';
		$tmpAR0['Value']=$tmpColumnSplit;
		$this->sUiDescription_Normal_MultipleByTxt_Columns[]=$tmpAR0;
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']='MultipleByTxt_IDS';
		$tmpAR0['stcoctUiName']='数据编号';
		$tmpAR0['stcoctUiType']='Text';
		$tmpAR0['stcoctUiRecognise']='Normal_MultipleByRow';
		$tmpAR0['Value']=$tmpIDS;
		$this->sUiDescription_Normal_MultipleByTxt_Columns[]=$tmpAR0;
		//-- ------ #Normal_MultipleByTxt ------ --
		//-- #Columns --
		$tmpAR0=explode($this->sysSPLIT5,$tmpColumns);
		$tmpTextAR=explode($this->sysSPLIT2,$tmpAR0[0]);
		array_pop($tmpTextAR);
		$tmpColumnAR=explode($this->sysSPLIT2,$tmpAR0[1]);
		array_pop($tmpColumnAR);
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']=$this->sMetaTitle.'数据操作';
		$tmpAR0['stcoctUiName']=$this->sMetaTitle.'数据操作';
		$tmpAR0['stcotType']='4';
		$tmpAR0['stcoctUiType']='Text';
		$tmpAR0['stcoctUiRecognise']='Text';
		$this->sUiDescription_Normal_MultipleByTxt[]=$tmpAR0;
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']='MultipleByTxt_Text';
		$tmpAR0['stcoctUiName']='数据内容';
		$tmpAR0['stcoctUiType']='TextArea';
		$tmpAR0['stcoctUiRecognise']='TextArea';
		$tmpAR0['Value']=$tmpIDS;
		$this->sUiDescription_Normal_MultipleByTxt[]=$tmpAR0;
		
		$tmpTableColumns=array();
		foreach ($this->sTable as $Row_Table){
			$tmpTableColumns[]=$Row_Table['sttColumnHead'];
		}
		
		$Coun0=2;
		foreach ($tmpColumnAR as $Row0){
			foreach ($this->sUiDescription_Normal as $Row1){
				if (in_array(str_replace($Row0,'',$Row1['stcotName']),$tmpTableColumns)) {
					$this->sUiDescription_Normal_MultipleByTxt[$Coun0]=$Row1;
					$this->sUiDescription_Normal_MultipleByTxt[$Coun0]['stcoctUiLabelid']=0;
					$Coun0++;
				}
			}
		}
		//-- #Data --
		/*
		$tmpIDAR=explode($this->sysSPLIT2,$tmpIDS);
		$tmpContent='';
		$tmpSQL=' SELECT * ';
		$Coun0=0;
		$tmpMainColumnHead=$this->sTable[0]['sttColumnHead'];
		foreach ($this->sTable as $Row_Table){
			if ($Coun0==0) {
				$tmpSQL.=' FROM '.$Row_Table['sttTableName'].' AS A ';
			}else {
				$tmpSQL.=' INNER JOIN '.$Row_Table['sttTableName'].' AS '.$this->sysTableMark[$Coun0].' ON '.$this->sysTableMark[$Coun0].'.'.$Row_Table['sttColumnHead'].'IndexID=A.'.$tmpMainColumnHead.'ID ';
			}
			
			$Coun0++;
		}
		$tmpSQL.=' WHERE 1=1 AND (1=2 {Nets.IDS}) ';
		$tmpSTR_0='';
		$Coun0=0;
		foreach ($tmpIDAR as $ID_Cell){
			$tmpSTR_0.=' OR A.'.$tmpMainColumnHead.'ID='.$this->sCode->Int32($ID_Cell,0).' ';
			$Coun0++;
		}
		$tmpSTR=str_replace('{Nets.IDS}',$tmpSTR_0,$tmpSQL);
		$tmpData0=$this->sDb->Search($tmpSTR);
		*/
		
		
		$tmpIDAR=explode($this->sysSPLIT2,$tmpIDS);
		$tmpContent='';
		$tmpData_Datas=array();
		$Coun0=0;
		foreach ($tmpIDAR as $ID_Cell){
			$tmpSQL=' SELECT * ';
			$Coun1=0;
			$tmpMainColumnHead=$this->sTable[0]['sttColumnHead'];
			foreach ($this->sTable as $Row_Table){
				if ($Coun1==0) {
					$tmpSQL.=' FROM '.$Row_Table['sttTableName'].' AS A ';
				}else {
					$tmpSQL.=' INNER JOIN '.$Row_Table['sttTableName'].' AS '.$this->sysTableMark[$Coun1].' ON '.$this->sysTableMark[$Coun1].'.'.$Row_Table['sttColumnHead'].'IndexID=A.'.$tmpMainColumnHead.'ID ';
				}
				$Coun1++;
			}
			$tmpSQL.=' WHERE 1=1 AND A.'.$tmpMainColumnHead.'ID='.$this->sCode->Int32($ID_Cell,0).' ';
			$tmpSTR=$tmpSQL;
			$tmpData0=$this->sDb->Search($tmpSTR);

			if (count($tmpData0)>0) {
				$tmpData_Datas[$Coun0]=$tmpData0[0];
				$Coun0++;
			}
		}
		if (count($tmpData_Datas)>0) {
			//#Text
			foreach ($tmpData_Datas as $Row0){
				foreach ($tmpTextAR as $Row1){
					foreach ($this->sTable as $Row_Table){
						if (isset($Row0[$Row_Table['sttColumnHead'].$Row1])) {
							$tmpContent.=$Row0[$Row_Table['sttColumnHead'].$Row1];
						}
					}
					$tmpContent.=$this->sysSPLIT1;
				}
				$tmpContent.=$this->sysSPLIT4;
			}
			//#Columns
			if ($Coun0==0) {
				$Coun1=2;
				while (count($this->sUiDescription_Normal_MultipleByTxt)>$Coun1){
					if (isset($tmpData0[0][$this->sUiDescription_Normal_MultipleByTxt[$Coun1]['stcotName']])) {
						$this->sUiDescription_Normal_MultipleByTxt[$Coun1]['Value']=$tmpData0[0][$this->sUiDescription_Normal_MultipleByTxt[$Coun1]['stcotName']];
					}
					$Coun1++;
				}
			}
		}
		$this->sUiDescription_Normal_MultipleByTxt[1]['Value']=$tmpContent;
		
		return 0;
	}
	public function OnNormal_MultipleByRow(){
		$tmpCode=new netsCode();
		
		$tmpAR0=$this->AnalyerRequest('Normal_MultipleByRow','',0);
		$tmpIDS=$tmpAR0[0];
		$tmpAR0=$this->AnalyerRequest('Normal_MultipleByRow_Columns','Name;|||Parid;,,-A-',0);
		$tmpColumns=$tmpAR0[0];
		$tmpRowSplit=$tmpAR0[1];
		$tmpColumnSplit=str_replace($this->sysSPLIT15,$this->sysSPLIT1,$tmpAR0[2]);
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有修改权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Normal_MultipleByTxt ------ --
		//-- #Columns --
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']='MultipleByRow_ColumnsConfig';
		$tmpAR0['stcoctUiName']='数据项';
		$tmpAR0['stcoctUiType']='CheckboxAR_DataColumns';
		$tmpAR0['stcoctUiRecognise']='Normal_MultipleByRow';
		$tmpAR0['Value']=$tmpColumns;
		foreach ($this->sUiDescription_Normal as $Row0){
			if ($Row0['stcotType']==1) {
				$tmpSTR=$Row0['stcotName'];
				$Coun1=0;
				while (count($this->sTable)>$Coun1){
					$tmpSTR=str_replace($this->sTable[$Coun1]['sttColumnHead'],'',$tmpSTR);
					
					$Coun1++;
				}
				$tmpAR0['Option'][]=array('Text'=>$Row0['stcoctUiName'],'Value'=>$tmpSTR);
			}
		}
		$this->sUiDescription_Normal_MultipleByRow_Columns[]=$tmpAR0;
		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']='MultipleByRow_IDS';
		$tmpAR0['stcoctUiName']='数据编号';
		$tmpAR0['stcoctUiType']='Text';
		$tmpAR0['stcoctUiRecognise']='Normal_MultipleByRow';
		$tmpAR0['Value']=$tmpIDS;
		$this->sUiDescription_Normal_MultipleByRow_Columns[]=$tmpAR0;
		//-- ------ #Normal_MultipleByRow ------ --
		//-- #Columns --
		$tmpAR0=explode($this->sysSPLIT5,$tmpColumns);
		$tmpTextAR=explode($this->sysSPLIT2,$tmpAR0[0]);
		array_pop($tmpTextAR);
		$tmpColumnAR=explode($this->sysSPLIT2,$tmpAR0[1]);
		array_pop($tmpColumnAR);
		$tmpColumnAR=array_merge($tmpTextAR,$tmpColumnAR);

		$tmpAR0=$this->sysUiDescriptionModel;
		$tmpAR0['stcotName']=$this->sMetaTitle.'数据操作';
		$tmpAR0['stcoctUiName']=$this->sMetaTitle.'数据操作';
		$tmpAR0['stcotType']='4';
		$tmpAR0['stcoctUiType']='Text';
		$tmpAR0['stcoctUiRecognise']='Text';
		$this->sUiDescription_Normal_MultipleByTxt[]=$tmpAR0;
		
		$tmpTableColumns=array();
		foreach ($this->sTable as $Row_Table){
			$tmpTableColumns[]=$Row_Table['sttColumnHead'];
		}
		$Coun0=1;
		foreach ($tmpColumnAR as $Row0){
			foreach ($this->sUiDescription_Normal as $Row1){
				if (in_array(str_replace($Row0,'',$Row1['stcotName']),$tmpTableColumns)) {
					$this->sUiDescription_Normal_MultipleByRow[$Coun0]=$Row1;
					$this->sUiDescription_Normal_MultipleByRow[$Coun0]['stcoctUiLabelid']=0;
					$Coun0++;
				}
			}
		}
		
		//-- #Data --
		$tmpIDAR=explode($this->sysSPLIT2,$tmpIDS);
		$tmpContent='';
		$tmpData_Datas=array();
		$Coun0=0;
		foreach ($tmpIDAR as $ID_Cell){
			$tmpSQL=' SELECT * ';
			$Coun1=0;
			$tmpMainColumnHead=$this->sTable[0]['sttColumnHead'];
			foreach ($this->sTable as $Row_Table){
				if ($Coun1==0) {
					$tmpSQL.=' FROM '.$Row_Table['sttTableName'].' AS A ';
				}else {
					$tmpSQL.=' INNER JOIN '.$Row_Table['sttTableName'].' AS '.$this->sysTableMark[$Coun1].' ON '.$this->sysTableMark[$Coun1].'.'.$Row_Table['sttColumnHead'].'IndexID=A.'.$tmpMainColumnHead.'ID ';
				}
				$Coun1++;
			}
			$tmpSQL.=' WHERE 1=1 AND A.'.$tmpMainColumnHead.'ID='.$this->sCode->Int32($ID_Cell,0).' ';
			$tmpSTR=$tmpSQL;
			$tmpData0=$this->sDb->Search($tmpSTR);

			if (count($tmpData0)>0) {
				$tmpData_Datas[$Coun0]=$tmpData0[0];
				$Coun0++;
			}
		}
		$this->sData_List=$tmpData_Datas;
		
		return 0;
	}
	public function OnChildlist_List(){
		//-- ------ #Search data ------ --
		$tmpAR0=$this->AnalyerRequest('Childlist_List',$this->sChildlist_Parid.',0',0);
		$this->sChildlist_Parid=$tmpAR0[0];
		$tmpSTR0='DList0';
		$tmpAR0=$this->getQueryString($tmpSTR0);
		$tmpSTR1='DSort0';
		$tmpAR1=$this->AnalyerRequest($tmpSTR1,$this->sTable[0]['sttColumnHead'].'ID,2',0);
		$tmpSTR2='Search0';
		$this->sSearchData=$this->AnalyerRequest($tmpSTR2,'',0);
		//#Spell sql
		$tmpSQL=' SELECT A.{Nets.ColumnHead}ID,A.{Nets.ColumnHead}Name,A.{Nets.ColumnHead}Parid
			FROM {Nets.TableName} AS A 
			WHERE 1=1 
			AND A.{Nets.ColumnHead}{Nets.ParColumnName}={Nets.Parid}
			AND A.{Nets.ColumnHead}ID>'.$this->sLimitCount;
		if ($this->sSearchData[0]!='') {
			$tmpSQL.=' AND A.{Nets.ColumnHead}Name LIKE \'%'.$this->sSearchData[0].'%\' ';
		}
		
		if($tmpAR1[1]==1){
			$tmpSQL.=' ORDER BY '.$tmpAR1[0].' ';
		}else if($tmpAR1[1]==2){
			$tmpSQL.=' ORDER BY '.$tmpAR1[0].' DESC ';
		}
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ColumnHead}',$this->sTable[0]['sttColumnHead'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.TableName}',$this->sTable[0]['sttTableName'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.ParColumnName}',$this->sChildlist_ParColumnName,$tmpSTR);
		$tmpSTR=str_replace('{Nets.Parid}',$this->sChildlist_Parid,$tmpSTR);
		
		$this->sListData=$this->sDb->SearchP($tmpSTR,$tmpAR0);
		//#Set page button
		$this->sPButton->sPage=$this->sysPage;
		$this->sPButton->sExtendParameter='&ActionType=Childlist_List&Childlist_List='.$this->sChildlist_Parid.',0&'.$tmpSTR2.'='.$this->sSearchData[0];
		$this->sPButton->setPage($this->sDb->sysPageInfo);
		$this->sPButton->setSort($tmpAR1);
		$this->sSortButton[0]=array('stcotName'=>$this->sTable[0]['sttColumnHead'].'ID','stcoctUiName'=>'编号');
		$this->sSortButton[1]=array('stcotName'=>$this->sTable[0]['sttColumnHead'].'Name','stcoctUiName'=>$this->sysMetaTitle.'名称');
		
		return 0;
	}
	public function OnChildlist_Normal(){
		$tmpAR0=$this->AnalyerRequest('Childlist_Normal','0,0',0);
		$this->sChildlist_Parid=$tmpAR0[0];
		$this->sChildlist_Rootid=$tmpAR0[1];
		
		$Coun0=0;
		while (count($this->sUiDescription_ChildlistNormal)>$Coun0){
			if ($this->sUiDescription_ChildlistNormal[$Coun0]['stcotName']==$this->sTable[0]['sttColumnHead'].$this->sChildlist_ParColumnName) {
				$this->sUiDescription_ChildlistNormal[$Coun0]['Value']=$this->sChildlist_Parid;
			}
			
			$Coun0++;
		}
		
		return 0;
	}
	public function OnChildlist_ChildList(){
		//-- ------ #Search data ------ --
		$tmpAR0=$this->AnalyerRequest('Childlist_Childlist','0,0',0);
		$this->sChildlist_Parid=$tmpAR0[0];
		$this->sChildlist_Rootid=$tmpAR0[1];
		$tmpSTR0='DChildList_'.$this->sChildlist_Parid;
		$tmpAR0=$this->AnalyerRequest($tmpSTR0,'1,0,'.$this->sListCount.',0',0);
		$tmpSTR1='DSort0';
		$tmpAR1=$this->AnalyerRequest($tmpSTR1,$this->sTable[0]['sttColumnHead'].'ID,2',0);
		$tmpSTR2='Search0';
		$this->sSearchData=$this->AnalyerRequest($tmpSTR2,'',0);
		//#Spell sql
		$tmpSQL=' SELECT A.{Nets.ColumnHead}ID,A.{Nets.ColumnHead}Name,A.{Nets.ColumnHead}Parid
			FROM {Nets.TableName} AS A 
			WHERE 1=1 
			AND A.{Nets.ColumnHead}{Nets.ParColumnName}={Nets.Parid}
			AND A.{Nets.ColumnHead}ID>'.$this->sLimitCount;
		if ($this->sSearchData[0]!='') {
			$tmpSQL.=' AND A.{Nets.ColumnHead}Name LIKE \'%'.$this->sSearchData[0].'%\' ';
		}
		
		if($tmpAR1[1]==1){
			$tmpSQL.=' ORDER BY '.$tmpAR1[0].' ';
		}else if($tmpAR1[1]==2){
			$tmpSQL.=' ORDER BY '.$tmpAR1[0].' DESC ';
		}
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ColumnHead}',$this->sTable[0]['sttColumnHead'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.TableName}',$this->sTable[0]['sttTableName'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.ParColumnName}',$this->sChildlist_ParColumnName,$tmpSTR);
		$tmpSTR=str_replace('{Nets.Parid}',$this->sChildlist_Parid,$tmpSTR);
		
		$this->sListData=$this->sDb->SearchP($tmpSTR,$tmpAR0);
		//#Set page button
		$this->sChildList_PButton=new netsPAjaxButton();
		$this->sChildList_PButton->sPageName='DChildList_'.$this->sChildlist_Parid;
		$this->sChildList_PButton->sFlag='Childlist_Childlist';
		$this->sChildList_PButton->sPanel='childlistBox_'.$this->sChildlist_Parid;
		$this->sChildList_PButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton3.htm');
		$this->sChildList_PButton->sPage=$this->sysPage;
		$this->sChildList_PButton->sExtendParameter='&ActionType=Childlist_Childlist&Childlist_Childlist='.$this->sChildlist_Parid.',0&'.$tmpSTR2.'='.$this->sSearchData[0];
		$this->sChildList_PButton->setPage($this->sDb->sysPageInfo);
		
		return 0;
	}
	public function OnChildlist_Save(){
		$tmpAR0=$this->AnalyerRequest('Childlist_SAVE','0,0',0);
		$this->sChildlist_Parid=$tmpAR0[0];
		$this->sChildlist_Rootid=$tmpAR0[1];
		$tmpAR0=$this->AnalyerRequest('Childlist_SAVE_Controls','',0);
		$tmpChildlist_Controls=$this->sCode->URL_DecodeParameter($tmpAR0[0],1);
		
		$tmpDbDescriptions=array();
		foreach ($this->sTable as $tableCell){
			$tmpDbDescriptions[]=$this->sDbDescriptions[$tableCell['sttTableName']];
		}
		//-- ------ #Power ------ --
		if (in_array($this->sFunctionname.'_add',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$this->sJscript=$this->Message('ERROR','','对不起，您没有新增权限，请与客服人员联系','');
			return 1;
		}
		//-- ------ #Add ------ --
		$this->sApp->TransStart();
		//#Get numCode
		$tmpSTR=$this->sTable[0]['sttColumnHead'].'NumCode';
		$tmpDbDescriptions[0]['TableDescription']['SearchColumn']=$tmpSTR;
		$tmpDbDescriptions[0]['Columns'][$tmpSTR]['Value']='N_'.date('YmdHis');
		$this->sApp->numCode($tmpDbDescriptions[0]);
		//#Set value
		$tmpDbDescription0=$tmpDbDescriptions;
		$tmpAR0=explode($this->sysSPLIT1,$tmpChildlist_Controls);
		$Coun0=0;
		foreach ($tmpDbDescription0 as $tableCell){
			foreach ($tableCell['Columns'] as $Column){
				$tmpAR0=$this->AnalyerRequest($Column['stcotName'],$Column['stcoctDefaultValue'],0);
				$tmpDbDescriptions[$Coun0]['Columns'][$Column['stcotName']]['Value']=$tmpAR0[0];
			}
			$Coun0++;
		}
		//-- #Set conventional --
		if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value'])){
			$tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateBy']['Value']=$this->sUserInfo[0]['Columns']['uitID']['Value'];
		}
		if(isset($tmpDbDescriptions[0]['Columns'][$this->sTable[0]['sttColumnHead'].'CreateTime'])){
			$tmpDbDescriptions[0]['Columns'][$this->sTable[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'][$this->sTable[1]['sttColumnHead'].$Row0[0]])){
					if ($tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']==$Row0[1]) {
						$tmpFlag=1;
					}
				}
			}
			if ($this->sUserInfo[0]['Columns']['uitID']['Value']==0 && $tmpFlag==1) {
				$tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']=$Row0[4];
			}else if ($tmpFlag==1 && isset($tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]])) {
				$tmpDbDescriptions[1]['Columns'][$this->sTable[1]['sttColumnHead'].$Row0[0]]['Value']=$this->sUserInfo[$Row0[2]]['Columns'][$Row0[3]]['Value'];
			}
		}
		//Spical value array
		foreach ($this->sSpicalValue as $Cell){
			if(isset($tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value'])){
				$tmpDbDescriptions[$Cell[0]]['Columns'][$Cell[1]]['Value']=$Cell[2];
			}
		}
		//-- #Set spical --
		
		//#Add
		$tmpINT=$this->sApp->Check($tmpDbDescriptions,array(),array());
		if($tmpINT!=0){
			$this->sApp->TransRollback();
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			
			$this->sMessage=$this->sApp->sysLastError;
			$this->OnChildlist_SaveList();
			return 1;
		}
		$Coun0=0;
		while (count($tmpDbDescriptions)>$Coun0){
			if($Coun0==0){
				$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'NumCode,'.$this->sTable[$Coun0]['sttColumnHead'].'ID';
			}else {
				$tmpDbDescriptions[$Coun0]['TableDescription']['SearchColumn']=$this->sTable[$Coun0]['sttColumnHead'].'IndexID';
			}
			$Coun0++;
		}
		$tmpINT=$this->sApp->add($tmpDbDescriptions);
		if($tmpINT!=0){
			$this->sApp->TransRollback();
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			
			$this->sMessage=$this->sApp->sysLastError;
			$this->OnChildlist_SaveList();
			return 1;
		}
		
		foreach ($this->sDb->sysDbCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		foreach ($this->sysPageCacheClear as $Cell){
			$this->clearCache($Cell);
		}
		$this->sApp->TransCommit();
		
		return 0;
	}
	public function OnChildlist_SaveList(){
		
		//-- ------ #Search data ------ --
		$tmpSTR0='DChildList_'.$this->sChildlist_Parid;
		$tmpAR0=$this->AnalyerRequest($tmpSTR0,'1,0,'.$this->sListCount.',0',0);
		$tmpSTR1='DSort0';
		$tmpAR1=$this->AnalyerRequest($tmpSTR1,$this->sTable[0]['sttColumnHead'].'ID,2',0);
		$tmpSTR2='Search0';
		$this->sSearchData=$this->AnalyerRequest($tmpSTR2,'',0);
		//#Spell sql
		$tmpSQL=' SELECT A.{Nets.ColumnHead}ID,A.{Nets.ColumnHead}Name,A.{Nets.ColumnHead}Parid
			FROM {Nets.TableName} AS A 
			WHERE 1=1 
			AND A.{Nets.ColumnHead}{Nets.ParColumnName}={Nets.Parid}
			AND A.{Nets.ColumnHead}ID>'.$this->sLimitCount;

		if($tmpAR1[1]==1){
			$tmpSQL.=' ORDER BY '.$tmpAR1[0].' ';
		}else if($tmpAR1[1]==2){
			$tmpSQL.=' ORDER BY '.$tmpAR1[0].' DESC ';
		}
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$tmpSTR=str_replace('{Nets.ColumnHead}',$this->sTable[0]['sttColumnHead'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.TableName}',$this->sTable[0]['sttTableName'],$tmpSTR);
		$tmpSTR=str_replace('{Nets.ParColumnName}',$this->sChildlist_ParColumnName,$tmpSTR);
		$tmpSTR=str_replace('{Nets.Parid}',$this->sChildlist_Parid,$tmpSTR);
		
		$this->sListData=$this->sDb->SearchP($tmpSTR,$tmpAR0);
		//#Set page button
		$this->sChildList_PButton=new netsPAjaxButton();
		$this->sChildList_PButton->sPageName='DChildList_'.$this->sChildlist_Parid;
		$this->sChildList_PButton->sFlag='Childlist_Childlist';
		$this->sChildList_PButton->sPanel='childlistBox_'.$this->sChildlist_Parid;
		$this->sChildList_PButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton3.htm');
		$this->sChildList_PButton->sPage=$this->sysPage;
		$this->sChildList_PButton->sExtendParameter='&ActionType=Childlist_Childlist&Childlist_Childlist='.$this->sChildlist_Parid.',0&'.$tmpSTR2.'='.$this->sSearchData[0];
		$this->sChildList_PButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}
	
	public function OnComplete(){
		$tmpUserApp=new netsuserinfo($this->sConnString);
		//-- ------ #Save userinfo to cookie ------ --
		if (isset($this->sUserInfo)) {
			$tmpUserApp->SaveUserinfoToCookie($this->sUserInfo);
		}
		
		return 0;
	}

	public function DefUiPanel(&$pColumn,$pFlag){
		$tmpTable=$this->sTable;
		if (count($tmpTable)==1) {
			$tmpTable[1]['sttColumnHead']=$tmpTable[0]['sttColumnHead'];
		}
		
		if($pColumn['stcotName']==$tmpTable[0]['sttColumnHead'].'Checked' && $pFlag=='Search'){
			$pColumn['Option']=$this->sChecked2;
		}else if($pColumn['stcotName']==$tmpTable[0]['sttColumnHead'].'Checked' && ($pFlag=='Normal' || $pFlag=='Normal_Frame' || $pFlag=='List')){
			$pColumn['Option']=$this->sChecked1;
		}else if($pColumn['stcotName']==$tmpTable[0]['sttColumnHead'].'Tableid'){
			$pColumn['Option']=$this->sTableAR;
			$pColumn['Parameter']=$this->sysPage.'?ActionType=Normal&Normal='.$this->sMainID.',';
		}else if($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'Power' && ($pFlag=='Normal' || $pFlag=='Normal_Frame' || $pFlag=='List')){
			$pColumn['Option']=$this->sUsergroup1;
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'RequireType') && $pFlag=='Search'){
			$pColumn['Option']=$this->sRequireType2;
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'RequireType') && ($pFlag=='Normal' || $pFlag=='Normal_Frame' || $pFlag=='List')){
			$pColumn['Option']=$this->sRequireType1;
			
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'Channelid') && $pFlag=='Search'){
			$pColumn['Option']=$this->sChannel2;
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'Channelid') && ($pFlag=='Normal' || $pFlag=='Normal_Frame' || $pFlag=='List')){
			$pColumn['Option']=$this->sChannel1;
			
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'Power_View' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'Power_Public'
			) && $pFlag=='Search'){
			$pColumn['Option']=$this->sUsergrade2;
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'Power_View' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'Power_Public'
			) && ($pFlag=='Normal' || $pFlag=='Normal_Frame' || $pFlag=='List')){
			$pColumn['Option']=$this->sUsergrade2;
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'ReplyAble' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'KeywordAble' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'PageAble' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'PublicAble'
			) && $pFlag=='Search'){
			$pColumn['Option']=$this->sEnable2;
		}else if(($pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'ReplyAble' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'KeywordAble' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'PageAble' ||
			$pColumn['stcotName']==$tmpTable[0]['sttColumnHead'].'UserPublic' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'DiscussAble' ||
			$pColumn['stcotName']==$tmpTable[1]['sttColumnHead'].'PublicAble'
			) && ($pFlag=='Normal' || $pFlag=='Normal_Frame' || $pFlag=='List')){
			$pColumn['Option']=$this->sEnable1;
		}
		if ($pFlag=='Normal_Frame' && ($pColumn['stcoctUiType']=='Text' ||
			$pColumn['stcoctUiType']=='TextArea')) {
			$pColumn['ControlStyle']='width:480px;';
		}
		return $pColumn;
	}
	public function DefUiSearch($pColumn,&$pAR,$pFlag){
		return $pColumn;
	}
	public function DefUiSearchLine($pCount){
		if($pCount==3){
?></tr><tr><?php
		}
	}
	public function DefUiTab($pFlag){}
	public function DefUiTab_Child($pFlag){}
	public function DefUiButton($pFlag,$Exception){
		if($pFlag=='List' && !in_array($pFlag,$Exception)){ ?>
<?php if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onDelete_Multiple(); tmpCommon.setActionType('','DDelete_Multiple','','<?php echo($this->sPButton->sExtendParameter); ?>'); tmpCommon.netsSubmit();">批量删除</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onNormal_MultipleByTxt('','','');">批量修改所选（文本）</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onNormal_MultipleByRow('','','');">批量修改所选</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onModify_Page();tmpCommon.setActionType('','DModify_Page','','<?php echo($this->sPButton->sExtendParameter); ?>'); tmpCommon.netsSubmit();">保存本页修改</a></li><?php } ?>
<!--<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onNormal_Multiple(''); tmpCommon.netsSubmit();">批量修改所选</a></li>-->

<?php }else if($pFlag=='List_Head' && !in_array($pFlag,$Exception)){ ?>
<?php if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_3.jpg" /></div>
<div class="Tab_Option_ButtonCell"><a href="#Here" class="Link1 FBlue2" onclick="tmpControl.onDelete_Multiple();tmpCommon.setActionType('','DDelete_Multiple','','<?php echo($this->sPButton->sExtendParameter); ?>'); tmpCommon.netsSubmit();">批量删除</a></div></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_2.jpg" /></div>
	<div class="Tab_Option_ButtonCell"><a href="#Here" class="Link1 FBlue2" onclick="tmpControl.onNormal_MultipleByTxt('','','');">批量.文本</a></div></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_2.jpg" /></div>
	<div class="Tab_Option_ButtonCell"><a href="#Here" class="Link1 FBlue2" onclick="tmpControl.onNormal_MultipleByRow('','','');">批量</a></div></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_1.jpg" /></div>
	<div class="Tab_Option_ButtonCell"><a href="#Here" class="Link1 FBlue2" onclick="tmpControl.onModify_Page();tmpCommon.setActionType('','DModify_Page','','<?php echo($this->sPButton->sExtendParameter); ?>'); tmpCommon.netsSubmit();">保存本页</a></div></li><?php } ?>
<!--<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onNormal_Multiple(''); tmpCommon.netsSubmit();">批量修改所选</a></li>-->

<?php }else if ($pFlag=='Normal' && !in_array($pFlag,$Exception)) { ?>
<?php if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.confirmDo('删除后将不能恢复，您确定删除本信息吗?');tmpCommon.setActionType('','DDelete','',''); tmpCommon.netsSubmit();">删除</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.setActionType('Normal','DModify','',''); tmpCommon.netsSubmit();">修改</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_add',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.setActionType('Normal','DAdd','',''); tmpCommon.netsSubmit();">添加</a></li><?php } ?>

<?php }else if ($pFlag=='Normal_Head' && !in_array($pFlag,$Exception)) { ?>
<?php if(strlen($this->sPresentationURL)>5){ ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_1.jpg" /></div>
	<div class="Tab_Option_ButtonCell"><a href="<?php echo($this->sPresentationURL.$this->sMainID); ?>" class="Link1 FBlue2" target="_blank">预览</a></div></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_6.jpg" /></div>
	<div class="Tab_Option_ButtonCell"><a href="#Here" class="Link1 FBlue2" onclick="tmpCommon.confirmDo('删除后将不能恢复，您确定删除本信息吗?');tmpCommon.setActionType('','DDelete','',''); tmpCommon.netsSubmit();">删除</a></div></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_5.jpg" /></div>
	<div class="Tab_Option_ButtonCell"><a href="#Here" class="Link1 FBlue2" onclick="tmpCommon.setActionType('Normal','DModify','',''); tmpCommon.netsSubmit();">修改</a></div></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_add',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="Tab_Option_Button">
	<div class="Tab_Option_ButtonCell"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_head_4.jpg" /></div>
	<div class="Tab_Option_ButtonCell"><a href="#Here" class="Link1 FBlue2" onclick="tmpCommon.setActionType('Normal','DAdd','',''); tmpCommon.netsSubmit();">添加</a></div></li><?php } ?>

<?php }else if ($pFlag=='Normal_MultipleByTxt' && !in_array($pFlag,$Exception)) { ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.setActionType('Normal_MultipleByTxt','DModify_MultipleByTxt','',''); tmpCommon.netsSubmit(); ">保存数据</a></li><?php } ?>

<?php }else if ($pFlag=='Normal_MultipleByRow' && !in_array($pFlag,$Exception)) { ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.setActionType('Normal_MultipleByRow','DModify_MultipleByRow','',''); tmpCommon.netsSubmit(); ">保存数据</a></li><?php } ?>


<?php }else if ($pFlag=='Normal_Frame' && !in_array($pFlag,$Exception)) { ?>
<!--
<div class="Control2" onclick="tmpCommon.setActionType('Normal_Frame','DAdd_Frame','','');"><a href="#Here">添加</a></div>
<input type="submit" value="修改" class="Control2" onclick="tmpCommon.setActionType('Normal_Frame','DModify_Frame','','');" />
<input type="submit" value="删除" class="Control2" onclick="tmpCommon.confirmDo('删除后将不能恢复，您确定删除本信息吗?');tmpCommon.setActionType('Normal_Frame','DDelete_Frame','','');" />
-->
<?php if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.confirmDo('删除后将不能恢复，您确定删除本信息吗?');tmpCommon.setActionType('Normal_Frame','DDelete_Frame','',''); tmpCommon.netsSubmit();">删除</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.setActionType('Normal_Frame','DModify_Frame','',''); tmpCommon.netsSubmit();">修改</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_add',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpCommon.setActionType('Normal_Frame','DAdd_Frame','',''); tmpCommon.netsSubmit();">添加</a></li><?php } ?>

<?php }else if($pFlag=='Childlist_List' && !in_array($pFlag,$Exception)){ ?>
<?php if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onDelete_Multiple();tmpCommon.setActionType('','DDelete_Multiple','','<?php echo($this->sPButton->sExtendParameter); ?>'); tmpCommon.netsSubmit();">批量删除</a></li><?php } ?>
<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {}else { ?>
<li class="ButBut Button_Normal"><a href="#Here" class="Link1 FBlack2" onclick="tmpControl.onNormal_MultipleByTxt('','','');">批量修改所选（文本）</a></li><?php } ?>

<?php }else if ($pFlag=='DetailLink_List' && !in_array($pFlag,$Exception)) { ?>

<?php }else if ($pFlag=='DetailLink_Normal' && !in_array($pFlag,$Exception)) { ?>

<?php }else if ($pFlag=='DetailBox_List' && !in_array($pFlag,$Exception)) { ?>

<?php }else if ($pFlag=='DetailBox_Normal' && !in_array($pFlag,$Exception)) { ?>




<?php }else if ($pFlag=='ListLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTab_0" class="TabSelected"><a href="<?php echo($this->sysPage); ?>" class="Link1 FBlue1" onclick="tmpControl.onTabSlide(0);">管理<?php echo ($this->sMetaTitle); ?></a></li>
<?php if ($this->sChildlist_ParColumnName!='') { ?><li id="ListTab_1" class="TabNormal"><a href="<?php echo($this->sysPage); ?>?ActionType=Childlist_List" class="Link1 FBlue1" onclick="tmpControl.onTabSlide(1);">子级管理<?php echo ($this->sMetaTitle); ?></a></li><?php }?>
<!--
<li class="TabNormal"><a href="#Here" class="Link1 FBlue1"><?php echo ($this->sMetaTitle); ?>管理</a></li>
-->
<?php }else if ($pFlag=='ListChildLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTabChild_0" class="TabChildNormal"><a href="<?php echo ($this->sysPage); ?>?ActionType=Normal" class="Link1 SBlue1">添加<?php echo ($this->sMetaTitle); ?></a></li>
<!--
<li class="TabChildSelected"><a href="#Here" class="Link2 FBlue1"><?php echo ($this->sMetaTitle); ?>管理</a></li>
<li class="DLeft"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/m_nets/Img/Mana/34.jpg" /></li>
<li class="TabChildNormal"><a href="#Here" class="Link1 FBlue1"><?php echo ($this->sMetaTitle); ?>管理</a></li>
-->

<?php }else if ($pFlag=='ReportLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTab_0" class="TabSelected"><a href="<?php echo($this->sysPage); ?>" class="Link1 FBlue1" onclick="tmpControl.onTabSlide(0);">管理<?php echo ($this->sMetaTitle); ?></a></li>
<?php if ($this->sChildlist_ParColumnName!='') { ?><li id="ListTab_1" class="TabNormal"><a href="<?php echo($this->sysPage); ?>?ActionType=Childlist_List" class="Link1 FBlue1" onclick="tmpControl.onTabSlide(1);">子级管理<?php echo ($this->sMetaTitle); ?></a></li><?php }?>
<!--
<li class="TabNormal"><a href="#Here" class="Link1 FBlue1"><?php echo ($this->sMetaTitle); ?>管理</a></li>
-->
<?php }else if ($pFlag=='ReportChildLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTabChild_0" class="TabChildNormal"><a href="<?php echo ($this->sysPage); ?>?ActionType=Normal&Normal=<?php echo($this->sMainID); ?>,0" class="Link1 FGreen1">返回编辑页面</a></li>
<li id="ListTabChild_0" class="TabChildNormal"><a href="<?php echo ($this->sysPage); ?>" class="Link1 FGreen1">更多<?php echo ($this->sMetaTitle); ?></a></li>
<!--
<li class="TabChildSelected"><a href="#Here" class="Link2 FBlue1"><?php echo ($this->sMetaTitle); ?>管理</a></li>
<li class="DLeft"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/m_nets/Img/Mana/34.jpg" /></li>
<li class="TabChildNormal"><a href="#Here" class="Link1 FBlue1"><?php echo ($this->sMetaTitle); ?>管理</a></li>
-->

<?php }else if ($pFlag=='NormalLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTab_0" class="TabSelected"><a href="#Here" class="Link2 FWhite1" onclick="tmpCommon.onTabSlide(0);"><?php echo ($this->sMetaTitle); ?>管理</a></li>

<?php }else if ($pFlag=='NormalChildLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTabChild_0" class="TabChildNormal"><a href="<?php echo ($this->sysPage); ?>" class="Link1 FGreen1">更多<?php echo ($this->sMetaTitle); ?></a></li>

<?php }else if ($pFlag=='ChartLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTab_0" class="TabNormal"><a href="<?php echo($this->sysPage); ?>" class="Link1 FBlue1" onclick="tmpControl.onTabSlide(0);">管理<?php echo ($this->sMetaTitle); ?></a></li>
<li id="ListTab_1" class="TabSelected"><a href="<?php echo($this->sysPage); ?>?ActionType=Chart" class="Link1 FBlue1" onclick="tmpControl.onTabSlide(1);">查看<?php echo ($this->sMetaTitle); ?>图表</a></li>

<?php }else if ($pFlag=='ChartChildLink' && !in_array($pFlag,$Exception)) { ?>
<li id="ListTabChild_0" class="TabChildNormal"><a href="<?php echo ($this->sysPage); ?>?ActionType=Normal" class="Link1 SBlue1">添加<?php echo ($this->sMetaTitle); ?></a></li>
<li id="ListTabChild_1" class="TabChildNormal"><a href="<?php echo ($this->sysPage); ?>" class="Link1 FGreen1">更多<?php echo ($this->sMetaTitle); ?></a></li>

<?php }else if ($pFlag=='Normal_FrameLink' && !in_array($pFlag,$Exception)) { ?>
<a href="#Here" class="Link2 FGreen1" onclick="tmpCommon.onTabSlide(0);"><?php echo ($this->sMetaTitle); ?>管理</a>

<?php }
	}
	public function DefUiListLine($pFlag,$Exception){
		if($pFlag=='List' && !in_array($pFlag,$Exception)){
			//-- ------ #List ------ --
			$tmpSTR='';
			$Coun0=0;
			foreach ($this->sListData as $Row0){
				$tmpLineStyle='ListCell';
				$tmpINT=$Coun0+1;
				if($tmpINT%2==0){
					$tmpLineStyle='ListCell0';
				}
?>
<tr id="<?php echo ($this->sTable[0]['sttColumnHead']); ?>Row<?php echo($Coun0); ?>" class="<?php echo ($tmpLineStyle); ?>" onmouseover="tmpControl.onRowMouseover('<?php echo ($this->sTable[0]['sttColumnHead']); ?>',<?php echo($Coun0); ?>);" onmouseout="tmpControl.onRowMouseout('<?php echo ($this->sTable[0]['sttColumnHead']); ?>',<?php echo($Coun0); ?>,'<?php echo ($tmpLineStyle); ?>');">
<td class="ListCellID">
	<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>
	<input id="<?php echo ($this->sTable[0]['sttColumnHead']); ?>IDTxtList<?php echo ($Coun0); ?>" name="<?php echo ($this->sTable[0]['sttColumnHead']); ?>IDTxtList<?php echo ($Coun0); ?>" type="hidden" value="<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>" />
	<input id="<?php echo ($this->sTable[0]['sttColumnHead']); ?>RowStyle<?php echo ($Coun0); ?>" name="<?php echo ($this->sTable[0]['sttColumnHead']); ?>RowStyle<?php echo ($Coun0); ?>" type="hidden" value="<?php echo ($tmpLineStyle); ?>" /></td>
<td class="ListCellTitle"><table class="" cellpadding="0" cellspacing="0"><tr>
	<?php if(strlen($this->sPresentationURL)>5){ ?><td><a href="<?php echo($this->sPresentationURL.$Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>" target="_blank"><img src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_1.jpg" title="查看前台页面" /></a></td><td>&nbsp;</td><?php } ?>
	<td><a href="<?php echo ($this->sysPage); ?>?ActionType=Normal&Normal=<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>,<?php if(isset($this->sTable[1])){ if(isset($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_List'])){ echo($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_List']); }else if(isset($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail'])){ echo($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail']); } } ?>" class="Link1 FBlue1 <?php if(isset($Row0[$this->sTable[0]['sttColumnHead'].'NameStyle'])){echo($Row0[$this->sTable[0]['sttColumnHead'].'NameStyle']); }?>"><?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'Name']); ?></a></td>
	</tr></table></td>
<?php
				$tmpFlag='List';
				$tmpDataCollection1=$this->sUiDescription_List;
				$Coun1=0;
				foreach ($tmpDataCollection1 as $Row1){
					$tmpAR0=array();
					$tmpSTR.=$Row1['stcotName'].$this->sysSPLIT2;
					$Row1['Value']=$Row0[$Row1['stcotName']];
					$Row1['NameExtend']=$tmpFlag.$Coun0;
					$this->DefUiPanel($Row1,$tmpFlag);
					if($this->DefUiCustom($Row1,$tmpFlag)==0){
						$this->sControls->getList($Row1);
					}
					$Coun1++;
				}
?>
<td class="ListCellCheck"><input id="checkedBox<?php echo ($Coun0); ?>" name="checkedBox[]" type="checkbox" class="SControl1 ControlCheckbox" value="<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>" onclick="tmpControl.onRowChecked('<?php echo ($this->sTable[0]['sttColumnHead']); ?>',<?php echo($Coun0); ?>);" /></td>
<td class="ListCellOption">
<table class="" cellpadding="0" cellspacing="2"><tr>
<td><a href="<?php echo ($this->sysPage); ?>?ActionType=Normal&Normal=<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>,<?php if(isset($this->sTable[1])){ if(isset($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail'])){ echo($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail']); } } ?>"><img alt="查看详细内容" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_17.jpg" /></a></td>

<?php if (in_array($this->sFunctionname.'_modify',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) { ?>
<td><a href="#Here"><img alt="保存本行更改" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_18_Gray.jpg" /></a></td>
<?php }else { ?>
<td><input type="image" title="保存本行更改" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_18.jpg" onclick="tmpControl.onModify_PageLine('<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>','<?php echo ($Coun0); ?>');tmpCommon.setActionType('','DModify_PageLine','','<?php echo($this->sPButton->sExtendParameter); ?>');" /></td>
<?php } if (in_array($this->sFunctionname.'_delete',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) { ?>
<td><a href="#Here"><img alt="删除此信息" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_19_Gray.jpg" /></a></td>
<?php }else { ?>
<td><input type="image" title="删除此信息" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_19.jpg" onclick="tmpControl.onDelete('<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>');tmpCommon.setActionType('','DDelete','','<?php echo($this->sPButton->sExtendParameter); ?>');" /></td>
<?php } ?>
</tr></table>
</td>
</tr>
<?php $Coun0++; } ?>
<input id="ListBox" name="ListBox" type="hidden" value="<?php echo ($tmpSTR); ?>" />
<?php
		}else if ($pFlag=='Childlist_List' && !in_array($pFlag,$Exception)) {
			//-- ------ #Childlist_List ------ --
			$tmpSTR='';
			$Coun0=0;
			foreach ($this->sListData as $Row0){
				$tmpLineStyle='ListCell';
				$tmpINT=$Coun0+1;
				if($tmpINT%2==0){
					$tmpLineStyle='ListCell0';
				}
?>
<!--<tr id="<?php echo ($this->sTable[0]['sttColumnHead']); ?>Row<?php echo($Coun0); ?>" class="<?php echo ($tmpLineStyle); ?>" onmouseover="tmpControl.onRowMouseover('<?php echo ($this->sTable[0]['sttColumnHead']); ?>',<?php echo($Coun0); ?>);" onmouseout="tmpControl.onRowMouseout('<?php echo ($this->sTable[0]['sttColumnHead']); ?>',<?php echo($Coun0); ?>,'<?php echo ($tmpLineStyle); ?>');">-->
<tr id="<?php echo ($this->sTable[0]['sttColumnHead']); ?>Row<?php echo($Coun0); ?>" class="<?php echo ($tmpLineStyle); ?>">
<td class="ListCellID">
	<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>
	<input id="<?php echo ($this->sTable[0]['sttColumnHead']); ?>IDTxtList<?php echo ($Coun0); ?>" name="<?php echo ($this->sTable[0]['sttColumnHead']); ?>IDTxtList<?php echo ($Coun0); ?>" type="hidden" value="<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>" />
	<input id="<?php echo ($this->sTable[0]['sttColumnHead']); ?>RowStyle<?php echo ($Coun0); ?>" name="<?php echo ($this->sTable[0]['sttColumnHead']); ?>RowStyle<?php echo ($Coun0); ?>" type="hidden" value="<?php echo ($tmpLineStyle); ?>" /></td>
<td class="ListCellTitle" colspan="<?php echo(count($this->sUiDescription_ChildlistList)); ?>"><ul class="ChildListText_Box">
<li class="ChildListText_Title"><a href="<?php echo ($this->sysPage); ?>?ActionType=Normal&Normal=<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>,<?php if(isset($this->sTable[1])){ if(isset($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_List'])){ echo($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_List']); }else if(isset($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail'])){ echo($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail']); } } ?>" class="Link1 FBlue1 <?php if(isset($Row0[$this->sTable[0]['sttColumnHead'].'NameStyle'])){echo($Row0[$this->sTable[0]['sttColumnHead'].'NameStyle']); }?>"><?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'Name']); ?></a></li>
<li class="ChildListText_Button"><a href="#Here" onclick="tmpControl.Childlist_Load(tmpCommon.sysPage,<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>,<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>);" class="Link1 FBlack4" title="查看子<?php echo($this->sMetaTitle); ?>"><img src="<?php echo ($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_29.jpg" /></a></li>
<li class="ChildListText_Button"><a href="<?php echo ($this->sysPage.'?ActionType=Childlist_List&Childlist_List='.$Row0[$this->sTable[0]['sttColumnHead'].'ID'].',0'); ?>" class="Link1 FBlack4" title="作为根<?php echo($this->sMetaTitle); ?>查看"><img src="<?php echo ($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_30.jpg" /></a></li>
<li class="ChildListText_Button"><a href="#Here" onclick="tmpControl.Childlist_AddChild('<?php echo ($this->sysPage); ?>',<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>,<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>);" class="Link1 FBlack4" title="新增子<?php echo($this->sMetaTitle); ?>"><img src="<?php echo ($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_31.jpg" /></a></li>
<li class="DClear"></li></ul>
<div class="ChildListText_Content">
<?php
				$tmpFlag='List';
				$tmpDataCollection1=$this->sUiDescription_List;
				$Coun1=0;
				foreach ($tmpDataCollection1 as $Row1){
					$tmpAR0=array();
					$tmpSTR.=$Row1['stcotName'].$this->sysSPLIT2;
					$Row1['Value']=$Row0[$Row1['stcotName']];
					$Row1['NameExtend']=$tmpFlag.$Coun0;
					$this->DefUiPanel($Row1,$tmpFlag);
					if($this->DefUiCustom($Row1,$tmpFlag)==0){
						$this->sControls->getList($Row1);
					}
					$Coun1++;
				}
?>
		<span class="ChildListText_ContentTitle">所属类别：</span><span class="ChildListText_ContentSpan">系统公告</span>
		<span class="ChildListText_ContentTitle">发布时间：</span><span class="ChildListText_ContentSpan">2010-10-02 01:12:2</span></div>
	<div id="childlistNormalBox_<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>" class="DHidden">&nbsp</div>
	<div id="childlistBox_<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>" class="DHidden">&nbsp</div>
	</td>
<td class="ListCellCheck"><input id="checkedBox<?php echo ($Coun0); ?>" name="checkedBox[]" type="checkbox" class="SControl1" value="<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>" onclick="tmpControl.onRowChecked('<?php echo ($this->sTable[0]['sttColumnHead']); ?>',<?php echo($Coun0); ?>);" /></td>
<td class="ListCellOption">
<?php if($Row0[$this->sTable[0]['sttColumnHead'].'ID']>$this->sLimitCount){ ?>
<table class="" cellpadding="0" cellspacing="2"><tr>
<td><a href="<?php echo ($this->sysPage); ?>?ActionType=Normal&Normal=<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>,<?php if(isset($this->sTable[1])){ if(isset($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail'])){ echo($Row0[$this->sTable[1]['sttColumnHead'].'Modelid_Detail']); } } ?>"><img alt="查看详细内容" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_17.jpg" /></a></td>
<td><input type="image" title="保存本行更改" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_18.jpg" onclick="tmpControl.onModify_PageLine('<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>','<?php echo ($Coun0); ?>');tmpCommon.setActionType('','DModify_PageLine','','<?php echo($this->sPButton->sExtendParameter); ?>');" /></td>
<td><input type="image" title="删除此信息" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_19.jpg" onclick="tmpControl.onDelete('<?php echo ($Row0[$this->sTable[0]['sttColumnHead'].'ID']); ?>');tmpCommon.setActionType('','DDelete','','<?php echo($this->sPButton->sExtendParameter); ?>');" /></td>
</tr></table>
<?php }else { ?>
<table class="" cellpadding="0" cellspacing="0"><tr>
<td><a href="#Here"><img alt="查看详细内容" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_17_Gray.jpg" /></a></td>
<td><a href="#Here"><img alt="保存本行更改" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_18_Gray.jpg" /></a></td>
<td><a href="#Here"><img alt="删除此信息" src="<?php echo($this->sysFileConfig['sysUiCoreRoot']); ?>Ui/Common/Img/Common/icon_19_Gray.jpg" /></a></td>
</tr></table>
<?php } ?>
</td>
</tr>
<?php $Coun0++; } ?>
<input id="ListBox" name="ListBox" type="hidden" value="<?php echo ($tmpSTR); ?>" />
<?php
		}else if ($pFlag=='Childlist_Childlist' && !in_array($pFlag,$Exception)) {
?>


<?php
		}else if ($pFlag=='List_Platform' && !in_array($pFlag,$Exception)) {
			//-- ------ #List_Platform ------ --
			$Coun0=0;
			foreach ($this->sListData as $Row0){
				
				$Coun0++;
			}
		}
	}
	
	public function checkUser($pType){
		$tmpCode=new netsCode();
		$tmpDescription=array();
		$tmpDescription[0]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfo'];
		$tmpDescription[1]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfocont'];
		$tmpDescription[2]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunit'];
		$tmpDescription[3]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunitcont'];
		$tmpDescription[4]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertype'];
		$tmpDescription[5]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertypecont'];
		$tmpDescription[6]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartment'];
		$tmpDescription[7]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartmentcont'];
		$tmpDescription[8]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergroup'];
		$tmpDescription[9]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergrade'];
		$tmpUserApp=new netsuserinfo($this->sConnString);
		$tmpSTR='uttType';
		$tmpDescription[4]['Columns'][$tmpSTR]['Value']=$pType;
		//-- ------ #Check userinfo ------ --
		$tmpINT=$tmpUserApp->ReadUserinfo($tmpDescription);
		if($tmpINT!=0){
			$tmpINT=$this->writeCookie($this->sysNormalCookiePath,$this->sysCookieHead.$this->sysManaPLURLCookieName,$this->sysURL);
			header('Location: '.$this->sysFileConfig['sysCoreRoot'].$this->sysFileConfig['SystemLogoutAddress']);
			exit();
		}
		$this->sUserInfo=$tmpDescription;
		if ($this->sFunctionname!='') {
			$tmpUserApp->GetUserPowerArray($this->sUserInfo,$this->sFunctionname,'Mana',$this->sAR_UserPower);
		}
		if (in_array($this->sFunctionname.'_view',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			$tmpINT=$this->writeCookie($this->sysNormalCookiePath,$this->sysCookieHead.$this->sysManaPLURLCookieName,$this->sysURL);
			header('Location: '.$this->sysFileConfig['sysCoreRoot'].$this->sysFileConfig['ManaPageNopower']);
			exit();
		}
		$this->sMainUserid=$tmpCode->Int32($this->sUserInfo[0]['Columns']['uitID']['Value'],0);
		//-- ------ #Get config and path ------ --
		if(count($this->sUserInfo)>0){
			$this->resetConfig($this->sUserInfo[3]['Columns']['uuctSysConfig']['Value']);
			if($this->sUserInfo[0]['Columns']['uitUnitid']['Value']<12){
				$this->sSiteRoot=$this->sSiteRootCore;
				$this->sFileConfigPath=$this->sFileConfigPathCore;
				$this->sUiDescriptionPath=$this->sUiDescriptionPathCore;
				$this->sDbDescriptionPath=$this->sDbDescriptionPathCore;
				$this->sConnString=$this->sConnStringCore;
			}
		}else{
			$this->sSiteRoot=$this->sSiteRootCore;
			$this->sFileConfigPath=$this->sFileConfigPathCore;
			$this->sUiDescriptionPath=$this->sUiDescriptionPathCore;
			$this->sDbDescriptionPath=$this->sDbDescriptionPathCore;
			$this->sConnString=$this->sConnStringCore;
		}
		
		return 0;
	}
	public function checkUser_Xml($pType){
		$tmpCode=new netsCode();
		$tmpDescription=array();
		$tmpDescription[0]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfo'];
		$tmpDescription[1]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfocont'];
		$tmpDescription[2]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunit'];
		$tmpDescription[3]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunitcont'];
		$tmpDescription[4]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertype'];
		$tmpDescription[5]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertypecont'];
		$tmpDescription[6]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartment'];
		$tmpDescription[7]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartmentcont'];
		$tmpDescription[8]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergroup'];
		$tmpDescription[9]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergrade'];
		$tmpUserApp=new netsuserinfo($this->sConnString);
		$tmpSTR='uttType';
		$tmpDescription[4]['Columns'][$tmpSTR]['Value']=$pType;
		//-- ------ #Check userinfo ------ --
		$tmpINT=$tmpUserApp->ReadUserinfo($tmpDescription);
		if($tmpINT!=0){
			return 1;
		}
		$this->sUserInfo=$tmpDescription;
		if ($this->sFunctionname!='') {
			$tmpUserApp->GetUserPowerArray($this->sUserInfo,$this->sFunctionname,'Mana',$this->sAR_UserPower);
		}
		if (in_array($this->sFunctionname.'_view',$this->sAR_UserPower) && count($this->sAR_UserPower)>1) {
			return 1;
		}
		$this->sMainUserid=$tmpCode->Int32($this->sUserInfo[0]['Columns']['uitID']['Value'],0);
		//-- ------ #Get config and path ------ --
		if(count($this->sUserInfo)>0){
			$this->resetConfig($this->sUserInfo[3]['Columns']['uuctSysConfig']['Value']);
			if($this->sUserInfo[0]['Columns']['uitUnitid']['Value']<12){
				$this->sSiteRoot=$this->sSiteRootCore;
				$this->sFileConfigPath=$this->sFileConfigPathCore;
				$this->sUiDescriptionPath=$this->sUiDescriptionPathCore;
				$this->sDbDescriptionPath=$this->sDbDescriptionPathCore;
				$this->sConnString=$this->sConnStringCore;
			}
		}else{
			$this->sSiteRoot=$this->sSiteRootCore;
			$this->sFileConfigPath=$this->sFileConfigPathCore;
			$this->sUiDescriptionPath=$this->sUiDescriptionPathCore;
			$this->sDbDescriptionPath=$this->sDbDescriptionPathCore;
			$this->sConnString=$this->sConnStringCore;
		}
		
		return 0;
	}
	public function checkPagepower($pFlag,$pUsertypePowers){
		$tmpAR0=explode($this->sysSPLIT1,$pUsertypePowers);
		foreach ($tmpAR0 as $Row0){
			if ($Row0==$pFlag) {
				header('Location: '.$this->sysFileConfig['sysCoreRoot'].$this->sysFileConfig['ManaPageNopower']);
				exit();
			}
		}
		
		return 0;
	}
	public function getUser($pType){
		$tmpCode=new netsCode();
		$tmpDescription=array();
		$tmpDescription[0]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfo'];
		$tmpDescription[1]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfocont'];
		$tmpDescription[2]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunit'];
		$tmpDescription[3]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunitcont'];
		$tmpDescription[4]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertype'];
		$tmpDescription[5]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertypecont'];
		$tmpDescription[6]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartment'];
		$tmpDescription[7]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartmentcont'];
		$tmpDescription[8]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergroup'];
		$tmpDescription[9]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergrade'];
		$tmpUserApp=new netsuserinfo($this->sConnString);
		$tmpSTR='uttType';
		$tmpDescription[4]['Columns'][$tmpSTR]['Value']=$pType;
		//-- ------ #Get userinfo ------ --
		$tmpINT=$tmpUserApp->ReadUserinfo($tmpDescription);
		//-- ------ #Set ------ --
		$this->sUserInfo=$tmpDescription;
		if(isset($this->sUserInfo[0]['Columns']['uitID']['Value'])){
			$this->sMainUserid=$tmpCode->Int32($this->sUserInfo[0]['Columns']['uitID']['Value'],0);
		}
		//-- ------ #Get userinfo from cookie ------ --
		$tmpINT=$tmpUserApp->GetUserinfoFromCookie($this->sUserInfo);
		
		return 0;
	}
	public function getUser_WithOutDb($pType){
		$tmpCode=new netsCode();
		$tmpDescription=array();
		$tmpDescription[0]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfo'];
		$tmpDescription[1]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserinfocont'];
		$tmpDescription[2]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunit'];
		$tmpDescription[3]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserunitcont'];
		$tmpDescription[4]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertype'];
		$tmpDescription[5]=$this->sysDbDescriptions[$this->sysTableHead.'netsusertypecont'];
		$tmpDescription[6]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartment'];
		$tmpDescription[7]=$this->sysDbDescriptions[$this->sysTableHead.'netsuserdepartmentcont'];
		$tmpDescription[8]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergroup'];
		$tmpDescription[9]=$this->sysDbDescriptions[$this->sysTableHead.'netsusergrade'];
		$tmpUserApp=new netsuserinfo($this->sConnString);
		$tmpSTR='uttType';
		$tmpDescription[4]['Columns'][$tmpSTR]['Value']=$pType;
		//-- ------ #Get userinfo from cookie ------ --
		$tmpINT=$tmpUserApp->GetUserinfoFromCookie($this->sUserInfo);
		
		return 0;
	}
	public function login_Interface($pUName,$pUPxd,&$pUserinfoAR){
		$tmpUserApp=new netsuserinfo($this->sConnString);
		$this->sSimpleXml=new netsSimpleXml();
		
		$tmpCode=$tmpUserApp->MakeURL_Login($pUName,$pUPxd,$this->sPID,$this->sPPXD);
		$tmpURL=$this->sysFileConfig['sysURLCoreRoot'].'Interface/m_nets/user/userinfo.php?ActionType=DLogin&DLogin={Nets.CODE}';
		$tmpURL=str_replace('{Nets.CODE}',$tmpCode,$tmpURL);
		$tmpCONTENT=$this->readURL($tmpURL);
		$tmpINT=$this->sSimpleXml->loadXml($tmpCONTENT);
		if($tmpINT!=0){
			return 1;
		}
		if (!isset($this->sSimpleXml->sXmlElement->netsRow[1])){
			return 1;
		}
		if (!isset($this->sSimpleXml->sXmlElement->netsRow[1]->Value->dataRow)){
			return 1;
		}
		$tmpAR0=array();
		$Coun0=0;
		foreach ($this->sSimpleXml->sXmlElement->netsRow[1]->Value->dataRow as $Row0){
			$tmpAR0=array(
				'uitID'=>$Row0->uitID,
				'uitName'=>$Row0->uitName,
				'uitNumCode'=>$Row0->uitNumCode,
				'uitNickname'=>$Row0->uitNickname,
				'uutNumCode'=>$Row0->uutNumCode,
				'APIKEY'=>$Row0->APIKEY,);
		}
		
		$pUserinfoAR=$tmpAR0;
		$tmpINT=$this->writeCookie($this->sysNormalCookiePath,$this->sysCookieHead.$this->sysInterfaceCookieName,
			$tmpAR0['uitID'].$this->sysSPLIT1.
			$tmpAR0['uitName'].$this->sysSPLIT1.
			$tmpAR0['uitNumCode'].$this->sysSPLIT1.
			$tmpAR0['uitNickname'].$this->sysSPLIT1.
			$tmpAR0['uutNumCode'].$this->sysSPLIT1.
			$tmpAR0['APIKEY']);
		return 0;
	}
	public function check_Interface($pNumCode,$pAPIKEY){
		$tmpUserApp=new netsuserinfo($this->sConnString);
		$this->sSimpleXml=new netsSimpleXml();
		
		$tmpURL=$this->sysFileConfig['sysURLCoreRoot'].'Interface/m_nets/user/userinfo.php?ActionType=DCheckUser&DCheckUser={Nets.NumCode},{Nets.APIKEY}';
		$tmpURL=str_replace('{Nets.NumCode}',$pNumCode,$tmpURL);
		$tmpURL=str_replace('{Nets.APIKEY}',$pAPIKEY,$tmpURL);
		$tmpCONTENT=$this->readURL($tmpURL);
		$tmpINT=$this->sSimpleXml->loadXml($tmpCONTENT);
		if($tmpINT!=0){
			return 1;
		}
		if (!isset($this->sSimpleXml->sXmlElement->netsRow[0])){
			return 1;
		}
		if (!isset($this->sSimpleXml->sXmlElement->netsRow[0]->Value)){
			return 1;
		}
		if ($this->sSimpleXml->sXmlElement->netsRow[0]->Value[0]=='NoPower_User') {
			return 1;
		}

		return 0;
	}
	public function makeInterfaceURL(&$pUserinfo){
		$tmpData_USER=array();
		$tmpSTR=$this->readCookie($this->sysCookieHead.$this->sysInterfaceCookieName);
		if($tmpSTR==''){
			$tmpINT=$this->login_Interface('','',$tmpData_USER);
			if($tmpINT!=0){
				return $tmpINT;
			}
			$pUserinfo=$tmpData_USER;
		}else {
			$tmpAR0=explode($this->sysSPLIT1,$tmpSTR);
			$pUserinfo=array(
				'uitID'=>$tmpAR0[0],
				'uitName'=>$tmpAR0[1],
				'uitNumCode'=>$tmpAR0[2],
				'uitNickname'=>$tmpAR0[3],
				'uutNumCode'=>$tmpAR0[4],
				'APIKEY'=>$tmpAR0[5],
				);
		}
		$tmpINT=$this->check_Interface($pUserinfo['uitNumCode'],$pUserinfo['APIKEY']);
		if($tmpINT!=0){
			$tmpINT=$this->login_Interface('','',$tmpData_USER);
			if($tmpINT!=0){
				return $tmpINT;
			}
			$pUserinfo=$tmpData_USER;
		}
		$tmpURL=$this->sysFileConfig['sysURLCoreRoot'].'{Nets.PAGE}?UCODE={Nets.CODE}';
		$pDescriptions=array();
		$tmpNumCode=$pUserinfo['uitNumCode'];
		$tmpAPIKEY=$pUserinfo['APIKEY'];
		$tmpInterfaceNumcode=$this->sCode->TimeToInt(date($this->sysTimeFormat));
		$tmpSTR=$tmpNumCode.$this->sysSPLIT1.$tmpInterfaceNumcode.$this->sysSPLIT1.
			$this->sCode->SamplePxd($tmpAPIKEY.$this->sysSPLIT1.$tmpInterfaceNumcode);
		$this->sInterface_URL=str_replace('{Nets.CODE}',$tmpSTR,$tmpURL);
		
		return 0;
	}
	public function getNetsAdv(){
		$this->sNetsAdv_A=$this->sysFileConfig['sysCoreDefaultADV_A'];
		$this->sNetsAdv_B=$this->sysFileConfig['sysCoreDefaultADV_B'];
		$this->sNetsAdv_C=$this->sysFileConfig['sysCoreDefaultADV_C'];
		//-- ------ #GET ------ --
		$tmpPATH=$this->sysFileConfig['PathRoot'].$this->sysFileConfig['sysCoreADVFile'];
		$tmpCONTENT=$this->readFile($tmpPATH);
		$tmpAR0=explode($this->sysSPLIT7,$tmpCONTENT);
		if (!isset($tmpAR0[1])) {
			$tmpCONTENT='';
		}
		$tmpDatetime=$this->sCode->TimeFormat($tmpAR0[0],0);
		if ($this->sCode->TimeToInt_T($tmpDatetime)<$this->sCode->TimeToInt_T(date($this->sysTimeFormat))) {
			$tmpCONTENT='';
		}
		$tmpAR0=explode($this->sysSPLIT6,$tmpCONTENT);
		if (count($tmpAR0)==3) {
		}else {
			$tmpCONTENT='';
		}
		if ($tmpCONTENT=='') {
			$tmpURL=$this->sysFileConfig['sysCoreAPISITE'].$this->sysFileConfig['sysCoreADVURL'];
			$tmpCONTENT=$this->readURL($tmpURL);
			$tmpAR0=$this->sCode->TimeToArray(date($this->sysTimeFormat));
			$tmpMonth=$tmpAR0[1]+1;
			$tmpDatetime=$this->sCode->TimeFormat($tmpAR0[0].'-'.$tmpMonth.'-'.$tmpAR0[2].' '.$tmpAR0[3].':'.$tmpAR0[4].':'.$tmpAR0[5],0);
			$tmpCONTENT=$tmpDatetime.$this->sysSPLIT7.$tmpCONTENT;
			$tmpINT=$this->writeFile($tmpPATH,$tmpCONTENT);
		}
		//-- ------ #Analysis ------ --
		$tmpAR0=explode($this->sysSPLIT7,$tmpCONTENT);
		if (!isset($tmpAR0[1])) {
			$tmpCONTENT='';
		}
		$tmpCONTENT=$tmpAR0[1];
		$tmpAR0=explode($this->sysSPLIT6,$tmpCONTENT);
		if (isset($tmpAR0[0])) {
			$this->sNetsAdv_A=$tmpAR0[0];
		}else {
			return 1;
		}
		if (isset($tmpAR0[1])) {
			$this->sNetsAdv_B=$tmpAR0[1];
		}else {
			return 1;
		}
		if (isset($tmpAR0[2])) {
			$this->sNetsAdv_C=$tmpAR0[2];
		}else {
			return 1;
		}
		
		return 0;
	}
	
}
?>