<?php
class PaDefault extends CustomPage {
	public function PaDefault(){
		$this->CustomPage();
	}
	public function OnBInitial(){
		$this->sMetaTitle='搜索页';
		$this->getUser('1,2,3,4,5,');
		
		if ($this->sActionType=='DSearch_Shopsale') {
			$this->OnSearch_Shopsale();
		}else if ($this->sActionType=='DSearch_Shopcodesale') {
			$this->OnSearch_Shopcodesale();
		}else if ($this->sActionType=='DSearch_Shopfavourable') {
			$this->OnSearch_Shopfavourable();
		}else if ($this->sActionType=='DSearch_Groupsale') {
			$this->OnSearch_Groupsale();
		}else if ($this->sActionType=='DSearch_Reqsupply') {
			$this->OnSearch_Reqsupply();
		}else if ($this->sActionType=='DSearch_Commposts') {
			$this->OnSearch_Commposts();
		}else if ($this->sActionType=='DSearch_Cmsask') {
			$this->OnSearch_Cmsask();
		}
		
		$this->sData_List_DRelated=array();
		$this->sCount_List_DRelated=0;
		
	}
	public function OnList(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList0';
		$tmpListAR0=$this->getQueryString($tmpListSTR0);
		$tmpSortSTR0='DSort0';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'cdtID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.cdtID,A.cdtName,A.cdtParid,A.cdtTag,A.cdtCreateTime,B.cdctFrom,B.cdctContent,B.cdctSourceR00
			FROM {Nets.TableHead}cmsdoc AS A
			INNER JOIN {Nets.TableHead}cmsdoccont AS B ON B.cdctIndexID=A.cdtID
			WHERE 1=1 AND A.cdtRecycle=0 AND A.cdtChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.cdtName LIKE \'%'.$this->sKeyword.'%\' OR B.cdctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.cdtOrderBy DESC,A.cdtID DESC ';
		$tmpSTR_0='';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sListData=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sRecordCount=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPButton->resetTemlate('../../../Config/m_default/File/pageButton3.htm');
		$this->sPButton->sPage=$this->sysPage;
		$this->sPButton->sExtendParameter='&DKeyword='.$this->sKeyword;
		$this->sPButton->setPage($this->sDb->sysPageInfo);
		
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList2';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,2,0',0);
		$tmpSortSTR0='DSort2';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'restID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.restID,A.restName,A.restNameStyle,A.restPrice,B.resctSourceR00,B.resctContent
			FROM {Nets.TableHead}reqsupply AS A
			INNER JOIN {Nets.TableHead}reqsupplycont AS B ON B.resctIndexID=A.restID
			WHERE 1=1 AND A.restRecycle=0 AND A.restChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.restName LIKE \'%'.$this->sKeyword.'%\' OR B.resctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.restOrderBy DESC,A.restID DESC ';
		$tmpSTR_0='';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DRelated=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DRelated=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton_1=new netsPAjaxButton();
		$this->sPAjaxButton_1->sFlag='DSearchRelated_Box';
		$this->sPAjaxButton_1->sPanel='DSearchRelated_Box';
		$this->sPAjaxButton_1->sPageName='DList2';
		$this->sPAjaxButton_1->sSortName='DSort2';
		$this->sPAjaxButton_1->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton_1->sPage=$this->sysPage;
		$this->sPAjaxButton_1->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton_1->setPage($this->sDb->sysPageInfo);
		
		
		$this->OnSearch_Shopsale();
		return 0;
	}
	public function OnSearch_Shopsale(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList1';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,5,0',0);
		$tmpSortSTR0='DSort1';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'shstID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.shstID,A.shstName,A.shstNameStyle,A.shstPrice,B.shsctSourceR00,B.shsctContent
			FROM {Nets.TableHead}shopsale AS A
			INNER JOIN {Nets.TableHead}shopsalecont AS B ON B.shsctIndexID=A.shstID
			WHERE 1=1 AND A.shstRecycle=0 AND A.shstChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.shstName LIKE \'%'.$this->sKeyword.'%\' OR B.shsctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}	
		$tmpSQL.=' ORDER BY A.shstOrderBy DESC,A.shstID DESC ';
		$tmpSTR_0='';
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DSearch=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DSearch=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sPAjaxButton->sFlag='DSearchContent_Box';
		$this->sPAjaxButton->sPanel='DSearchContent_Box';
		$this->sPAjaxButton->sPageName='DList1';
		$this->sPAjaxButton->sSortName='DSort1';
		$this->sPAjaxButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton->sPage=$this->sysPage;
		$this->sPAjaxButton->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}
	public function OnSearch_Shopcodesale(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList1';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,5,0',0);
		$tmpSortSTR0='DSort1';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'shcstID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.shcstID,A.shcstName,A.shcstNameStyle,A.shcstPrice,B.shcsctSourceR00,B.shcsctContent
			FROM {Nets.TableHead}shopcodesale AS A
			INNER JOIN {Nets.TableHead}shopcodesalecont AS B ON B.shcsctIndexID=A.shcstID
			WHERE 1=1 AND A.shcstRecycle=0 AND A.shcstChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.shcstID LIKE \'%'.$this->sKeyword.'%\' OR B.shcsctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.shcstOrderBy DESC,A.shcstID DESC ';
		$tmpSTR_0='';
		
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DSearch=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DSearch=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sPAjaxButton->sFlag='DSearchContent_Box';
		$this->sPAjaxButton->sPanel='DSearchContent_Box';
		$this->sPAjaxButton->sPageName='DList1';
		$this->sPAjaxButton->sSortName='DSort1';
		$this->sPAjaxButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton->sPage=$this->sysPage;
		$this->sPAjaxButton->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}
	public function OnSearch_Shopfavourable(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList1';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,5,0',0);
		$tmpSortSTR0='DSort1';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'shftID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.shftID,A.shftName,A.shftNameStyle,B.shfctSourceR00,B.shfctContent
			FROM {Nets.TableHead}shopfavourable AS A
			INNER JOIN {Nets.TableHead}shopfavourablecont AS B ON B.shfctIndexID=A.shftID
			WHERE 1=1 AND A.shftRecycle=0 AND A.shftChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.shftName LIKE \'%'.$this->sKeyword.'%\' OR B.shfctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.shftOrderBy DESC,A.shftID DESC ';
		$tmpSTR_0='';
		
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DSearch=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DSearch=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sPAjaxButton->sFlag='DSearchContent_Box';
		$this->sPAjaxButton->sPanel='DSearchContent_Box';
		$this->sPAjaxButton->sPageName='DList1';
		$this->sPAjaxButton->sSortName='DSort1';
		$this->sPAjaxButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton->sPage=$this->sysPage;
		$this->sPAjaxButton->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}
	public function OnSearch_Groupsale(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList1';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,5,0',0);
		$tmpSortSTR0='DSort1';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'gstID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.gstID,A.gstName,A.gstNameStyle,B.gsctPrice_Now,B.gsctSourceR00,B.gsctContent
			FROM {Nets.TableHead}groupsale AS A
			INNER JOIN {Nets.TableHead}groupsalecont AS B ON B.gsctIndexID=A.gstID
			WHERE 1=1 AND A.gstRecycle=0 AND A.gstChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.gstName LIKE \'%'.$this->sKeyword.'%\' OR B.gsctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.gstOrderBy DESC,A.gstID DESC ';
		$tmpSTR_0='';
		
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DSearch=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DSearch=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sPAjaxButton->sFlag='DSearchContent_Box';
		$this->sPAjaxButton->sPanel='DSearchContent_Box';
		$this->sPAjaxButton->sPageName='DList1';
		$this->sPAjaxButton->sSortName='DSort1';
		$this->sPAjaxButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton->sPage=$this->sysPage;
		$this->sPAjaxButton->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}
	public function OnSearch_Reqsupply(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList1';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,5,0',0);
		$tmpSortSTR0='DSort1';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'restID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.restID,A.restName,A.restNameStyle,A.restPrice,B.resctSourceR00,B.resctContent
			FROM {Nets.TableHead}reqsupply AS A
			INNER JOIN {Nets.TableHead}reqsupplycont AS B ON B.resctIndexID=A.restID
			WHERE 1=1 AND A.restRecycle=0 AND A.restChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.restName LIKE \'%'.$this->sKeyword.'%\' OR B.resctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.restOrderBy DESC,A.restID DESC ';
		$tmpSTR_0='';
		
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DSearch=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DSearch=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sPAjaxButton->sFlag='DSearchContent_Box';
		$this->sPAjaxButton->sPanel='DSearchContent_Box';
		$this->sPAjaxButton->sPageName='DList1';
		$this->sPAjaxButton->sSortName='DSort1';
		$this->sPAjaxButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton->sPage=$this->sysPage;
		$this->sPAjaxButton->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}
	public function OnSearch_Commposts(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList1';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,5,0',0);
		$tmpSortSTR0='DSort1';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'coptID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.coptID,A.coptName,A.coptNameStyle,B.copctSourceR00,B.copctContent
			FROM {Nets.TableHead}commposts AS A
			INNER JOIN {Nets.TableHead}commpostscont AS B ON B.copctIndexID=A.coptID
			WHERE 1=1 AND A.coptRecycle=0 AND A.coptChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.coptName LIKE \'%'.$this->sKeyword.'%\' OR B.copctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.coptOrderBy DESC,A.coptID DESC ';
		$tmpSTR_0='';
		
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DSearch=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DSearch=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sPAjaxButton->sFlag='DSearchContent_Box';
		$this->sPAjaxButton->sPanel='DSearchContent_Box';
		$this->sPAjaxButton->sPageName='DList1';
		$this->sPAjaxButton->sSortName='DSort1';
		$this->sPAjaxButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton->sPage=$this->sysPage;
		$this->sPAjaxButton->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}
	public function OnSearch_Cmsask(){
		$tmpAR0=$this->AnalyerRequest('DKeyword','',0);
		$this->sKeyword=$tmpAR0[0];
		//-- ------ #Datas ------ --
		$tmpListSTR0='DList1';
		$tmpListAR0=$this->AnalyerRequest($tmpListSTR0,'1,0,12,0',0);
		$tmpSortSTR0='DSort1';
		$tmpSortAR0=$this->AnalyerRequest($tmpSortSTR0,'castID,2',0);
		//-- #Spell SQL --
		$tmpSQL=' SELECT A.castID,A.castName,A.castNameStyle,A.castState,A.castCode,B.casctContent
			FROM {Nets.TableHead}cmsask AS A
			INNER JOIN {Nets.TableHead}cmsaskcont AS B ON B.casctIndexID=A.castID
			WHERE 1=1 AND A.castRecycle=0 AND A.castChecked>1 ';
		if ($this->sKeyword=='') {
		}else{
			$tmpSQL.=' AND (A.castName LIKE \'%'.$this->sKeyword.'%\' OR B.casctContent LIKE \'%'.$this->sKeyword.'%\') ';
		}
		$tmpSQL.=' ORDER BY A.castOrderBy DESC,A.castID DESC ';
		$tmpSTR_0='';
		
		$tmpSTR=str_replace('{Nets.TableHead}',$this->sysTableHead,$tmpSQL);
		$this->sData_List_DSearch=$this->sDb->SearchP($tmpSTR,$tmpListAR0);
		$this->sCount_List_DSearch=$this->sDb->sysPageInfo[3];
		//#Set page button
		$this->sPAjaxButton=new netsPAjaxButton();
		$this->sPAjaxButton->sFlag='DSearchContent_Box';
		$this->sPAjaxButton->sPanel='DSearchContent_Box';
		$this->sPAjaxButton->sPageName='DList1';
		$this->sPAjaxButton->sSortName='DSort1';
		$this->sPAjaxButton->resetTemlate('../../../Config/m_default/File/pageAjaxButton2.htm');
		$this->sPAjaxButton->sPage=$this->sysPage;
		$this->sPAjaxButton->sExtendParameter='&ActionType='.$this->sActionType.'&DKeyword='.$this->sKeyword;
		$this->sPAjaxButton->setPage($this->sDb->sysPageInfo);
		
		
		return 0;
	}

	
	
}
?>