function afficherAvatarListe() { $lesTrolls = selectDbTrolls("", ID_GUILDE); $nbTrolls = count($lesTrolls); echo "<br><br>"; echo "<table style='background-color:#6f7ca2;' class='fiche'>"; echo "<tr><th>Avatar actuel sur pipeshow</th>"; echo "<th>Nom</th>"; echo "<th>Nom Avatar</th>"; echo "<th>Niveau</th>"; echo "<th>Rang</th>"; echo "<th></th></tr>"; for ($i = 1; $i <= $nbTrolls; $i++) { $res = $lesTrolls[$i]; $img = "http://www.pipeshow.net/RM/avatars/complets/" . $res[nom_image_troll] . "_avatar.gif"; echo "<tr><td><img src='{$img}'></td>"; echo "<td>" . stripslashes($res[nom_troll]) . "({$res['id_troll']})"; afficherLien("troll", "fiche", $res[id_troll]); afficherLien("troll", "mh_profil", $res[id_troll]); echo "</td>"; echo "<td>"; if ($res[nom_image_troll] == "") { echo "<b><font color='red'>Nom image non Renseigné RG</font></b>"; } else { echo $res[nom_image_troll]; } echo "<td>"; echo "<td>{$res['niveau_troll']}</td>"; echo "<td>{$res['nom_rang_troll']}</td>"; echo "<td><img src='images/avatars/cache/{$res['nom_image_troll']}_avatar.gif'><br><a href='engine_view.php?avatar={$res['id_troll']}'>Générer</a></td>"; echo "</tr>"; } echo "</table>"; }
function afficheInfosWanted($id_troll, $nom_troll, $race_troll, $niveau_troll, $x_troll, $y_troll, $z_troll, $date_troll) { $lesGriefs = selectDbGriefs($id_troll); $nbGriefs = count($lesGriefs); $text .= "<center><h3><font color=red>{$nom_troll} N° {$id_troll}</font><font color=white> {$race_troll} ({$niveau_troll})</font></h3>"; $text .= "<font color=white>Position : X={$x_troll}, Y={$y_troll}, Z={$z_troll} ({$date_troll})</font><br>"; $text .= afficherLien("troll", "fiche", $id_troll, $x_troll, $y_troll, $z_troll, "[RG]", false); $text .= afficherLien("troll", "mh_evenements", $id_troll, $x_troll, $y_troll, $z_troll, "[MH]", false); $text .= afficherLien("troll", "vue2d", $id_troll, $x_troll, $y_troll, $z_troll, "[Vue2d]", false); $text .= afficherLien("troll", "gps", $id_troll, $x_troll, $y_troll, $z_troll, "[GPS]", false); $text .= "</center><br>"; $text .= "<center><b><font color=red>Liste des Griefs</font></b></center><font color=white>"; for ($i = 1; $i <= $nbGriefs; $i++) { $res = $lesGriefs[$i]; $lesTrolls = selectDbTrolls($res[troll_impacte]); $troll_impacte = $lesTrolls[1]; $text .= "{$res['type']} : le {$res['date_grief']}"; $text .= " sur " . htmlentities($troll_impacte[nom_troll]) . " ({$troll_impacte['id_troll']}) : <br>"; $text .= htmlentities(trim($res[description])) . "<br>"; } $lesVengeances = selectDbVengeances($id_troll); $nbVengeances = count($lesVengeances); $text .= "</font><center><b><font color=green>Liste des Châtiements</font></b></center><font color=white>"; for ($i = 1; $i <= $nbVengeances; $i++) { $res = $lesVengeances[$i]; $lesTrolls = selectDbTrolls($res[troll_vengeur]); $troll_vengeur = $lesTrolls[1]; $text .= "Le {$res['date_vengeance']}"; $text .= " par {$troll_vengeur['nom_troll']} ({$troll_vengeur['id_troll']}) : <br>"; $text .= htmlentities(trim($res[description])) . "<br>"; } $text .= "</font>"; $text = str_replace("\r\n", "<br>", $text); $text = addslashes($text); echo " onmouseover=\"return overlib('<font color=red> <b>Cliquez là où vous êtes !</b></font> <br>{$text}');\" "; echo " onclick=\"return overlib('{$text}', STICKY, CAPTION, 'Informations',CLOSECLICK, EXCLUSIVE);\" "; echo " onmouseout=\"return nd();\""; }
function afficherAccesRapide() { $fiche = "<a href='/engine_view.php?troll=" . $_SESSION['AuthTroll'] . "' title='Accès direct à ma fiche RG'>[Ma fiche RG]</a> "; if (!preg_match("/cockpit.php/", $_SERVER['REQUEST_URI'])) { $fiche .= "<a href='/cockpit.php?id_troll=" . $_SESSION['AuthTroll'] . "' title='Accès direct à ma vue2D'>[Ma Vue]</a> "; } else { $fiche .= "<a href='#' onClick='document.form_cockpit.id_troll.value=" . $_SESSION[AuthTroll] . ";get_map();'title='Accès direct à ma vue2D'>[Ma Vue]</a> "; } $lesGowaps = selectDbGowaps("", $_SESSION['AuthTroll']); $nbGowaps = count($lesGowaps); if ($nbGowaps > 0) { $text = "<b>Mes Gowaps</b><br><br>"; for ($i = 1; $i <= $nbGowaps; $i++) { $res = $lesGowaps[$i]; $id_gowap = $res['id_gowap']; $text .= "Gowap {$id_gowap}"; $titre = "X={$res['x_monstre']}, Y={$res['y_monstre']}, Z={$res['z_monstre']}<br>"; $titre .= "vu : {$res['is_seen_monstre']} (" . date("d/m/y H:i", $res['date_monstre']) . ")"; $text .= afficherLien('gowap', 'fiche', $res['id_gowap'], "", "", "", "", false); $text .= afficherLien('gowap', 'vue2d', $res['id_gowap'], $res['x_monstre'], $res['y_monstre'], $res['z_monstre'], "", false); $text .= afficherLien('gowap', 'gps', $res['id_gowap'], $res['x_monstre'], $res['y_monstre'], $res['z_monstre'], "", false); $text .= afficherLien('gowap', 'mh_evenements', $res['id_gowap'], "", "", "", "", false); $text .= "<br>" . $titre; $text .= "<br><br>"; } $html_gowap = "<td onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup!');\""; $html_gowap .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, 'Accès Rapide', CLOSECLICK, EXCLUSIVE);\" "; $html_gowap .= " onmouseout=\"return nd();\">Mes Gowaps</td>"; } if (!isset($html_gowap)) { $html_gowap = ""; } $lesTanieres = selectDbTanieres("", $_SESSION['AuthTroll']); $nbTanieres = count($lesTanieres); $html_taniere = ""; if ($nbTanieres > 0) { $text = "<b>Mes Tanières</b><br><br>"; for ($i = 1; $i <= $nbTanieres; $i++) { $res = $lesTanieres[$i]; $id_taniere = $res['id_taniere']; $text .= "Tanière {$id_taniere}"; $text .= afficherLien('taniere', 'fiche', $res['id_taniere'], "", "", "", "", false); $text .= afficherLien('taniere', 'vue2d', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false); $text .= afficherLien('taniere', 'gps', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false); $text .= afficherLien('taniere', 'mh_profil', $res['id_taniere'], "", "", "", "", false); $text .= "<br>X={$res['x_lieu']}, Y={$res['y_lieu']}, Z={$res['z_lieu']}"; $text .= "<br><br>"; } $html_taniere .= "<td onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup!');\""; $html_taniere .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, 'Accès Rapide', CLOSECLICK, EXCLUSIVE);\" "; $html_taniere .= " onmouseout=\"return nd();\">Mes Tanières</td>"; } $lesGt = selectDbTanieres("", "", true); $nbTanieres = count($lesGt); $html_gt = ""; if ($nbTanieres > 0 && userIsGuilde()) { $text = "<b>Les Grandes Tanières Relais&Mago</b><br><br>"; for ($i = 1; $i <= $nbTanieres; $i++) { $res = $lesGt[$i]; $id_taniere = $res['id_taniere']; $nom_lieu = $res['nom_lieu'] . " "; $text .= addslashes($nom_lieu); $text .= afficherLien('taniere', 'fiche', $res['id_taniere'], "", "", "", "", false); $text .= afficherLien('taniere', 'vue2d', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false); $text .= afficherLien('taniere', 'gps', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false); $text .= afficherLien('taniere', 'mh_profil', $res['id_taniere'], "", "", "", "", false); $text .= "<br>X={$res['x_lieu']}, Y={$res['y_lieu']}, Z={$res['z_lieu']}"; $text .= "<br><br>"; } $html_gt .= "<td onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup!');\""; $html_gt .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, 'Accès Rapide', CLOSECLICK, EXCLUSIVE);\" "; $html_gt .= " onmouseout=\"return nd();\">GT</td>"; } ?> <table class='mh_tdborder'> <tr class='mh_tdpage'> <td nowrap> <?php echo $fiche; ?> </td> <?php echo $html_gowap; ?> <?php echo $html_taniere; ?> <?php echo $html_gt; ?> </tr> </table> <?php }
function dessine_troll($mode, $x, $y, $taille, $pas, $info_text, $tab_couleur, $guilde, $info) { global $image; $x_min = $x - $taille / 2; $x_max = $x + $taille / 2; $y_min = $y - $taille / 2; $y_max = $y + $taille / 2; $lesTrolls = selectDbGpsTrolls($x_min, $x_max, $y_min, $y_max, $guilde); $nbTrolls = count($lesTrolls); for ($i = 1; $i <= $nbTrolls; $i++) { $res = $lesTrolls[$i]; if ($res[z_troll] == '0') { $z = 0; } else { $z = $res[z_troll]; } if ($res[delai] < 1) { $level = 0; } elseif ($res[delai] < 2) { $level = 1; } else { if ($res[delai] < 3) { $level = 2; } else { if ($res[delai] < 5) { $level = 3; } else { $level = 4; } } } // Combien vaut x et y pour la map $x_map = D + TAILLE_MAP / 2 - $x * $pas + $pas * $res[x_troll]; $y_map = D + TAILLE_MAP / 2 + $y * $pas - $pas * $res[y_troll]; $id_troll = $res[id_troll]; $nom_troll = $res[nom_troll]; $race_troll = $res[race_troll]; $niveau_troll = $res[niveau_troll]; $x_troll = $res[x_troll]; $y_troll = $res[y_troll]; $z_troll = $res[z_troll]; $date_troll = $res[date_troll]; if ($mode == "map_write") { $text = "<center><h3><font color=red>" . htmlentities(addslashes($nom_troll)); $text .= " N° {$id_troll}</font><font color=white> {$race_troll} ({$niveau_troll})</font></h3>"; $text .= "<font color=white>Position : X={$x_troll}, Y={$y_troll}, Z={$z_troll} ("; $text .= date("d/m/Y H:i", $res[date_troll]); $text .= ")<br>"; $text .= afficherLien("troll", "fiche", $id_troll, $x_troll, $y_troll, $z_troll, "[RG]", false); $text .= afficherLien("troll", "mh_evenements", $id_troll, $x_troll, $y_troll, $z_troll, "[MH]", false); $text .= afficherLien("troll", "vue2d", $id_troll, $x_troll, $y_troll, $z_troll, "[Vue2d]", false); $text .= afficherLien("troll", "gps", $id_troll, $x_troll, $y_troll, $z_troll, "[GPS]", false); if ($res[guilde_troll] != ID_GUILDE) { $text .= "<br><br>Diplomatie du troll<br>"; $text .= "TK : " . $res[is_tk_troll] . " "; $text .= "Wanted : " . $res[is_tk_troll] . "<br>"; $text .= "Guilde : " . $res[nom_guilde] . "<br>"; $text .= "Diplomatie de la guilde :{$res['statut_guilde']}<br>"; } $text .= "</font></center><br>"; echo "<area shape='circle' href='#' coords='{$x_map},{$y_map},8'"; echo " onmouseover=\"return overlib('<font color=red> <b>Clique ici !</b></font> <br>{$text}');\" "; echo " onClick=\"return overlib('{$text}', STICKY, CAPTION, 'Informations', CLOSECLICK, EXCLUSIVE);\""; echo " onmouseout=\"return nd();\">\n"; } else { ImageFilledEllipse($image, $x_map, $y_map, 3, 3, $tab_couleur[$level]); // On affiche le nom du troll si la vue est <= 50, soit la taille <=100. // et que la taille de la map est >= 400 Sinon, on voit rien // c'est devenu une option nommée info_text if ($taille <= $info_text * 2 && TAILLE_MAP >= 400) { imagestring($image, 2, $x_map, $y_map, $res[nom_troll] . '(' . $res[x_troll] . ',' . $res[y_troll] . ',' . $z . ' )', $tab_couleur[$level]); } } } if ($mode != "map_write") { affiche_texte_bottom($info . ":" . $nbTrolls, $tab_couleur, $mode); } }
function afficher_administration_miss_fiche($annee, $genre, $type, $id_troll_miss) { afficher_titre_tableau("Fiche de Miss"); $lesMiss = selectDbMiss($annee, $genre, $type, $id_troll_miss); $res = $lesMiss[1]; $id_troll_miss = $res[id_troll_miss]; $nom_troll = $res[nom_troll]; $image_1_miss = $res[image_1_miss]; $image_2_miss = $res[image_2_miss]; $description_miss = stripslashes($res[description_miss]); $question_miss = stripslashes($res[question_miss]); $reponse_miss = stripslashes($res[reponse_miss]); ?> <form method='post' action=''> <input type='hidden' name='id_troll_miss' value='<?php echo $id_troll_miss; ?> '> <input type='hidden' name='act_admin' value='editdb'> <table class='mh_tdborder' width='70%' border='0' cellpadding='0' cellspacing='1' align='center'> <tr class='mh_tdtitre'> <td colspan="2" align="center"> <h2> <?php echo $nom_troll . " ({$id_troll_miss}) "; afficherLien('troll', 'mh_evenements', $id_troll_miss, "", "", "", "", true); ?> </h2> </td> </tr> <tr class='mh_tdpage'> <td align='center'> Slogan : <br> <?php echo $description_miss; ?> </td> <td> <textarea name='description_miss' size='60' maxlength='65000' value='' cols=60 rows=4><?php echo $description_miss; ?> </textarea> </td> </tr> <tr class='mh_tdpage'> <td align='center'> Question : <br> <?php echo $question_miss; ?> </td> <td> <textarea name='question_miss' size='60' maxlength='65000' value='' cols=60 rows=4><?php echo $question_miss; ?> </textarea> </td> </tr> <tr class='mh_tdpage'> <td align='center'> Réponse : <br> <?php echo $reponse_miss; ?> </td> <td> <textarea name='reponse_miss' size='60' maxlength='65000' value='' cols=60 rows=4><?php echo $reponse_miss; ?> </textarea> </td> </tr> <tr class='mh_tdpage'> <td align='center'> Petite image<br> <?php echo "<img src='{$image_1_miss}'>"; ?> </td> <td> <input type='textbox' name='image_1_miss' size='50' maxlength='240' value='<?php echo $image_1_miss; ?> '> </td> </tr> <tr class='mh_tdpage'> <td align='center'> Grande image<br> <?php echo "<img src='{$image_2_miss}'>"; ?> </td> <td> <input type='textbox' name='image_2_miss' size='50' maxlength='240' value='<?php echo $image_2_miss; ?> '> </td> </tr> <tr class='mh_tdtitre'> <td align='center' colspan='2'> <?php $link_del = 'document.location.href="/miss/miss.php?act_miss=admin&act_admin=deldb&id_troll_miss=' . $id_troll_miss . '";'; $link_back = 'document.location.href="/miss/miss.php?act_miss=admin"'; ?> <input type='submit' value='Modifier' class='mh_form_submit'> <input type='button' value='Supprimer' class='mh_form_submit' onClick='javascript:if(confirm("Confirmer la suppression ?")) {<?php echo $link_del; ?> }'> <input type='button' value='Retour Liste' class='mh_form_submit' onClick='javascript:<?php echo $link_back; ?> '> </td> </tr> </table> </form> <?php }
function vue2d_afficher_trollometer_trolls($trolls, $max_pa) { /* $titre = "<td>x,y,z</td>"; $titre .= "<td colspan=2>$i PA de distance : ".count($objetsProches[$i][troll])."</td>"; $titre .= "<td colspan=2>Race</td>"; $titre .= "<td>Guilde</td>"; $titre .= "<td>Disparu</td>"; $titre .= "<td> </td></tr>";*/ if (!$trolls) { return; } for ($i = 0; $i <= $max_pa; $i++) { $titre = "<tr class='mh_tdtitre'><td nowrap colspan='100'>Distance : {$i} Pa</td></tr>"; foreach ($trolls as $troll2) { foreach ($troll2 as $troll3) { foreach ($troll3 as $troll) { if ($troll[distance_pa] == $i) { $c_guilde = ""; $c_troll = ""; if ($troll['diplomatie'] == 'ennemie') { $c_guilde = ' ennemie'; } if ($troll['diplomatie'] == 'tk') { $c_guilde = ' tk'; } if ($troll['tk'] == 'oui') { $c_troll = ' tk'; } if ($troll['wanted'] == 'oui') { $c_troll = ' ennemie'; } if ($troll['diplomatie'] == 'amie') { $c_guilde = ' amie'; } if ($troll['diplomatie'] == 'alliee') { $c_guilde = ' alliee'; } if ($troll['guilde_troll'] == ID_GUILDE) { $c_guilde = ' guilde'; $c_troll = ' guilde'; } if ($troll['is_seen'] == 'non') { $invi = " invisible"; } else { $invi = ""; } $nom = addslashes($troll['nom']); $nom = utf8_encode($nom); //$text = "<tr class='objetsProches.ligne$invi'>"; $text = "<tr class='objetsProches.ligne{$invi}'>"; $text .= "<td nowrap>"; $text .= afficher_position($troll['x'], $troll['y'], $troll['z'], $troll['id'], $nom); $text .= "</td>"; $text .= "<td nowrap>{$troll['id']}</td>"; $text .= "<td nowrap class='objetsProches.ligne{$c_troll}{$invi}'><b>"; $text .= htmlentities(stripslashes($nom)); $text .= "</b></td>"; $text .= "<td nowrap title='{$troll['race']}'> " . substr($troll['race'], 0, 1) . " </td>"; $text .= "<td nowrap>{$troll['level']}</td>"; $text .= "<td class='objetsProches.ligne{$c_guilde}{$invi}'>"; if (userIsGuilde()) { $text .= "<a href='engine_view.php?guilde=" . $troll['guilde_troll'] . "' title='Fiche RG de la guilde'>"; $text .= utf8_encode(stripslashes($troll['guilde'])); $text .= "</a>"; } else { $text .= utf8_encode(stripslashes($troll['guilde'])); } $text .= "</td>"; $text .= "<td nowrap>"; if ($troll['is_seen'] == 'non') { $title = "Disparu depuis le " . date("d/m H:i", $troll['date_troll']) . ""; $text .= "<img src='images/puce_disparu.gif' title='{$title}'>"; } $text .= "</td>"; $text .= "<td nowrap>"; if (userIsGuilde()) { $text .= afficherLien('troll', 'fiche', $troll['id'], "", "", "", "", false); } $text .= afficherLien('troll', 'mh_evenements', $troll['id'], "", "", "", "", false); $text .= "</td></tr>"; $text .= "</tr>"; if ($titre != "") { $text = $titre . $text; $titre = ""; } $retour .= $text; } } } } } ?> <center><h3> Les Trolls </h3></center> <table width='90%' align='center' cellspacing='0' cellpadding='1'> <?php echo $retour; ?> </table> <?php }