$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()); $donnees5 = mysql_fetch_array($reponse5); $test_online = $donnees5['nombre']; if ($test_online == 0) { echo "<tr><td colspan=\"9\">" . $lang_player['no_online'] . "</td></tr>"; } else { while ($char = mysql_fetch_array($reponse2)) { 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()); $reponse4 = mysql_query("SELECT name FROM guild WHERE guildid=" . $char['GNAME'] . ";"); $guild_name = mysql_fetch_row($reponse4); echo "\n\t\t\t<tr>\n\t\t\t\t<td align=\"center\"><a href=\"armurerie-select.php?perso=" . $char['name'] . "\">" . $char['name'] . "</a></td>\n\t\t\t\t<td align=\"center\"><img src='images/races/" . $char['race'] . "-" . $char['gender'] . ".gif' onmousemove='toolTip(\"" . get_player_race($char['race']) . "\",\"item_tooltip\")' onmouseout='toolTip()' /></td>\n\t\t\t\t<td align=\"center\"><img src='images/classes/" . $char['class'] . ".gif' onmousemove='toolTip(\"" . get_player_class($char['class']) . "\",\"item_tooltip\")' onmouseout='toolTip()' /></td>\n\t\t\t\t<td align=\"center\">" . $char['level'] . "</td>\n\t\t\t\t<td align=\"center\"><span onmouseover='toolTip(\"" . $CHAR_RANK[$CHAR_RACE[$char['race']][1]][pvp_ranks($char['highest_rank'])] . "\",\"item_tooltip\")' onmouseout='toolTip()' style='color: white;'><img src='images/ranks/rank" . pvp_ranks($char['highest_rank'], $CHAR_RACE[$char['race']][1]) . ".gif'></span></td>\n\t\t\t\t<td align=\"center\"><span onmousemove='toolTip(\"" . $CHAR_FACTION[$char['race']] . "\",\"item_tooltip\")' onmouseout='toolTip()'>"; side($char['race']); echo "</span></td>\n\t\t\t\t<td align=\"center\"><a href=\"index.php?module=guildes&action=membres&id=" . $char['guid'] . "\">" . $guild_name[0] . "</a></td>\n\t\t\t\t<td align=\"center\">" . get_map_name($char['map']) . "</td>\n\t\t\t\t<td align=\"center\">" . get_zone_name($char['zone']) . "</td>\n\t\t\t</tr>"; } } echo "</table><br />";
function partitionSides($a, $b, $points) { return array(array_values(array_filter($points, function ($p) use($a, $b) { if ($p == $a || $p == $b) { return false; } return side($a, $b, $p) >= 0.0; })), array_values(array_filter($points, function ($p) use($a, $b) { if ($p == $a || $p == $b) { return false; } return side($a, $b, $p) < 0.0; }))); }
while ($donnees = mysql_fetch_array($reponse, MYSQL_ASSOC)) { $level = explode(' ', Securite::html($donnees['data'])); $niveau = $level[53]; $name = Securite::html($donnees['name']); $sex = explode(' ', Securite::html($donnees['data'])); $sex = dechex($sex[36]); $sex = str_pad($sex, 8, 0, STR_PAD_LEFT); $sex = $sex[3]; echo "<tr><td align=\"center\">"; echo "<a href=\"armurerie-select.php?perso=" . $name . "\">" . $name . "</a>"; echo "</td><td align=\"center\">"; echo $niveau; echo "</td><td align=\"center\">"; imgrace(Securite::html($donnees['race'])); echo "</td><td align=\"center\">"; imgclass(Securite::html($donnees['class'])); echo "</td><td align=\"center\">"; sex($sex); echo "</td><td align=\"center\">"; side(Securite::html($donnees['race'])); echo "</td></tr>"; } } echo "</TABLE>"; pagination($ParPage, $total, $truc, $adresse); } else { echo "<p>Cette page n'existe pas !</p>"; echo "<a href=\"index.php?module=guildes\">Retour</a>"; } break; }
function pointInTriangle($x, $y, $x1, $y1, $x2, $y2, $x3, $y3) { return side($x, $y, $x1, $y1, $x2, $y2, $x3, $y3) && side($x, $y, $x1, $y1, $x3, $y3, $x2, $y2) && side($x, $y, $x3, $y3, $x2, $y2, $x1, $y1); }