芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/canaldegap.fr/lib/classes/class.global.inc.php
cmssystemmodules = array( 'FileManager','nuSOAP', 'MenuManager', 'ModuleManager', 'Search', 'CMSMailer', 'News', 'TinyMCE', 'Printing', 'ThemeManager' ); $this->modules = array(); $this->errors = array(); $this->nls = array(); $this->contenttypes = array(); $this->TemplateCache = array(); $this->StylesheetCache = array(); $this->variables['content-type'] = 'text/html'; $this->variables['modulenum'] = 1; $this->variables['routes'] = array(); #Setup hash for storing all modules and plugins $this->cmsmodules = array(); $this->userplugins = array(); $this->userpluginfunctions = array(); $this->cmsplugins = array(); $this->siteprefs = array(); register_shutdown_function(array(&$this, 'dbshutdown')); } function & GetDb() { #static $dbinstance; //Check to see if it hasn't been //instantiated yet. If not, connect //and return it #if (!isset($dbinstance) && !isset($this->db)) global $DONT_LOAD_DB; if (!isset($this->db) && !isset($DONT_LOAD_DB)) { $this->db =& adodb_connect(); } #return $dbinstance; $db =& $this->db; return ($db); } function & GetConfig() { if (!isset($this->config)) { $configinstance = cms_config_load(true); $this->config = &$configinstance; } return $this->config; } function & GetModuleLoader() { if (!isset($this->moduleloader)) { require_once(cms_join_path(dirname(__FILE__), 'class.moduleloader.inc.php')); $moduleloader =& new ModuleLoader(); $this->moduleloader = &$moduleloader; } return $this->moduleloader; } function & GetModuleOperations() { if (!isset($this->moduleoperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.moduleoperations.inc.php')); $moduleoperations =& new ModuleOperations(); $this->moduleoperations = &$moduleoperations; } return $this->moduleoperations; } function & GetUserOperations() { if (!isset($this->useroperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.useroperations.inc.php')); $useroperations =& new UserOperations(); $this->useroperations = &$useroperations; } return $this->useroperations; } function & GetContentOperations() { if (!isset($this->contentoperations)) { debug_buffer('', 'Load Content Operations'); require_once(cms_join_path(dirname(__FILE__), 'class.contentoperations.inc.php')); $contentoperations =& new ContentOperations(); $this->contentoperations = &$contentoperations; debug_buffer('', 'End Load Content Operations'); } return $this->contentoperations; } function & GetBookmarkOperations() { if (!isset($this->bookmarkoperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.bookmarkoperations.inc.php')); $bookmarkoperations =& new BookmarkOperations(); $this->bookmarkoperations = &$bookmarkoperations; } return $this->bookmarkoperations; } function & GetTemplateOperations() { if (!isset($this->templateoperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.templateoperations.inc.php')); $templateoperations =& new TemplateOperations(); $this->templateoperations = &$templateoperations; } return $this->templateoperations; } function & GetStylesheetOperations() { if (!isset($this->stylesheetoperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.stylesheetoperations.inc.php')); $stylesheetoperations =& new StylesheetOperations(); $this->stylesheetoperations = &$stylesheetoperations; } return $this->stylesheetoperations; } function & GetGroupOperations() { if (!isset($this->groupoperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.groupoperations.inc.php')); $groupoperations =& new GroupOperations(); $this->groupoperations = &$groupoperations; } return $this->groupoperations; } function & GetGlobalContentOperations() { if (!isset($this->globalcontentoperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.globalcontentoperations.inc.php')); $globalcontentoperations =& new GlobalContentOperations(); $this->globalcontentoperations = &$globalcontentoperations; } return $this->globalcontentoperations; } function & GetUserTagOperations() { if (!isset($this->usertagoperations)) { require_once(cms_join_path(dirname(__FILE__), 'class.usertagoperations.inc.php')); $usertagoperations =& new UserTagOperations(); $this->usertagoperations = &$usertagoperations; } return $this->usertagoperations; } function & GetSmarty() { //Check to see if it hasn't been //instantiated yet. If not, connect //and return it if (!isset($this->smarty)) { $conf =& $this->GetConfig(); if (!defined('SMARTY_DIR')) { define('SMARTY_DIR', cms_join_path($dirname,'lib','smarty') . DIRECTORY_SEPARATOR); } #Setup global smarty object $this->smarty =& new Smarty_CMS($conf); } return $this->smarty; } function & GetHierarchyManager() { //Check to see if it hasn't been //instantiated yet. If not, connect //and return it if (!isset($this->hrinstance)) { debug_buffer('', 'Start Loading Hierarchy Manager'); #require_once(dirname(__FILE__).'/class.contenthierarchymanager.inc.php'); #Setup global smarty object $contentops =& $this->GetContentOperations(); $this->hrinstance =& $contentops->GetAllContentAsHierarchy(false, array()); debug_buffer('', 'End Loading Hierarchy Manager'); } return $this->hrinstance; } function dbshutdown() { if (isset($this->db)) { $db =& $this->db; if ($db->IsConnected()) $db->Close(); } } } class CmsRoute { var $module; var $regex; var $defaults; } class CmsContentTypePlaceholder { var $type; var $filename; var $friendlyname; var $loaded; } # vim:ts=4 sw=4 noet ?>