public static function display_stylesheets() { $links = array(); if (self::$caching === true || is_array(self::$caching) && in_array(ProjectHelper::env(), self::$caching)) { foreach (self::$stylesheets as $media => $files) { $css_file = '/css/cache/' . substr(md5(serialize($files)), 0, 10) . '.css'; self::check_cache($files, 'css'); $links[] = '<link rel="stylesheet" href="/css/cache/' . self::cache_name($files) . '.css" type="text/css" media="' . $media . '" charset="utf-8" />'; } } else { $links = self::stylesheet_links(); } return implode("\n", $links); }
<?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/inc/env.php')) { include $_SERVER['DOCUMENT_ROOT'] . '/inc/env.php'; } // ============= // = Constants = // ============= define('ROOT', $_SERVER['DOCUMENT_ROOT']); define('PROJECT_NAME', 'toolbox'); // define('GA_ACCTNUM', 'UA-*******-*'); // ======================== // = Database Information = // ======================== switch (ProjectHelper::env()) { case 'development': define('DB_HOST', 'localhost'); define('DB_USER', 'cobalt_toolbox'); define('DB_PASS', 'psswd123'); define('DB_NAME', 'cobalt_toolbox'); break; case 'production': define('DB_HOST', $_ENV['DATABASE_SERVER']); define('DB_USER', $_ENV['DB_USER']); define('DB_PASS', $_ENV['DB_PASS']); define('DB_NAME', $_ENV['DB_NAME']); break; } if (@$db_load !== false) { include ROOT . '/inc/opendb.php'; }