2007-04-16 11:58:25 +00:00
|
|
|
<?php
|
2007-08-05 22:18:28 +00:00
|
|
|
define("DEBUG", false);
|
2007-08-14 03:17:50 +00:00
|
|
|
define("VERSION", '2.1-rc2');
|
2007-07-06 17:02:52 +00:00
|
|
|
|
|
|
|
if(DEBUG) {
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
assert_options(ASSERT_ACTIVE, 1);
|
|
|
|
assert_options(ASSERT_BAIL, 1);
|
|
|
|
}
|
2007-04-16 11:58:25 +00:00
|
|
|
|
|
|
|
if(version_compare(PHP_VERSION, "5.0.0") == -1) {
|
|
|
|
print <<<EOD
|
|
|
|
Currently Shimmie 2 doesn't support versions of PHP lower than 5.0.0. Please
|
|
|
|
either upgrade your PHP, or tell Shish that PHP 4 support is a big deal for
|
|
|
|
you...
|
|
|
|
<!--
|
|
|
|
This version of Shimmie does not support versions lower than 5.0.0, however
|
|
|
|
you can create a version that does by using the u_create_monolith.php script.
|
|
|
|
This will read all the files in core/, events/ and ext/, strip the PHP 5 bits
|
|
|
|
out, and write a file called monolith.php. Monolith contains all the core
|
|
|
|
Shimmie code (not themes or config files), and can be used as a replacement
|
|
|
|
for index.php.
|
|
|
|
-->
|
|
|
|
EOD;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2007-05-07 15:04:46 +00:00
|
|
|
$files = array_merge(glob("core/*.php"), glob("core/*/*.php"), glob("ext/*/main.php"));
|
2007-04-16 11:58:25 +00:00
|
|
|
|
|
|
|
foreach($files as $filename) {
|
|
|
|
require_once $filename;
|
|
|
|
}
|
|
|
|
|
|
|
|
$database = new Database();
|
2007-07-12 07:26:50 +00:00
|
|
|
$database->db->fnExecute = '_count_execs';
|
2007-07-28 13:53:31 +00:00
|
|
|
$config = new Config($database);
|
2007-06-30 01:19:11 +00:00
|
|
|
$_theme = $config->get_string("theme", "default");
|
2007-10-22 00:04:41 +00:00
|
|
|
if(!file_exists($_theme)) $_theme = "default";
|
2007-06-30 01:19:11 +00:00
|
|
|
require_once "themes/$_theme/page.class.php";
|
|
|
|
require_once "themes/$_theme/layout.class.php";
|
|
|
|
require_once "themes/$_theme/themelet.class.php";
|
2007-08-23 11:14:03 +00:00
|
|
|
$themelets = array_merge(glob("ext/*/theme.php"), glob("themes/$_theme/*.theme.php"));
|
|
|
|
foreach($themelets as $filename) {
|
|
|
|
require_once $filename;
|
|
|
|
}
|
2007-04-16 11:58:25 +00:00
|
|
|
$page = new Page();
|
2007-07-12 07:33:53 +00:00
|
|
|
$user = _get_user();
|
2007-04-16 11:58:25 +00:00
|
|
|
send_event(new InitExtEvent());
|
2007-08-24 22:29:34 +00:00
|
|
|
send_event(_get_page_request($page, $user));
|
2007-04-16 11:58:25 +00:00
|
|
|
$page->display();
|
|
|
|
?>
|