'.__('Update').'
'.__('The page should refresh every second. If not, refresh manually.').'
=')) die("This software requires PHP version 5.3.0 at least, yours is ".phpversion()); if (!class_exists('SQLite3')) die("This software requires the SQLite3 PHP extension, and it can't be found on this system!"); libxml_disable_entity_loader(true); // Config and data file locations if (file_exists(__DIR__ . '/../config.php')) { require_once __DIR__ . '/../config.php'; } //else die("Configuration file not found."); if (file_exists(__DIR__ . '/../functions.php')){ require_once __DIR__ . '/../functions.php'; } else die("Functions file not found."); if (!defined('ROOT_DIR')) define('ROOT_DIR', __DIR__); if (!defined('CONFIG_FILE')) define('CONFIG_FILE', ROOT_DIR . '/vvb.ini'); if (!defined('ARTICLES_DB_FILE')) define('ARTICLES_DB_FILE', ROOT_DIR . '/articles.db'); if (!defined('MEDIA_DIR')) define('MEDIA_DIR', ROOT_DIR . '/media'); if (!defined('LOCAL_URL')) { // Automagic URL discover define('LOCAL_URL', 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '')."://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"); } if (!defined('LOCAL_URI')) { // filename define('LOCAL_URI', (basename($_SERVER['SCRIPT_FILENAME']) == 'index.php' ? '' : basename($_SERVER['SCRIPT_FILENAME'])) . '?'); } if (!function_exists('__')) { // Translation? function __($str) { if ($str == '_date_format') return '%A %e %B %Y at %H:%M'; else return $str; } } // ERROR MANAGEMENT class VroumVroum_User_Exception extends Exception {} class VroumVroum_Feed_Exception extends Exception { static public function getXMLErrorsAsString($errors) { $out = array(); foreach ($errors as $error) { $return = $xml[$error->line - 1] . "\n"; $return .= str_repeat('-', $error->column) . "^\n"; switch ($error->level) { case LIBXML_ERR_WARNING: $return .= "Warning ".$error->code.": "; break; case LIBXML_ERR_ERROR: $return .= "Error ".$error->code.": "; break; case LIBXML_ERR_FATAL: $return .= "Fatal Error ".$error->code.": "; break; } $return .= trim($error->message) . "\n Line: ".$error->line . "\n Column: ".$error->column; if ($error->file) { $return .= "\n File: ".$error->file; } $out[] = $return; } return $out; } } error_reporting(E_ALL); function exception_error_handler($errno, $errstr, $errfile, $errline ) { // For @ ignored errors if (error_reporting() === 0) return; throw new ErrorException($errstr, 0, $errno, $errfile, $errline); } function exception_handler($e) { if ($e instanceOf VroumVroum_User_Exception) { echo '
'.$config->site_description.'
'; echo ''.$art['content'].'
'.escape($vvb->getLocalURL($uri)) . '
' : '').' '.__('Article not found.').'