<?php
class ComPage extends netsPage {
	/**
	Data template:
	Title,XMLURL,URL,Type,Description,Content,Source
	*/
	public $sMainData='';
	public $sErrorPath='';

	public function ComPage(){
		$this->netsPage();
	}
	public function OnInitial(){
		//-- ------ ### ------ --
		$this->sDb=new netsDb($this->sConnString);
		$this->sDbCore=new netsDb($this->sConnStringCore);
		$this->sCode=new netsCode();
		
		parent::OnInitial();
	}
	public function makeError($pCode,$pMessage){
		$tmpXml=new netsXml();
		$tmpData0=array(
			array('HEAD',0,$pCode,$pMessage,),
			);
		$this->sMainData=$tmpXml->makeNETSXML($tmpData0);
		return 0;
	}
	public function makeData($pData,$pData_ADD){
		$tmpXml=new netsXml();
		$tmpCONTENT=array();
		$tmpCONTENT[]=array('HEAD',0,'SUCCESS','数据获取成功',);
		$tmpAR0=array();
		$Coun0=0;
		foreach ($pData as $Row0){
			while ($Column=each($Row0)){
				$tmpAR0[$Coun0][$Column['key']]=$Column['value'];
			}
			$Coun0++;
		}
		$tmpCONTENT[]=array('DATA',1,$tmpAR0,'数据内容',);
		foreach ($pData_ADD as $Row0){
			$tmpCONTENT[]=array($Row0[0],$Row0[1],$Row0[2],$Row0[3],);
		}
		$this->sMainData=$tmpXml->makeNETSXML($tmpCONTENT);
		
		return 0;
	}
}
?>