//systeme de mise en cache de la page (partie1) $dossier_cache = 'cache/'; $secondes_cache = 60 * 60 * 24; // 24 heures $url_cache = Securite::bdd($_SERVER['HTTP_HOST']) . Securite::bdd($_SERVER['REQUEST_URI']); $fichier_cache = $dossier_cache . md5($url_cache) . '.cache'; $fichier_cache_existe = @file_exists($fichier_cache) ? @filemtime($fichier_cache) : 0; if ($fichier_cache_existe > time() - $secondes_cache) { @readfile($fichier_cache); exit; } ob_start(); //fin de la mise en cache fin (partie1) include "header.php"; require "themes/header_theme.php"; $royaume = royaume($_GET['royaume']); mysql_connect($characters[$royaume]['host'], $characters[$royaume]['user'], $characters[$royaume]['password']) or die(mysql_error()); mysql_select_db($characters[$royaume]['db']) or die(mysql_error()); $id = Securite::bdd($_GET['perso']) or Securite::bdd($_POST['perso']); $perso = $id; if (empty($id)) { echo "<p>Erreur : Aucun nom/id de personnage détecté !</p>"; echo "<p><a href=\"index.php\">Retour</a></p>"; } else { if (isset($id)) { //test si iduser existe $reponse = mysql_query("SELECT COUNT(*) AS nombre FROM `characters` WHERE `name`='{$perso}' OR `guid`='{$perso}'") or die(mysql_error()); $donnees = mysql_fetch_array($reponse); $test = Securite::bdd($donnees['nombre']); if ($test == 0) { echo "<p>Il n'y a aucun personnage qui a ce nom ou cet ID !!!</p>";
<?php if (empty($securite) or !isset($securite) or $securite != "ok") { header("location: erreur.php?err=access_denied"); } $royaume = royaume(Securite::get($_GET['royaume'])); include "kernel/id_tab.php"; echo "<p class=\"title\">{$titre_connecter}</p>"; mysql_connect($realmd['host'], $realmd['user'], $realmd['password']) or die(mysql_error()); mysql_select_db($realmd['db']) or die(mysql_error()); $reponse = mysql_query("SELECT * FROM `realmlist`") or die(mysql_error()); mysql_close(); while ($donnees = mysql_fetch_array($reponse, MYSQL_ASSOC)) { mysql_connect($characters[$donnees['id']]['host'], $characters[$donnees['id']]['user'], $characters[$donnees['id']]['password']) or die(mysql_error()); mysql_select_db($characters[$donnees['id']]['db']) or die(mysql_error()); $reponse2 = mysql_query("SELECT COUNT(*) AS nombre FROM characters WHERE online= 1") or die(mysql_error()); $donnees2 = mysql_fetch_array($reponse2); $online = $donnees2['nombre']; mysql_close(); echo "<b><a href=\"index.php?module=connectes&royaume=" . $donnees['id'] . "\">Il y a {$online} joueurs connectés sur : " . $donnees['name'] . "</a></b><br>"; } echo "<br />"; mysql_connect($characters[$royaume]['host'], $characters[$royaume]['user'], $characters[$royaume]['password']) or die(mysql_error()); mysql_select_db($characters[$royaume]['db']) or die(mysql_error()); if ($gm_visible_list == 1) { $reponse2 = mysql_query("SELECT c.guid,c.name,c.race,c.class,c.zone,c.map,c.gender,c.level,r.gmlevel,\n\t\tCAST( SUBSTRING_INDEX(SUBSTRING_INDEX(c.data, ' ', " . (CHAR_DATA_OFFSET_ARENA_POINTS + 1) . "), ' ', -1) AS UNSIGNED) AS highest_rank,\n\t\tCAST( SUBSTRING_INDEX(SUBSTRING_INDEX(c.data, ' ', " . (CHAR_DATA_OFFSET_GUILD_ID + 1) . "), ' ', -1) AS UNSIGNED) as GNAME\n\t\tFROM " . $characters[$royaume]['db'] . ".characters c LEFT OUTER JOIN " . $realmd['db'] . ".account r ON r.id=c.account\n\t\tWHERE c.online = 1"); } else { $reponse2 = mysql_query("SELECT c.guid,c.name,c.race,c.class,c.zone,c.map,c.gender,c.level,r.gmlevel,\n\t\tCAST( SUBSTRING_INDEX(SUBSTRING_INDEX(c.data, ' ', " . (CHAR_DATA_OFFSET_ARENA_POINTS + 1) . "), ' ', -1) AS UNSIGNED) AS highest_rank,\n\t\tCAST( SUBSTRING_INDEX(SUBSTRING_INDEX(c.data, ' ', " . (CHAR_DATA_OFFSET_GUILD_ID + 1) . "), ' ', -1) AS UNSIGNED) as GNAME\n\t\tFROM " . $characters[$royaume]['db'] . ".characters c LEFT OUTER JOIN " . $realmd['db'] . ".account r ON r.id=c.account\n\t\tWHERE c.online = 1 AND r.gmlevel = 0"); } echo "\n\t<table class=\"lined\" style=\"border-collapse: collapse\"; width=\"99%\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\" align=\"center\" class=\"sortable\">\n\t<tr>\n\t<th width=\"120\">" . $lang_player['name'] . "</th>\n\t<th width=\"30\">" . $lang_player['race'] . "</th>\n\t<th width=\"30\">" . $lang_player['class'] . "</th>\n\t<th width=\"30\">" . $lang_player['level'] . "</th>\n <th width=\"30\">" . $lang_player['rank'] . "</th>\n\t<th width=\"30\">" . $lang_player['faction'] . "</th>\n\t<th width=\"200\">" . $lang_player['guilde'] . "</th>\n\t<th width=\"80\">" . $lang_player['map'] . "</th>\n\t<th width=\"250\">" . $lang_player['zone'] . "</th>\n\t</tr>"; $reponse5 = mysql_query("SELECT COUNT(*) AS nombre FROM characters WHERE online= 1") or die(mysql_error());
<?php session_start(); ######################################################################################### # COPYRIGHT: Module original POMM Created by mirage666 (c) (mailto:mirage666@pisem.net icq# 152263154) adapter pour coolWoW par CiRvEnT # ######################################################################################### if (empty($securite) or !isset($securite) or $securite != "ok") { header("location: erreur.php?err=access_denied"); } $royaume = (require_once "kernel/config.php"); require_once "kernel/map_fonc.php"; require_once "lang/french.php"; require_once "kernel/fonctions.php"; $_SESSION['royaume'] = royaume(Securite::get($_GET['royaume'])); ?> <SCRIPT LANGUAGE="javascript" TYPE="text/javascript"> var current_map = 0; var time = <?php echo $time; ?> ; var show_time=<?php echo $show_time; ?> ; var show_status=<?php echo $show_status; ?> ; var maps_count = <?php