function __construct($base_url, Router $router, Config $config, $default_version = '') { $this->router = $router; $this->config = $config; parent::__construct($base_url, $default_version); $this->add('bootstrap', $router->admin_url('/core/theme/asset/bootstrap/core/css/bootstrap.min.css'), array(), '2.2.1'); $this->add('bootstrap-responsive', $router->admin_url('/core/theme/asset/bootstrap/core/css/bootstrap-responsive.min.css'), array('bootstrap'), '2.2.1'); $this->add('bootstrap-datepicker', $router->admin_url('/core/theme/asset/bootstrap/datepicker/css/datepicker.css'), array('bootstrap')); $this->add('bootstrap-wysihtml5', $router->admin_url('/core/theme/asset/bootstrap/wysihtml5/css/bootstrap-wysihtml5.css'), array('bootstrap')); $this->add('jquery-fileupload', $router->admin_url('/core/theme/asset/css/jquery.fileupload-ui.css'), array(), '6.10'); }
function __construct($base_url, Router $router, Config $config, $default_version = '') { $this->router = $router; $this->config = $config; parent::__construct($base_url, $default_version); $min = $this->config->debug ? '' : '.min'; $this->add('wysihtml5', $router->admin_url('/core/theme/asset/bootstrap/wysihtml5/js/wysihtml5' . $min . '.js'), array(), '0.3.0'); $this->add('jquery', $router->admin_url('/core/theme/asset/js/jquery' . $min . '.js'), array(), '1.10.2'); $this->add('jquery-ui-widget', $router->admin_url('/core/theme/asset/js/jquery.ui.widget' . $min . '.js'), array('jquery'), '1.10.3'); $this->add('jquery-iframe-transport', $router->admin_url('/core/theme/asset/js/jquery.iframe-transport' . $min . '.js'), array('jquery'), '1.7'); $this->add('jquery-fileupload', $router->admin_url('/core/theme/asset/js/jquery.fileupload' . $min . '.js'), array('jquery'), '5.32.2'); $this->add('bootstrap', $router->admin_url('/core/theme/asset/bootstrap/core/js/bootstrap' . $min . '.js'), array(), '2.3.2'); $this->add('bootstrap-datepicker', $router->admin_url('/core/theme/asset/bootstrap/datepicker/js/bootstrap-datepicker' . $min . '.js'), array('bootstrap'), '2013-03-12'); $this->add('bootstrap-wysihtml5', $router->admin_url('/core/theme/asset/bootstrap/wysihtml5/js/bootstrap-wysihtml5' . $min . '.js'), array('bootstrap'), '2013-04-29'); $this->add('md5', $router->admin_url('/core/theme/asset/js/md5' . $min . '.js'), array()); }
function __construct($admin_path) { $this->check_magic_quotes(); require $admin_path . '/core/library/config.php'; $config = $this->config = new Config($admin_path); require $config->library_path . '/string.php'; require $config->library_path . '/file.php'; spl_autoload_register(array($this, 'autoload')); $is_config_loaded = $this->config->load(); $this->setup_error_reporting(); if (!$is_config_loaded) { $router = new Router($config, null, '/setup/install/'); } else { $router = new Router($config); } $hook = new Hook(); $admin_script = new Admin\Scripts($router->admin_url, $router, $config); $admin_style = new Admin\Styles($router->admin_url, $router, $config); $hook->add('admin_head', array($admin_style, 'do_items'), 0, 10); $hook->add('admin_head', array($admin_script, 'do_head_items'), 0, 10); $hook->add('admin_footer', array($admin_script, 'do_footer_items'), 0, 100); $settings = new Settings($config); $router->settings = $settings; $active_template = $settings->get_template_about(); $template_script = new Template\Scripts('', $router, $config, $active_template['version']); $template_style = new Template\Styles('', $router, $config, $active_template['version']); $hook->add('head', array($template_style, 'do_items'), 0, 10); $hook->add('head', array($template_script, 'do_head_items'), 0, 10); $hook->add('footer', array($template_script, 'do_footer_items'), 0, 100); $user = new User($config, $router); $view = new View($config, $router, $hook); if ($settings->get('connection', 'type') && 'direct' != $settings->get('connection', 'type')) { $class_name = Filesystem::get_class_name($settings->get('connection', 'type')); $filesystem = new $class_name($config, array('connection_type' => $settings->get('connection', 'type'), 'hostname' => $settings->get('connection', 'hostname'), 'username' => $settings->get('connection', 'username'), 'password' => $settings->get('connection', 'password'))); } else { $filesystem = new Filesystem\Direct($config); } $addon = new Addon($config, $settings, $hook, $admin_script, $admin_style, $template_script, $template_style, $filesystem, $router); $addon->load_active(); $content = new Content($config, $filesystem, $router, $settings, $hook); $template = new Template($config, $filesystem, $router, $settings, $hook, $template_script, $template_style, $content); $router->parse_request_url(); $router->set_controller_class(); $controller_class = $router->controller_class; $controller = new $controller_class($router, $view, $filesystem, $config, $user, $template, $settings, $hook, $content, $addon); if (!$user->is_logged_in() && !$controller->is_no_auth_action()) { Router::redirect($router->admin_url('/user/login/')); exit; } $controller->call_action(); }