Beispiel #1
0
        $online_names[$row['name']] = $row['name'];
    }
    #while
    $SQL->freeresult($result);
    //check & update most ever users and vistors was online
    if (empty($config['most_user_online_ever']) || trim($config['most_user_online_ever']) == '') {
        $most_online = $usersnum;
        $on_muoe = time();
    } else {
        list($most_online, $on_muoe) = @explode($config['most_user_online_ever']);
    }
    if ((int) $most_online < $allnumbers || (empty($config['most_user_online_ever']) || trim($config['most_user_online_ever']) == '')) {
        update_config('most_user_online_ever', $usersnum . ':' . time());
    }
    $on_muoe = date('d-m-Y h:i a', $on_muoe);
    if (!$usersnum) {
        $show_online = false;
    }
    ($hook = $plugin->run_hook('if_online_index_page')) ? eval($hook) : null;
    //run hook
}
#allow_online
($hook = $plugin->run_hook('end_index_page')) ? eval($hook) : null;
//run hook
#header
kleeja_header();
#index template
include get_template_path($current_template);
#footer
kleeja_footer();
Beispiel #2
0
/**
 * Show an Error message
 *
 * @param string $text Text that will show as error message
 * @param string $title [optional] Title of the message page
 * @param bool $exit [optional] Stop script after showing the message
 * @param bool|string $redirect [optional] Redirect to given link after message
 * @param int $rs [optional] if $redirect set, then message will be stay those seconds
 * @param string $extra_code_header [optional] extra codes to be included between head tag
 * @param string $style [optional] The template of the inforamtion message
 * @return void
 */
function kleeja_error($text, $title = '', $exit = true, $redirect = false, $rs = 2, $extra_code_header = '', $style = 'error.php')
{
    global $SQL, $plugin;
    #if redirect after showing the message
    if ($redirect) {
        $text .= redirect($redirect, false, $exit, $rs, true);
    }
    ($hook = $plugin->run_hook('kleeja_error_func')) ? eval($hook) : null;
    //run hook
    #header
    kleeja_header($title, $extra_code_header);
    #template
    include get_template_path($style);
    #footer
    kleeja_footer();
    if ($exit) {
        #at end, close sql connections & etc
        garbage_collection();
        exit;
    }
}