Example #1
0
<?php

error_reporting(2147483647);
require_once "lib/SpotClassAutoload.php";
require_once "lib/SpotTranslation.php";
#- main() -#
try {
    SpotTranslation::initialize('en_US');
    SpotTiming::enable();
    SpotTiming::start('total');
    SpotTiming::start('settings');
    require_once "settings.php";
    SpotTiming::stop('settings');
    # database object
    $db = new SpotDb($settings['db']);
    $db->connect();
    /*
     * Create the setting object as soon as possible because 
     * we need it for a lot of stuff
     */
    $settings = SpotSettings::singleton($db, $settings);
    /*
     * Disable the timing part as soon as possible because it 
     * gobbles memory
     */
    if (!$settings->get('enable_timing')) {
        SpotTiming::disable();
    }
    # if
    /*
     * The basics has been setup, lets check if the schema needs