function afficherListeVengeances($id_troll, $id_troll_vengeur = "")
{
    global $db_vue_rm;
    echo "<table class='list' width='100%'>";
    echo "<tr class='titre-tableau'>";
    echo "<td>Troll Chatié</td>";
    echo "<td>Date Vengeance</td>";
    echo "<td>Description</td>";
    echo "<td>Troll Vengeur</td>";
    echo "</tr>";
    if ($id_troll_vengeur != "") {
        $lesVengeances = selectDbVengeances("", "", $id_troll_vengeur);
    } else {
        $lesVengeances = selectDbVengeances($id_troll);
    }
    $nbVengeances = count($lesVengeances);
    for ($i = 1; $i <= $nbVengeances; $i++) {
        $res = $lesVengeances[$i];
        // Troll vengeur, peut-être améliorer pour pas faire
        // de req sql pour chaque ligne...
        $lesTrolls = selectDbTrolls($res[tk_id]);
        $troll_chatie = $lesTrolls[1];
        $lesTrolls = selectDbTrolls($res[troll_vengeur]);
        $troll_vengeur = $lesTrolls[1];
        if (iscontroladministrateur()) {
            $lien = "href='engine_view.php?troll={$res['tk_id']}&troll_type_action=venge&troll_action={$res['vengeance_id']}'";
        }
        echo "<tr class=\"item-impair\" onmouseover=\"this.className='item-mouseover'\"";
        echo "onmouseout=\"this.className='item-impair'\">";
        echo "<td><a {$lien}>{$troll_chatie['nom_troll']} ({$res['tk_id']})</a></td>";
        echo "<td><a {$lien}>{$res['date_vengeance']}</a></td>";
        echo "<td><a {$lien}>{$res['description']}</a></td>";
        echo "<td><a {$lien}>{$troll_vengeur['nom_troll']} ({$troll_vengeur['id_troll']})</a></td>";
        echo "</tr>";
    }
    echo "</table>";
}
Exemple #2
0
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();\"";
}