forked from b2evolution/b2evolution
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
69 lines (58 loc) · 2.43 KB
/
index.php
File metadata and controls
69 lines (58 loc) · 2.43 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
<?php
/**
* This is the main public interface file. It will try to detect which collection is being requested
* or display the default collection. If there is none, it will call default.php.
*
* ---------------------------------------------------------------------------------------------------------------
* IF YOU ARE READING THIS IN YOUR WEB BROWSER, IT MEANS THAT YOU DID NOT LOAD THIS FILE THROUGH A PHP WEB SERVER.
* TO GET STARTED, GO TO THIS PAGE: http://b2evolution.net/man/getting-started
* ---------------------------------------------------------------------------------------------------------------
*
* This file is NOT mandatory. You may replace it with one or several stub files.
* More info: {@link http://b2evolution.net/man/stub-file}
*
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/gnu-gpl-license}
* @copyright (c)2003-2016 by Francois Planque - {@link http://fplanque.com/}
*
* @package main
*/
/**
* First thing: Do the minimal initializations required for b2evo:
*/
require_once dirname(__FILE__).'/conf/_config.php';
require_once $inc_path.'_main.inc.php';
$Timer->resume('index.php');
if( ! isset($collections_Module) )
{ // The evocore framework is not used as a blog app here / we don't know how to display a public interface...
header_redirect( 'admin.php', 302 );
exit(0);
}
// initialize which blog should be displayed, and display default page if blog could not be initialized
if( !init_requested_blog( false ) )
{ // No specific blog to be displayed:
if( $Settings->get( 'default_blog_ID' ) == -1 )
{ // we are going to display the admin page:
if( ! is_logged_in() )
{ // user must be logged in and his/her account must be validated before access to admin:
$login_required = true;
$validate_required = true;
require $inc_path.'_init_login.inc.php';
}
require dirname(__FILE__).'/admin.php';
}
else
{ // we are going to display the default page:
require dirname(__FILE__).'/default.php';
}
exit();
}
// A blog has been requested... Let's set a few default params:
# You could *force* a specific skin here with this setting:
# $skin = 'basic';
# Additionnaly, you can set other values (see URL params in the manual)...
# $order = 'ASC'; // This for example would display the blog in chronological order...
$Timer->pause('index.php');
// That's it, now let b2evolution do the rest! :)
require $inc_path.'_blog_main.inc.php';
?>