public function __construct() { $this->user_interface = cfRead('Default Interface'); $this->path_system = root . 'Resources/Interfaces/' . $this->user_interface . '/'; $this->path_web = www . 'Resources/Interfaces/' . $this->user_interface . '/'; require $this->path_system . 'Configuration.php'; $this->configuration = $interface_configuration; unset($interface_configuration); $this->content = null; $this->content_override = null; $this->interface = $this->configuration['interface']; $this->interface_override = $this->configuration['interface_override']; $this->interface_login_window = $this->configuration['login_window']; $this->interface_keys = array_merge(cfRead('Interface Keys'), $this->configuration['interface_keys']); $this->title_template = cfRead('Title Template'); $this->title_system = cfRead('System Title'); $this->title_application = null; $this->tagline = cfRead('System Tagline'); $this->description = cfRead('System Description'); $this->keywords = cfRead('System Keywords'); $this->favicon = priority_select(cfRead('System Favicon'), $this->path_web . 'Images/' . $this->configuration['favicon'], www . 'Resources/Interfaces/System/Images/Favicon.png'); $this->iphoneicon = priority_select(cfRead('System iPhone Icon'), $this->path_web . 'Images/' . $this->configuration['iphoneicon'], www . 'Resources/Interfaces/System/Images/iPhoneIcon.png'); $this->page_type = normal; $this->mannagedUI = true; $this->sidebars = array(); $this->javascript = array(); $this->javascript['head']['user'] = array(); $this->javascript['body']['user'] = array(); $this->javascript['head']['include'] = array(); $this->javascript['body']['include'] = array(); $this->javascript['onload'] = array(); $this->notifications = array(); if (file_exists($this->path_system . 'Templates.php')) { require $this->path_system . 'Templates.php'; $interface_templates = $templates; unset($templates); require root . 'Resources/Interfaces/System/Templates.php'; $system_templates = $templates; unset($templates); $this->templates = array_merge($interface_templates, $system_templates); } else { require root . 'Resources/Interfaces/System/Templates.php'; $this->templates = $templates; unset($templates); } $this->avatar_small = priority_select($this->path_web . 'Images/' . $this->configuration['avatar_small'], www . 'Resources/Interfaces/System/Images/Avatars/Small.png'); $this->avatar_medium = priority_select($this->path_web . 'Images/' . $this->configuration['avatar_medium'], www . 'Resources/Interfaces/System/Images/Avatars/Medium.png'); $this->avatar_large = priority_select($this->path_web . 'Images/' . $this->configuration['avatar_large'], www . 'Resources/Interfaces/System/Images/Avatars/Large.png'); }
public static function Initialize() { /* Setup Registry */ self::$_database = new Database(); self::$_configuration = new Configuration(); self::$_interface = new InterfaceHandler(); self::$_authority = new Authority(); self::$_user = new User(); /* Set base values and cleanup */ crunch($_GET['app']); crunch($_GET['arg']); self::$application = priority_select($_GET['app'], cfRead('Default Application'), 'System'); exMethod('System: _application = ' . self::$application); self::$arg = $_GET['arg']; }
public function __construct() { $args = eoargs(func_get_args()); $this->read_only = false; if (isset($args['clone'])) { $_page = new Page($args['clone']); if (!is_null($_page->id)) { $this->id = $_page->id; $this->name = $_page->name; $this->content = $_page->content; $this->author = $_page->author; } else { exLog("BlankPage->__construct(): Failed to clone from id {$args['clone']}"); } } $this->{$id} = appPagesGenerateKey(); $this->name = $args['name']; $this->ref_name = crunch($args['name'], true); $this->content = $args['content']; if (is_string($args['author']) and strlen($args['author'] == 32)) { $args['author'] = new User($args['author']); } if (is_object($args['author']) and isset($args['author']->id)) { $this->author = $args['author']; } $this->date_modified = $this->date_created = date(sdfDay); $this->draft = priority_select($args['draft'], false); // Is this needed? $draft = $this->draft ? '1' : '0'; query(SharedPage::$statements['create'], $this->id, $this->name, $this->ref_name, $this->content, $this->author->id, $this->date_modified, $this->date_created, $draft); $__this = query(SharedPage::$statements['is_page'], $this->id); if (is_resource($__this) and mysql_num_rows($__this) > 0) { $_this = mysql_fetch_assoc($__this); $this->ref_id = $_this['ref_id']; } }
<?php # Preferences Application if (isset($_GET['arg'])) { $_GET['arg'] = 'system'; } crunch($_GET['arg'], null); foreach (fsGetPreferences() as $p_item) { include $p_item . 'Info.php'; $path_parts = pathinfo($p_item); $link_name = $path_parts['basename']; $preferences[] = array('name' => priority_select($preferences['name'], $link_name), 'link' => parseLink("ex://Preferences/{$link_name}")); }