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); } } }
* * Helper for executor of IPC commands * * Copyright (c) 2008-2009 Sergey I. Sharybin <*****@*****.**> * * This program can be distributed under the terms of the GNU GPL. * See the file COPYING. */ global $IFACE; if ($IFACE != "SPAWNING NEW IFACE" || $_GET['IFACE'] != '') { print 'HACKERS?'; die; } if ($_ipc_executor_included_ != '#ipc_executor_Included#') { $_ipc_executor_included_ = '#ipc_executor_Included#'; global $ipc, $XPFS; /* Execute IPC command withot including all stuff */ /* Include required stuff */ include $DOCUMENT_ROOT . '/inc/stuff/parsers.php'; include $DOCUMENT_ROOT . '/inc/stuff/linkage.php'; include $DOCUMENT_ROOT . '/inc/config.php'; include $DOCUMENT_ROOT . '/inc/common/config.php'; include $DOCUMENT_ROOT . '/inc/stuff/dbase.php'; include $DOCUMENT_ROOT . '/inc/builtin.php'; include $DOCUMENT_ROOT . '/inc/xpfs.php'; include $DOCUMENT_ROOT . '/inc/stuff/security/user.php'; include $DOCUMENT_ROOT . '/inc/stuff/ipc.php'; db_connect(false); $XPFS = new XPFS(); $XPFS->createVolume(); }