-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathload.php
More file actions
72 lines (53 loc) · 2.1 KB
/
Copy pathload.php
File metadata and controls
72 lines (53 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
include( "config.php" );
session_start();
if( get_magic_quotes_gpc() )
die( "magic_quotes is enabled, but should not be. <a href='http://bit.ly/86XywY'>Fix that problem</a>." );
define( "SITE_PATH", dirname(__FILE__) . "/" );
define( "SITE_URL", "/" );
define( "API_URL", SITE_URL . "api/" );
define( "STORAGE_PATH", SITE_PATH . "storage/" );
define( "STORAGE_URL", SITE_URL . "storage/" );
define( "IMAGE_PATH", STORAGE_PATH . "images/" );
define( "IMAGE_URL", STORAGE_URL . "images/" );
define( "SYS_PATH", SITE_PATH . "system/" );
define( "SYS_URL", SITE_URL . "system/" );
// System
define( "SYS_MEDIA_URL", SYS_URL . "media/" );
define( "SYS_MEDIA_PATH", SYS_PATH . "media/" );
define( "SYS_TEMPLATE_PATH", SYS_PATH . "templates/" );
define( "INCLUDES_PATH", SYS_PATH . "classes/" );
// User-defined stuff
define( "MEDIA_PATH", SITE_PATH . "user/media/" );
define( "MEDIA_URL", "/user/media/" );
define( "TEMPLATE_PATH", SITE_PATH . "user/templates/" );
// Load third-party classes and functions
include_once( INCLUDES_PATH . "typogrify/smartypants.php" );
include_once( INCLUDES_PATH . "typogrify/typogrify.php" );
include_once( INCLUDES_PATH . "typogrify/markdown.php" );
include_once( INCLUDES_PATH . "wideimage/WideImage.php" );
// Load the functions
include_once( SYS_PATH . "functions.php" );
// Load the classes
include_once( INCLUDES_PATH . "base.php" );
include_once( INCLUDES_PATH . "router.php" );
include_once( INCLUDES_PATH . "db.php" );
include_once( INCLUDES_PATH . "portfolio.php" );
include_once( INCLUDES_PATH . "twig/lib/Twig/Autoloader.php" );
include_once( INCLUDES_PATH . "template.php" );
include_once( INCLUDES_PATH . "cache.php" );
Twig_Autoloader::register();
$loader = new Twig_Loader_Filesystem(array(TEMPLATE_PATH,SYS_TEMPLATE_PATH));
$twig = new Twig_Environment( $loader , array(
'cache' => false,//STORAGE_PATH . "cache/",
'debug' => true,
'auto_reload' => true,
'base_template_class' => 'Template_Extras'
));
// Twig Extras
include_once( SYS_PATH . "twig-extras.php" );
$twig->addExtension(new Twig_Extras());
// Route the request
$router = Router::get_instance();
$router->route();
?>