<?php
class PaDefault extends CustomPage {
	public $ssetParid=1;
	
	public function PaDefault(){
		$this->ComPage();
	}
	public function OnPInitial(){
		$this->checkUser('1,2,3,4,5,');
		$this->sActionType='Normal';
		$this->sTable=array(
			array('sttTableName'=>$this->sysTableHead.'netsuserinfo','sttColumnHead'=>'uit'),
			array('sttTableName'=>$this->sysTableHead.'netsuserinfocont','sttColumnHead'=>'uict'),);
		$this->sUiName='User/nets/s_user_complete';
	}
	public function OnBInitial(){
		$this->sMetaTitle='用户';
		$this->sLimitCount=0;
		$this->sApp=new netsuserinfo($this->sConnString);
		//Sex
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=$this->sOptionSQL;
		$tmpAR0['InitialString']=45;
		$tmpAR0['Parid']='sotID';
		$tmpAR0['Text']='sotName';
		$tmpAR0['Value']='sotValue';
		$tmpAR0['Type']=1;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$this->sSex1=$this->sSex2=$this->sControl->bindDropdown($tmpAR0);
	}
	public function OnModify(){
		parent::OnModify();
		$this->sUserInfo[0]['Columns']['uitTypeid']['Value']='1,2,3,4,5,';
		$tmpINT=$this->sApp->Relogin($this->sUserInfo);
	}
	public function OnNormal(){
		$tmpSQL=' SELECT * 
			FROM '.$this->sysTableHead.'netsuserinfo AS A 
			INNER JOIN '.$this->sysTableHead.'netsuserinfocont AS B ON B.uictIndexID=A.uitID
			WHERE 1=1 AND A.uitID='.$this->sUserInfo[0]['Columns']['uitID']['Value'].' ';
		$tmpDataCollection0=$this->sDb->Search($tmpSQL);
		if(count($tmpDataCollection0)>0){
			$tmpRow=$tmpDataCollection0[0];
			$this->sMainID=$tmpRow[$this->sTable[0]['sttColumnHead'].'ID'];
			//-- #Get value --
			$Coun0=0;
			while (count($this->sUiDescription_Normal)>$Coun0) {
				if(isset($tmpRow[$this->sUiDescription_Normal[$Coun0]['stcotName']])){
					$this->sUiDescription_Normal[$Coun0]['Value']=$tmpRow[$this->sUiDescription_Normal[$Coun0]['stcotName']];
				}
				$Coun0++;
			}
		}else {}
	}
	
	public function DefUiPanel(&$pColumn,$pFlag){
		if($pColumn['stcotName']=='Quick'){
			$pColumn['ControlStyle']='width:50px;';
		}else if($pColumn['stcotName']=='uitChecked' && $pFlag=='Search'){
			$pColumn['Option']=$this->sChecked2;
		}else if($pColumn['stcotName']=='uitParid' && $pFlag=='Search'){
			$pColumn['Option']=$this->sParid2;
		}else if($pColumn['stcotName']=='uictCoSex' && $pFlag=='Normal'){
			$pColumn['Option']=$this->sSex1;
		}
		return $pColumn;
	}
	public function DefUiButton($pFlag,$Exception){
		parent::DefUiButton($pFlag,array('List','Normal','ListChildLink','NormalChildLink',));
		if($pFlag=='Normal'){ ?>
<li class="ButBut"><input type="submit" value="我已完成完善了个人资料并提交" class="Control2" onclick="setActionType('Normal','DModify','','');" /></li>
<?php
		}
	}
	public function DefUiJscript($pFlag){
?>
function jsDCheck(pPara){
	var tmpControl="";
	var tmpError="";
	var tmpChecker=new netsChecker();
	var tmpActionWithOut=document.getElementById("ActionWithOut");
	var Coun0=0;
	//-- ------ #ActionWithOut ------ --
	if(tmpActionWithOut==undefined){
		return true;
	}
	if(tmpActionWithOut.value=="1"){
		return true;
	}else if(tmpActionWithOut.value=="2"){
		return false;
	}
	//-- ------ #Check ------ --
	//#uictCoName
	tmpCheckCont=document.getElementById("uictCoNameTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<1){
		Coun0++;
		tmpError+=Coun0+".请填写真实姓名"+sysSPLIT8;
	}
	//#uictCoTele
	tmpCheckCont=document.getElementById("uictCoTeleTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<2){
		Coun0++;
		tmpError+=Coun0+".请填写联系电话"+sysSPLIT8;
	}
	//#uictCoMobile
	tmpCheckCont=document.getElementById("uictCoMobileTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<2){
		Coun0++;
		tmpError+=Coun0+".请填写联系手机"+sysSPLIT8;
	}
	//#uictCoQQ
	tmpCheckCont=document.getElementById("uictCoQQTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<2){
		Coun0++;
		tmpError+=Coun0+".请填写联系QQ"+sysSPLIT8;
	}
	//#uictCoWebsite
	tmpCheckCont=document.getElementById("uictCoWebsiteTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<2){
		Coun0++;
		tmpError+=Coun0+".请填写主页"+sysSPLIT8;
	}
	//#uictZoneChoose
	tmpCheckCont=document.getElementById("uictZoneChooseTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<2){
		Coun0++;
		tmpError+=Coun0+".请填写所在地区"+sysSPLIT8;
	}
	//#uictZoneDetail
	tmpCheckCont=document.getElementById("uictZoneDetailTxt");
	tmpCheckCont.value=tmpChecker.Filter(tmpCheckCont.value,0);
	if(tmpCheckCont.value.length<2){
		Coun0++;
		tmpError+=Coun0+".请填写详细地址"+sysSPLIT8;
	}

	//-- ------ #Result ------ --
	if(tmpError!=""){
		tmpSTR="<span class=\"FStrong\">对不起，您提交的内容存在以下错误:</span>"+sysSPLIT8+tmpError;
		showMessage("系统消息 - <?php echo ($this->sysFileConfig['bussinessMetaTitle']); ?>",tmpSTR,"","0");
		return false;
	}else{
		return true;
	}
}
<?php
	}
}
?>