set_base_dir($basedir); $config = $conf_obj->get(); $theme = ( !array_key_exists( 'theme', $config ) || empty($config['theme']) ? 'default' : $config['theme'] ); $themedir = "$basedir/templates/$theme"; if(empty($config)) { # XXX Need to have manual be hosted in repo under sys/admin/manual include( "$themedir/notconfigured.tmpl" ); die(); } $docroot = realpath( __DIR__ ); $nav = ( !empty($_GET['nav'] ) ) ? $_GET['nav'] : ''; $post = ( !empty($_GET['post'] ) ) ? $_GET['post'] : ''; // Not sure if I'll ever really even need to localize (see html tag attrs). ?>
3, 'microblog' => 2, 'fileshare' => 1 ]; $destinations = [ $config['home'], "$docroot/sys/fileshare/showfiles.inc", "$docroot/sys/microblog.inc", "$docroot/sys/blogroll.inc", "$docroot/sys/fileshare/showpost.inc", "$docroot/sys/fileshare/showcode.inc", "$docroot/sys/fileshare/showaudio.inc", "$docroot/sys/fileshare/showvideo.inc", "$docroot/sys/fileshare/showimg.inc", "$docroot/sys/fileshare/showdoc.inc", ]; if ( empty($nav) || $nav == 0 ) { $nav = $home_map[$home]; } if ( $nav === 1 || $nav > 4 ) { $pwd = $post; include 'sys/fileshare/sanitize.inc'; } //Main Content Display Frame goes below include $destinations[$nav]; ?>