/
index.php
48 lines (39 loc) · 1.34 KB
/
index.php
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
<?php
/* Onpub (TM)
* Copyright (C) 2015 Onpub.com <http://onpub.com/>
* Author: Corey H.M. Taylor <corey@onpub.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2.
*/
/*
This is the Onpub website frontend index file.
See http://onpub.com/index.php?s=8&a=96 for more information.
*/
// Composer autoloader.
require 'vendor/autoload.php';
// Include local config customizations if file exists.
if (file_exists('local/onpub_conf.php')) {
include 'local/onpub_conf.php';
}
// Include default Onpub config. Variables in this file will only be defined
// if their equivalents have not already been defined in the local configuration
// file included above.
include './onpub_conf.php';
if (file_exists($onpub_dir_local . 'OnpubFrontendCustom.php'))
{
// We've found a custom frontend.
include $onpub_dir_local . 'OnpubFrontendCustom.php';
}
if (class_exists('OnpubFrontendCustom') && is_subclass_of('OnpubFrontendCustom', 'OnpubFrontend'))
{
// Custom frontend class is defined and correctly extends standard object.
$onpub_frontend = new OnpubFrontendCustom();
}
else {
// No custom frontend is defined, use standard implementation.
$onpub_frontend = new OnpubFrontend();
}
$onpub_frontend->display();
?>