<?php
class netsConfig {
	public $sysFileConfig=array();
	public $sysDbDescriptions=array();
	public $sysUiDescriptions=array();
	public $sysLanguageConfig=array();
	
	//#Core config
	public $sysOsVersion='LINUX';
	public $sysCharset='UTF-8';
	protected $sysIsDebug=0;//0.是,1.不是
	protected $sysReadTableDescriptionFile=0;//0.是,1.不是
	public $sysUiDescriptionModel=Array(
		'stcotID'=>0,'stcotName'=>'uitName','stcoctUiName'=>'uitName',
		'stcotType'=>1,'stcotOrderBy'=>0,'stcoctUiType'=>'Non','stcoctUiRecognise'=>'Normal',
		'stcoctUiLabelid'=>0,'stcoctDefaultValue'=>0,'stcoctUiOptionAR'=>0,'stcoctUiLen'=>180,'stcoctUiEnable'=>0,
		'stcoctUiIntroduct'=>'&nbsp;','stcoctUiImgIntroduct'=>'&nbsp;','stcoctSingleLine'=>0,'stcoctColspan'=>1,
		'stcoctDbIsKey'=>0,'stcoctModifyAble'=>0,'sttFunctionid'=>0,'sttType'=>0,'sttTableName'=>'netsuserinfo','sttColumnHead'=>'uit',
		'Index'=>0,'Value'=>'','ShowValue'=>'','NameExtend'=>'','LineStyle'=>'','Option'=>Array(),'ControlStyle'=>'','Parameter'=>'',
		'Parameter_JS_Onclick'=>'','Parameter_JS_Onblur'=>'','Parameter_JS_Onfocus'=>'','Parameter_JS_Onchange'=>'','Parameter_JS_Onmouseover'=>'','Parameter_JS_Onmouseout'=>'',);
	public $sysDbDescriptionModel=array(
		'TableDescription'=>array('sttTableName'=>'','sttColumnHead'=>'','sttType'=>'','sttIntroduct'=>'','SearchColumn'=>'',),
		'Columns'=>array('stcotName'=>array(
			'stcotName'=>'','stcoctDbType'=>'','stcoctDbLen'=>'','stcoctDbIsKey'=>'','stcoctUiType'=>'','stcoctDefaultValue'=>'','Value'=>'',),
		),);
	public $sysTableMark=array('A','B','C','D','E','F','G','H','J','K','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',);
	//#Socket config
	public $sysSocketConfig='mail.unionnets.com,25,vir@unionnets.com,1234567abc,UTF-8';
	//#Access db config
	public $sysAccessFixPath='../../../Inc/netsDb/';
	public $sysAccessName='{NetsInstall.Db_Dbname}.mdb';
	//#Mongo db config
	public $sysMongoHost='{NetsInstall.Db_Host}';
	public $sysMongoPort='27017';
	public $sysMongoUName='{NetsInstall.Db_Username}';
	public $sysMongoPxd='{NetsInstall.Db_Pxd}';
	public $sysMongoDBName='{NetsInstall.Db_Dbname}';
	//#MySQL db config
	public $sysMySQLHost='{NetsInstall.Db_Host}';
	public $sysMySQLPort='{NetsInstall.Db_Port}';
	public $sysMySQLUName='{NetsInstall.Db_Username}';
	public $sysMySQLPxd='{NetsInstall.Db_Pxd}';
	public $sysMySQLDBName='{NetsInstall.Db_Dbname}';
	//#Cookiees config
	public $sysTableHead='{NetsInstall.Db_Tablehead}';
	public $sysCookieHead='{NetsInstall.Db_Tablehead}';
	public $sysNormalCookiePath=array('/','/../');
	public $sysManaCookieName='NetsManageCheckCookie';
	public $sysInterfaceCookieName='NetsInterfaceCheckCookie';
	protected $sysSysListCountCookieName='NetsSysListCountCookie';
	protected $sysSysListTypeCookieName='NetsSysListTypeCookie';
	protected $sysSubmitTimeLimitName='NetsSubmitTimeLimit_Nets';
	public $sysZoneCookieName='ZoneCookie';
	public $sysManaPLURLCookieName='ManaPLURL';
	public $sysPlatformPLURLCookieName='PlatformPLURL';
	public $sysQPlatformPLURLCookieName='QPlatformPLURL';
	public $sysUserPLURLCookieName='UserPLURL';
	//#Define string
	public $sysHidden='DHidden';
	public $px='px';
	public $sysSPLIT1=',';
	public $sysSPLIT2=';';
	public $sysSPLIT3='|';
	public $sysSPLIT4="\r\n";
	public $sysSPLIT5='|||';
	public $sysSPLIT6='<!---RTB.SPLIT1--->';
	public $sysSPLIT7="<!---RTB.SPLIT2--->\r\n";
	public $sysSPLIT8='<br />';
	public $sysSPLIT9='/';
	public $sysSPLIT10="\n";
	public $sysSPLIT11='_';
	public $sysSPLIT12='<hr />';
	public $sysSPLIT13='/*-- #SPLIT1 --*/';
	public $sysSPLIT14='/*-- ------ ###NETS### ------ #SPLIT1 ------ ###NETS### ------ --*/';
	public $sysSPLIT15='-A-';
	public $sysSPLIT16='&';
	
	
	public $sysSiteRoot='../../../';
	public $sysSiteHome='';
	public $sysPage='';
	public $sysPages=array();
	public $sysURL='';
	public $sysIP='';
	public $sysPhpForm='phpForm1';
	public $sysMetaTitle='网集软件';
	public $sysMetaKeyword='内容管理、客户关系管理、项目管理、团购、团购导航、财务管理、物流管理、虚拟主机管理、界面库、商城、社区';
	public $sysMetaDescription='网集软件：主要产品有内容管理、客户关系管理、项目管理、团购、团购导航、财务管理、物流管理、虚拟主机管理、界面库、商城、社区';
	public $sysVersion='网集软件 version 0.042 beta 1 <br /> prower by: <a href="http://www.unionnets.com" title="unionNets.com" target="_blank" class="FBlue2 Link1">UNIONNETS.COM</a>';
	public $sysNetsHome='http://product.unionnets.com';
	public $sysTimeFormat='Y-m-d H:i:s';
	public $sysMyProjects=array('_DemoCore','corenets',);
	
