<?php
require($netsFileConfig['sysCoreRoot'].'Inc/m_Cms/Other/cmsvote.php');

class PaDefault extends CustomPage {
	public function PaDefault(){
		$this->CustomPage();
	}
	public function OnBInitial(){
		$this->sMetaTitle='投票';
		$this->getUser('1,2,3,4,5,');
		$this->sTemplatePath='Cms/voteSingle_Normal.php';
		$this->sApp=new cmsvote($this->sConnString);
		
		//-- ------ #ActionType ------ --
		if ($this->sActionType=='DVote') {
			$this->OnVote();
		}else if ($this->sActionType=='DVoteResult') {
			$this->OnVoteResult();
		}
		
	}
	public function OnVote(){
		$tmpAR0=$this->AnalyerRequest('DVote','0,0',0);
		
		$tmpINT=$this->sApp->OnVote($tmpAR0[0],$tmpAR0[1]);
		if($tmpINT!=0){
			$this->sJscript=$this->Message('ERROR','',$this->sApp->sysLastError,'');
			return 1;
		}
		
		$this->sJscript=$this->Message('SUCCESS','','成功投票',$this->sysPage.'?ActionType=DVoteResult&DVoteResult='.$tmpAR0[0]);
		return 0;
	}
	public function OnVoteResult(){
		$tmpAR0=$this->AnalyerRequest('DVoteResult',0,0);
		
		
		
		return 0;
	}
	public function OnList(){
		
		
		
		return 0;
	}
	
	
}
?>