Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (29 sloc) 1.02 KB
<?php
/**
* Plures Multi Website Analytics (Main Interface file)
*
* @version 1.3
* @author João Ferreira <jflei@sapo.pt>
* @copyright (c) 2017, João Ferreira
*/
error_reporting(E_ALL);
# Include database connection details / Advanced Settings
include_once rtrim(__DIR__, '/') . '/includes/plures.settings.php';
# Include templates
include_once rtrim(__DIR__, '/') . '/includes/plures.templates.php';
# Include functions file
include_once rtrim(__DIR__, '/') . '/includes/plures.functions.php';
# Autoload classes
function my_autoloader($class_name) {
$target_file = strtolower(str_replace('Plures', '', $class_name));
include_once rtrim(__DIR__, '/') . '/includes/plures.' . $target_file . '.class.php';
}
spl_autoload_register('my_autoloader');
# Initiate session to store unique visits and form messages
session_start();
# Initiate database class
$pl_mysqli = new PluresMysqlDb($pl_templates);
# Load interface
$pl_interface = new PluresInterface($pl_mysqli, $pl_templates, __DIR__);
$pl_interface->printIndex();
?>