$usersnum++; $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();
/** * 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; } }
kleeja_info($text); } } } ($hook = $plugin->run_hook('end_get_pass')) ? eval($hook) : null; //run hook break; // // add your own code here // // // add your own code here // default: ($hook = $plugin->run_hook('default_usrcp_page')) ? eval($hook) : null; //run hook kleeja_error($lang['ERROR_NAVIGATATION']); break; } #end switch ($hook = $plugin->run_hook('end_usrcp_page')) ? eval($hook) : null; //run hook #no template, no title, set them to default $current_title = empty($current_title) ? $lang['USERS_SYSTEM'] : $current_title; $current_template = empty($current_template) ? 'info.php' : $current_template; #header kleeja_header($current_title, $extra_code_in_header); #page template include get_template_path($current_template); #footer kleeja_footer();
} else { //file not exists ($hook = $plugin->run_hook('not_exists_qr_downlaod_file')) ? eval($hook) : null; //run hook kleeja_error($lang['FILE_NO_FOUNDED']); } ($hook = $plugin->run_hook('b4_showsty_downlaod_id_filename')) ? eval($hook) : null; //run hook //add http reffer to session to prevent errors with some browsers ! if (ig('filename')) { $_SESSION['HTTP_REFERER'] = $config['siteurl'] . ($config['mod_writer'] ? "downloadf" . $fname . ".html" : "do.php?filename=" . $fname); } else { $_SESSION['HTTP_REFERER'] = $config['siteurl'] . ($config['mod_writer'] ? "download" . $id . ".html" : "do.php?id=" . $id); } #show the page kleeja_header($title); echo $tpl->display($sty); kleeja_footer(); } else { if (ig('down') || ig('downf') || ig('img') || ig('imgf') || ig('thmb') || ig('thmbf') || ig('downex') || ig('downexf')) { ($hook = $plugin->run_hook('begin_down_go_page')) ? eval($hook) : null; //run hook #must know from where he came ! and stop him if not image if (ig('down') || ig('downf')) { if (!isset($_SERVER['HTTP_REFERER']) || empty($_SERVER['HTTP_REFERER'])) { if (function_exists('getenv')) { $_SERVER['HTTP_REFERER'] = getenv('HTTP_REFERER') ? getenv('HTTP_REFERER') : null; } if (!isset($_SERVER['HTTP_REFERER']) || empty($_SERVER['HTTP_REFERER'])) { if (isset($_SESSION['HTTP_REFERER'])) { $_SERVER['HTTP_REFERER'] = $_SESSION['HTTP_REFERER'];