<?php
require('../../../Mana/Common/Component/ComInitialHead.php');
require($netsFileConfig['sysCoreRoot'].'Inc/m_Nets/System/netssysfiles.php');

class PaDefault extends CustomPage {
	public $ssetParid=1;
	
	public function PaDefault(){
		$this->CustomPage();
	}
	public function OnPInitial(){
		$this->checkUser('1,2,3,4,5,');
		$this->sTable=array(
			array('sttTableName'=>$this->sysTableHead.'netssysfiles','sttColumnHead'=>'sft'),
			array('sttTableName'=>$this->sysTableHead.'netssysfilescont','sttColumnHead'=>'sfct'),);
		$this->sUiName='Mana/nets/system_files';
	}
	public function OnBInitial(){
		$this->sMetaTitle='文件管理';
		$this->sLimitCount=0;
		$this->sApp=new netssysfiles($this->sConnString);
		//Parid
		$tmpAR0=$this->sControl->sDbInTemplate;
		$tmpAR0['Connection']=$this->sConnString;
		$tmpAR0['SQL']=' SELECT A.sfgtID,A.sfgtName,A.sfgtParid FROM '.$this->sysTableHead.'netssysfilesgroup AS A
			WHERE 1=1 AND A.sfgtRecycle=0 AND A.sfgtChecked>1 AND A.sfgtParid={Nets.Parid}
			ORDER BY A.sfgtOrderBy DESC,A.sfgtID DESC ';
		$tmpAR0['SQL0']=' SELECT A.sfgtID,A.sfgtName,A.sfgtParid FROM '.$this->sysTableHead.'netssysfilesgroup AS A
			WHERE 1=1 AND A.sfgtRecycle=0 AND A.sfgtChecked>1 AND A.sfgtID={Nets.Parid}
			ORDER BY A.sfgtOrderBy DESC,A.sfgtID DESC ';
		$tmpAR0['InitialString']=$this->ssetParid;
		$tmpAR0['Parid']='ID';
		$tmpAR0['Text']='Name';
		$tmpAR0['Value']='ID';
		$tmpAR0['Type']=0;
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		$this->sParid1=$this->sParid2=$this->sControl->bindDropdown($tmpAR0);
		$tmpAR0=$this->sControl->sDpReturnTemplate;
		$tmpAR0['Text']='[所有分类]';
		$tmpAR0['Value']='-1';
		$tmpAR0['Style']='';
		$tmpAR0['Title']='';
		$tmpAR0['AddOne']='';
		array_push($this->sParid2,$tmpAR0);
		
		//-- ------ #ActionType ------ --
/*
Manage
Multi_Edit
Multi_Flash
Multi_Normal
Multi_Show
Single_Edit
Single_Flash
Single_Normal
Single_Show
Single_Url

*/
		//-- ------ #Parameter ------ --
		//#Controlname,Rootpath,ImageURL
		$this->sParameter='';
		$tmpAR0=$this->AnalyerRequest('DParameterTxt','',1);
		$tmpAR0=explode($this->sysSPLIT4,$tmpAR0[0]);
		if (count($tmpAR0)!=3) {
			$this->sControlname='';
			$this->sRootpath='';
			$this->sImageURL='';
		}else {
			$this->sControlname=$tmpAR0[0];
			$this->sRootpath=$tmpAR0[1];
			$this->sImageURL=$tmpAR0[2];
		}
		$tmpAR0=$this->AnalyerRequest('DParameter',',,',0);
		if ($tmpAR0[0]!='') {
			$this->sControlname=$this->sCode->URL_DecodeParameter($tmpAR0[0],1);
			$this->sRootpath=$this->sCode->URL_DecodeParameter($tmpAR0[1],1);
			$this->sImageURL=$this->sCode->URL_DecodeParameter($tmpAR0[2],1);
		}
		//-- #Check --
		if ($this->sRootpath=='') {
			$this->sRootpath=$this->sysFileConfig['PathRoot'];
		}
		if ($this->sImageURL=='') {
			$this->sImageURL=$this->sysFileConfig['PathRoot'];
		}
		//-- #Patameter string --
		$this->sParameter=
			$this->sControlname.$this->sysSPLIT4.
			$this->sRootpath.$this->sysSPLIT4.
			$this->sImageURL;
		
	}
	public function OnList(){
		
		
		
		return 0;
	}
	
	
	
}
//-- ------ #Instanct ------ --
$tmpDefault=new PaDefault();
$tmpDefault->sysMetaTitle=$tmpDefault->sMetaTitle.' - '.$tmpDefault->sysFileConfig['sysTitle'];
//-- ------ #Template ------ --
require($tmpDefault->sysFileConfig['sysCoreRoot'].$tmpDefault->sysManaTemplatePath.'Component/Head_Frame.php');
if ($tmpDefault->sActionType=='FFFFFFFF') {
}else if ($tmpDefault->sActionType=='Manage' || 
	$tmpDefault->sActionType=='Multi_Edit' || 
	$tmpDefault->sActionType=='Multi_Flash' || 
	$tmpDefault->sActionType=='Multi_Camera' || 
	$tmpDefault->sActionType=='Multi_Normal' || 
	$tmpDefault->sActionType=='Multi_Show' || 
	$tmpDefault->sActionType=='Single_Edit' || 
	$tmpDefault->sActionType=='Single_Flash' || 
	$tmpDefault->sActionType=='Single_Camera' || 
	$tmpDefault->sActionType=='Single_Normal' || 
	$tmpDefault->sActionType=='Single_Show' || 
	$tmpDefault->sActionType=='Single_Url') {
	require($tmpDefault->sysFileConfig['sysCoreRoot'].'Component/Nets/netsFileX/Template_'.$tmpDefault->sActionType.'.php');

}
require($tmpDefault->sysFileConfig['sysCoreRoot'].$tmpDefault->sysManaTemplatePath.'Component/End_Frame.php');?>