/** * Constructor function */ public function __construct() { // load parent constructor parent::__construct(); $this->core = nc_Core::get_object(); $this->db = $this->core->db; }
/** * Constructor function */ public function __construct() { // load parent constructor parent::__construct(); // system superior object $nc_core = nc_Core::get_object(); // system db object if (is_object($nc_core->db)) { $this->db = $nc_core->db; } }
/** * Constructor function */ public function __construct() { // load parent constructor parent::__construct(); // system superior object $this->core = nc_Core::get_object(); $this->db = $this->core->db; $this->deleted_ids = array(); $this->trash_full = 0; $this->folder_fail = 0; $this->max_file_size = 10 * 1024 * 1024; if (!class_exists('DOMDocument')) { $this->db->query("UPDATE `Settings` SET `Value` = '0' WHERE `Key` = 'TrashUse'"); } }
/** * Constructor function */ public function __construct() { // load parent constructor parent::__construct(); // system superior object $nc_core = nc_Core::get_object(); // system db object if (is_object($nc_core->db)) { $this->db = $nc_core->db; } $page = nc_Core::get_object()->page; $lm_type = $page->get_field_name('last_modified_type'); $sm_field = $page->get_field_name('sitemap_include'); $sm_change_field = $page->get_field_name('sitemap_changefreq'); $sm_priority_field = $page->get_field_name('sitemap_priority'); $lang_field = $page->get_field_name('language'); $this->real_value = array('Template_ID', 'DisallowIndexing', $lm_type, $sm_field, $sm_change_field, $sm_priority_field, $lang_field, 'Read_Access_ID', 'Write_Access_ID', 'Edit_Access_ID', 'Delete_Access_ID', 'Checked_Access_ID', 'Moderation_ID', 'Cache_Access_ID', 'Cache_Lifetime'); }
/** * Constructor function */ public function __construct() { // load parent constructor parent::__construct(); // system superior object $nc_core = nc_Core::get_object(); // system db object if (is_object($nc_core->db)) { $this->db = $nc_core->db; } $this->load_all(); // Определяем текущий сайт по хосту if (is_null($_REQUEST['current_catalogue_id'])) { $catalogue = $this->get_by_host_name($nc_core->HTTP_HOST, true); $this->set_current_by_id($catalogue['Catalogue_ID']); } elseif ($_REQUEST['current_catalogue_id']) { $this->set_current_by_id($_REQUEST['current_catalogue_id']); } }
/** * Для системных таблиц: * $user_table = new nc_component(0, 3) * или * $user_table = new nc_component('User'); * * * @param int|string $class_id integer or 'Catalogue|Subdivision|User|Template' * @param int $system_table_id */ public function __construct($class_id = 0, $system_table_id = 0) { parent::__construct(); $this->essence = "Class"; $nc_core = nc_Core::get_object(); if (is_object($nc_core->db)) { $this->db = $nc_core->db; } if (isset(self::$system_table_ids[$class_id])) { $system_table_id = self::$system_table_ids[$class_id]; $class_id = 0; } $class_id = intval($class_id); $system_table_id = intval($system_table_id); // загружаем конкретный компонент if ($class_id || $system_table_id) { $this->_class_id = $class_id; $this->_system_table_id = $system_table_id; } }
/** * Constructor function */ public function __construct() { parent::__construct(); $this->db = $this->core->db; $this->table = nc_db_table::make('Template'); }