	public $sysManaTemplatePath='Template/Mana/m_default/';
	public $sysPlatformTemplatePath='Template/Platform/m_default/';
	public $sysQPlatformTemplatePath='Template/QPlatform/m_default/';
	public $sysInterfaceTemplatePath='Template/Interface/m_default/';
	public $sysDataTemplatePath='Template/Data/m_default/';
	public $sysTestTemplatePath='Template/Test/m_default/';
	public $sysUserTemplatePath='Template/User/m_default/';
	
	public $sUserInfo=array();
	public $sConnString;
	public $sSiteRoot;
	public $sFileConfigPath;
	public $sUiDescriptionPath;
	public $sDbDescriptionPath;
	public $sSiteRootCore;
	public $sFileConfigPathCore;
	public $sUiDescriptionPathCore;
	public $sDbDescriptionPathCore;
	public $sConnStringCore;
	
	public function netsConfig(){
		global $netsFileConfig;
		$this->sysFileConfig=$netsFileConfig;
		global $sysDbDescriptions;
		$this->sysDbDescriptions=$sysDbDescriptions;
		global $sysUiDescriptions;
		$this->sysUiDescriptions=$sysUiDescriptions;
		global $netsLanguageConfig;
		$this->sysLanguageConfig=$netsLanguageConfig;

		if (strtoupper(substr(PHP_OS,0,3))=='WIN') {
			$this->sysOsVersion='WIN';
		}
	}
	public function getConfig(){
		//-- ------ #Mysql connection string ------ --
		$this->sConnStringCore=$this->sConnString=$this->sysMySQLHost.$this->sysSPLIT1.$this->sysMySQLPort.$this->sysSPLIT1.
			$this->sysMySQLUName.$this->sysSPLIT1.$this->sysMySQLPxd.$this->sysSPLIT1.
			$this->sysMySQLDBName.$this->sysSPLIT1.$this->sysCharset;
		//-- ------ #Access connection string ------ --
		//$this->sConnStringCore=$this->sConnString=$this->sysAccessFixPath.$this->sysSPLIT1.$this->sysAccessName.$this->sysSPLIT1.$this->sysCharset;
		//-- ------ #Other string ------ --
		$this->sSiteRootCore=$this->sSiteRoot='../../../';
		$tmpSTR='Config/m_default/Config/netsFileConfig.php';
		$this->sFileConfigPathCore=$this->sFileConfigPath=$this->sSiteRootCore.$tmpSTR;
		$tmpSTR='Config/m_default/Config/netsFileConfig_Regular.php';
		$this->sFileConfigPathRegular=$this->sSiteRootCore.$tmpSTR;
		$tmpSTR='Cache/UiDescription/';
		$this->sUiDescriptionPathCore=$this->sUiDescriptionPath=$this->sSiteRootCore.$tmpSTR;
		$tmpSTR='Cache/DbDescription/';
		$this->sDbDescriptionPathCore=$this->sDbDescriptionPath=$this->sSiteRootCore.$tmpSTR;
	}
	public function resetConfig($pConfigString){
		
		return 0;
	}
	public function getLanguage($pFlag){
		$tmpSTR=$pFlag;
		if (isset($this->sysLanguageConfig[$pFlag])) {
			$tmpSTR=$this->sysLanguageConfig[$pFlag];
		}
		
		return $tmpSTR;
	}
}
//-- ------ #Pre config ------ --
$tmpPreConfig=new netsConfig();
header('Content-Type:text/html;charset='.$tmpPreConfig->sysCharset);
session_start();
date_default_timezone_set('PRC');
//set_time_limit($tmpPreConfig->sysFileConfig['ScriptOutTime']);
set_time_limit(15);
?>