Beispiel #1
0
function generate_all($userid)
{
    global $db;
    $query = $db->prepare('SELECT MAX(date) AS latest FROM summary WHERE userid = :userid');
    $query->execute(array(':userid' => $userid));
    $result = $query->fetchAll(PDO::FETCH_ASSOC);
    $latest = $result[0]['latest'];
    unset($query, $result);
    generate_status($userid, $latest);
    generate_summary($userid);
    generate_common_words($userid, $latest);
    generate_chapters($userid);
}
Beispiel #2
0
 * @copyright Elkarte Forum contributors
 *
 * Forum slow? Having  performance problems?  This little blue pill will assist in finding the problem!
 *
 * This software is a derived product, based on:
 *
 * Simple Machines Forum (SMF)
 * copyright:	2011 Simple Machines (http://www.simplemachines.org)
 * license:  	BSD, See included LICENSE.TXT for terms and conditions.
 *
 * @version 1.0 Alpha
 */
// @todo eAccelerator, etc.?
initialize_inputs();
$command_line = php_sapi_name() === 'cli' && empty($_SERVER['REMOTE_ADDR']);
generate_status();
/**
 * Gets things started
 */
function initialize_inputs()
{
    global $db_prefix, $db_show_debug;
    // Turn off magic quotes runtime and enable error reporting.
    @set_magic_quotes_runtime(0);
    error_reporting(E_ALL);
    $db_show_debug = false;
    // All the places we may be running from (commonly)
    $possible = array(dirname(__FILE__), dirname(dirname(__FILE__)), dirname(dirname(dirname(__FILE__))), dirname(__FILE__) . '/forum', dirname(__FILE__) . '/forums', dirname(__FILE__) . '/community', dirname(dirname(__FILE__)) . '/forum', dirname(dirname(__FILE__)) . '/forums', dirname(dirname(__FILE__)) . '/community');
    // Try to find ourself
    foreach ($possible as $dir) {
        if (@file_exists($dir . '/SSI.php')) {