function CCore($url = '', $wiki = true) { global $DOCUMENT_ROOT, $content_type, $CORE, $ipc, $XPFS; debug_watchdog_clear(); if ($url == '') { $url = config_get('document-root'); } $this->wiki = $wiki; $this->URL = $url; $this->PAGE = new CVCPage(); $this->PAGE->Init('title=GATE;'); $CORE = $this; // Starting session session_start(); // Set the internal encoding mb_internal_encoding(config_get('internal-charset')); date_default_timezone_set(config_get('timezone')); // Connect to database db_connect(config_get('check-database')); // Initialize XPFS $XPFS = new XPFS(); $XPFS->createVolume(); // Initialize content stuff content_initialize(); // Initialize wiki stuff wiki_initialize(); // Initialie manage stuff manage_initialize(); security_initialize(); ipc_initialize(); service_initialize(); editor_initialize(); $this->DeleteUnwanted(); if ($ipc != '') { ipc_exec($ipc); die; } else { // Make default actions $this->ActionHandler(); // Creating page $this->PAGE->AddScript('language=JavaScript;type=text/javascript', "\n" . tpl('common/globals', array(), false)); $this->PAGE->AddScriptFile('core.js'); $this->PAGE->AddMeta('http-equiv=content-language;content=' . config_get('content-language')); $this->PAGE->AddMeta('http-equiv=Content-Type;content=text/html\\; charset\\=' . config_get('character-set')); $this->PAGE->AddMeta('name=url;content=' . config_get('meta-url')); $this->PAGE->AddMeta('name=keywords;content=' . config_get('meta-keywords')); $this->PAGE->AddMeta('name=description;content=' . config_get('meta-description')); $this->PAGE->AddMeta('name=robots;content=all'); $this->PAGE->SetIcon(config_get('document-root') . '/pics/favicon.ico'); $this->PAGE->AddStyle('content'); $this->PAGE->AddStyle('pages'); add_body_handler('onmousemove', 'core_StoreMousePos', array('event')); if (browser_engine() == 'OPERA') { $this->PAGE->AddStyle('content_opera_rep'); } foreach (config_get('default-scripts') as $k) { $this->AddScriptFile($k); } } }
function Init($content_id = -1, $security = nil) { global $action, $id; CCVirtual::Init($content_id, $security); $this->InitInstance(); editor_initialize($this->GetClassName()); if ($this->GetAllowed('EDIT') || $this->GetAllowed('EDITINFO')) { editor_add_function('Просмотр', 'DrawNavigation', $this->GetClassName()); if ($this->GetAllowed('ADDINFO')) { editor_add_function('Добавление', 'DrawAddPublication', $this->GetClassName()); } } editor_add_function('Настройка скриптов', 'Editor_ManageScripts', 'default', 'action=' . $action . '&id=' . $id); $this->ReceiveContent(); }
* * Copyright (c) 2008-2009 Sergey I. Sharybin <*****@*****.**> * * This program can be distributed under the terms of the GNU GPL. * See the file COPYING. */ include 'globals.php'; include $DOCUMENT_ROOT . '/inc/include.php'; db_connect(config_get('check-database')); content_initialize(); wiki_initialize(); manage_initialize(); security_initialize(); ipc_initialize(); service_initialize(); editor_initialize(); $c = service_by_classname('CSCRSS'); if (count($c) <= 0) { /* Service not found */ die; } /* Get service */ /* Assume needed service is firct in list */ $c = $c[0]; $s = $c->GetService(); header('content-type: application/xhtml+xml'); print '<?xml version="1.0" encoding="utf-8"?>'; ?> <rss version="2.0"> <channel>